D
D
Dmitry Skryabin2015-04-24 07:21:35
C++ / C#
Dmitry Skryabin, 2015-04-24 07:21:35

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

2 answer(s)
E
Eddy_Em, 2015-04-24
@SkryabinD

Let's say through the POSIX message queue: send, for example, SIGUSR1, then read from the queue.
Read Stevens "UNIX: Interaction of Processes".

U
uvelichitel, 2015-04-24
@uvelichitel

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 question

Ask a Question

731 491 924 answers to any question