3 # swapmon Swap monitoring daemon
7 # description: Resets memory hogs when swap is running low
9 # $Id: host.init,v 1.6 2006/04/20 09:01:00 thierry Exp $
12 PATH=/sbin:/bin:/usr/bin:/usr/sbin
14 # Source function library.
15 . /etc/init.d/functions
17 # Source configuration
18 if [ -f /etc/sysconfig/swapmon ] ; then
19 . /etc/sysconfig/swapmon
22 pidfile=/var/run/swapmon.pid
23 lockfile=/var/lock/subsys/swapmon
28 echo -n $"Starting swap monitor: "
29 daemon --check=swapmon /usr/share/pl_mom/swapmon.py $SWAPMON_OPTIONS
32 [ $RETVAL = 0 ] && touch ${lockfile}
38 echo -n $"Stopping swap monitor: "
42 [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
58 if [ -f ${lockfile} ] ; then
67 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"