Answer the question
In order to leave comments, you need to log in
How to get information from a demon in C?
Wrote a demon in C. How can I get work statistics from it? About 10 indicators. Further, these indicators will be displayed in Cacti.
The program is relatively small, so I don't want to bother with embedding snmp agents or sockets. I'm considering the option to periodically write statistics to a file, but maybe there is a more elegant solution?
Answer the question
In order to leave comments, you need to log in
Let's say through the POSIX message queue: send, for example, SIGUSR1, then read from the queue.
Read Stevens "UNIX: Interaction of Processes".
Well, if not to a socket and not to a file (which is basically the same thing), then it remains just printing to stderrr, stdout (which are basically the same files)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question