Find errant processes

save file
chmod 755

will create a file labeled month day hour minute.txt

#!/bin/sh
#:john core
################################
#change TMPFILE to wherever you want
#################################
# crontab should look like this (run every 15 minutes)
#
# 15,30,45,59 * * * * /this_script
################################################################
DATE=`date +%m%d%H%M`
TMPFILE=/var/spool/crash/${DATE}.txt
top > $TMPFILE
ps -ef >> $TMPFILE
exit

Leave a Reply

Your email address will not be published. Required fields are marked *