# $Id: README,v 1.2 2009/01/21 22:08:53 ksb Exp $ I really like the BSD "daemon" program to start by local data collection services. It is really handy. Sadly the BSD guys glued it into their "libutil" just like I glue everything into mkcmd. But I don't have a way to install libutil on hosts that don't have the hacks in the C run-time to support it. So I coded a daemon program based on their work, but it has no glue to their "flopen()" or the pidfile management code. It also has a few edges fixed: It exits correctly when the program doesn't execvp (for example when it doesn't exist. It allows you to specify an explicit group for the process, for example "nobody:mail" for times when you want to run something where the group is the only credential you need. It doesn't hold a flock(2) on the pidfile, rather it checks to see if the pid in the file is running (via kill(pid, 0)). Example for an HP-UX PEG start script: # $_revision_tag_$ PATH=/usr/local/sbin:/opt/fedex/sac/peg/bin:$PATH export PATH HNAME="bmendb01.prod" daemon -cf -p - -u peg /opt/fedex/sac/peg/libexec/unixstats -N $HNAME -p 55 daemon -cf -p - -u root /opt/fedex/sac/peg/libexec/networkstats -N $HNAME -p 53 lan0 exit 0 The above could be a lot more versatile, for example: + compute the HNAME, but HP-UX hates FQDNs + poll each active lan$INSTANCE network interfaces + run some disk collection stats on the plus side -- it works. -- ksb, Jan 2009