February
8
Finding problem CRON jobs
Find cronjobs that were modified recently:
[root@SERVER cron]# find /var/spool/cron -type f -mtime -3 | xargs ls -al
After commenting out suspect lines in the listed user’s crontabs, you can dump the process list to a file every 5 seconds or so with:
[root@SERVER ~]# touch /root/ps-list.txt [root@SERVER ~]# watch -n 5 "ps aux >> /root/ps-list.txt"
If the server crashes, you can then review the last few lines of /root/ps-list.txt to see which processes appear to be overwhelming the server.