#!/sbin/runscript # # atop This shell script takes care of initializing atop # # chkconfig: 2345 85 15 # description: Atop is a system and process activity monitor # # Check existance of binaries start(){ ebegin "Starting atop" if [ -f /etc/cron.d/atop ]; then start-stop-daemon --start --quiet --exec /etc/atop/atop.daily fi eend $? } stop(){ ebegin "Stopping atop" PIDATOP=`ps -lef | grep -- '-w /var/log/atop/atop_' | grep -v grep | awk '{print $4}'` if [ "$PIDATOP" != "" ] kill $PIDATOP fi eend $? }