I have a system that runs a lot of cronjobs. It seems that one of these crons is consuming excessive amounts of CPU and memory on occasion.
Is there an easy way to audit CPU and memory usage of cron jobs?
I have a system that runs a lot of cronjobs. It seems that one of these crons is consuming excessive amounts of CPU and memory on occasion.
Is there an easy way to audit CPU and memory usage of cron jobs?
Have you looked at sar/sadc?
No, not specifically, but that should not be necessary. Just use any of the common monitoring tools; most allow breaking down resource usage by process.
The simplest solution would be a script that regularly runs
vmstat
andtop
and appends results to a file (usetop
's "b" option). Or use a more sophisticated monitoring software, such as Nagios or ZenOSS (might be overkill for this problem, but they are generally useful). See e.g. Alternatives to NagiosThis is a good idea for a new tool : ) some cron wrapper that does accounting
Have you considered launching the commands manually to audit them?