3 # swapmon Swap monitoring daemon
7 # description: Resets memory hogs when swap is running low
10 PATH=/sbin:/bin:/usr/bin:/usr/sbin
12 # Source function library.
13 . /etc/init.d/functions
15 # Source configuration
16 if [ -f /etc/sysconfig/swapmon ] ; then
17 . /etc/sysconfig/swapmon
20 pidfile=/var/run/swapmon.pid
21 lockfile=/var/lock/subsys/swapmon
26 echo -n $"Starting swap monitor: "
27 daemon --check=swapmon /usr/share/pl_mom/swapmon.py $SWAPMON_OPTIONS
30 [ $RETVAL = 0 ] && touch ${lockfile}
36 echo -n $"Stopping swap monitor: "
40 [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
56 if [ -f ${lockfile} ] ; then
65 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"