tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fscd - service check daemon [was: "rcutil" - a script to monitor status of daemons started in rc.d]



Hi,

as I already told, there's already fscd by Tom Rhodes (see
http://people.freebsd.org/~trhodes/fsc/) - a *very* nice tool for
administrators.
It uses kqueue(2) and the service script that was already discussed in
    http://mail-index.netbsd.org/tech-userlevel/2011/11/14/msg005790.html
to monitor services (attach to their pids) and restart them when they die.

But there were some usability flaws and he unfortunately didn't have time to
continue working on it, so I tried to. And when doing that, I made it run on
NetBSD as well.

To use it, you:
 * copy the service script into a directory in fscd's PATH.
 * power up fscd with `fscd` (nothing more)
 * enable a service with `fscadm enable $SERVICE`
 * stop monitoring it with `fscadm disable $SERVICE`
 * show status with `fscadm status`
 * close fscd with `fscadm shutdown` (or just kill(1))
 * to automatically monitor services when starting up fscd, you can edit the
   configuration file. It needs one service name per line (without preceding
   or trailing spaces or tabs), comments starting with a #.

You can also supply the option `-s` to fscd and fscadm to specify the socket
to be used instead of the standard one (/var/run/fscd.sock).
You can as well supply the option `-c` to fscd to specify the configuration
file to be used instead of the standard one (/etc/fscd.conf).

You can download it here:
    https://vcs.in-berlin.de/schrank21_fscd/ (Files->Version->Tarball)

Regards, Julian

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index