You are not logged in.
collectd (http://collectd.org) rocks. Here's a init script for all you Archers:
$ cat /etc/rc.d/collectd
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
COLLECTD=/sbin/collectd
CONF=/etc/collectd.conf
PID=`pidof -o %PPID /sbin/collectd`
case "$1" in
start)
stat_busy "Starting collectd Daemon"
[ -z "$PID" ] && $COLLECTD
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/collectd.pid
add_daemon collectd
stat_done
fi
;;
stop)
stat_busy "Stopping collectd Daemon"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/collectd.pid
rm_daemon collectd
stat_done
fi
;;
restart)
$0 stop
sleep 10
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
% whereis whatis whence which whoami whois who
Offline