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 and top and appends results to a file (use top'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 Nagios


This is a good idea for a new tool : ) some cron wrapper that does accounting