Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

Have you looked at sar/sadc?

share|improve this answer

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. http://serverfault.com/questions/83963/alternatives-to-nagios

share|improve this answer

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

share|improve this answer

Have you considered launching the commands manually to audit them?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.