~aperezdc/dmon

Small process daemonization and monitoring tool
5a80ff38 — Adrian Perez de Castro 12 days ago
Update aperezdc/cflag dependency
901b810d — Adrian Perez de Castro 13 days ago
Build in C23 mode
58802e45 — Adrian Perez de Castro 3 years ago
xbuild: Disable a few non-working arches

clone

read-only
https://git.sr.ht/~aperezdc/dmon
read/write
git@git.sr.ht:~aperezdc/dmon

You can also use your local clone with git send-email.

#DMon - Process Monitoring With Style

builds.sr.ht status

This README contains only some random bits. For more in-depth writing, you may want to read the articles on DMon:

There are also manual pages, so please take a look at them.

#Bulding standalone binaries

By default all tools are built into a single binary which can be symlinked with different names to switch between them (àla BusyBox). This is useful to save space and (to some degree) system memory.

You can build all the DMon tools as separate binaries passing MULTICALL=0 when invoking Make:

make MULTICALL=0

Remember to pass the option when doing make install as well:

make MULTICALL=0 install

#Building libnofork.so

A tiny LD_PRELOAD-able “libnofork.so” library can be built by using the nofork Make target. This library overrides the fork(2) and daemon(3) functions from the system libraries, in such a way that the process under effect will not be able of forking. This is interesting for running DMon with programs that have no option to instruct them not to fork.

#Building libsetunbuf.so

A tiny LD_PRELOAD-able "libsetunbuf.so" library can be built by using the setunbuf Make target. This library uses the __attribute__((constructor)) attribute in order to call setbuf(stdout, NULL); which turns off the buffering of stdout on the process running under DMon. This is useful for viewing the output of your process through DLog in real time.