I'm seeing high load average at regular times on one of my sites. I have alerts setup, but it's not obvious what's causing the high load, so I'd like to capture the state of the system when the alert goes off.

What's a good way to capture the relevant pieces of information so I can post-facto determine what's causing the load?

This is linux/ubuntu, apache, mod_python/django, mysql.

link|improve this question

64% accept rate
FWIW, since you are using mod_python, your problems are possibly as described in 'blog.dscpl.com.au/2009/03/…;. – Graham Dumpleton Mar 2 '10 at 10:20
feedback

2 Answers

I like to use a program called atop. http://www.atoptool.nl/ Similar to top but it also grabs snapshots of the atop window at user defined intervals. Set INTERVAL=60 in /etc/atop/atop.daily to get 1 minute snapshots. Run atop -r /var/log/atop/atop_20100214 to view 1 minute intervals for a particular date. Use t and T keys to view forward and backwards through time. These file paths are for CentOS, yours may be slightly different.

link|improve this answer
feedback

If Ubuntu has sar, then that can capture System disk usage, vm activity, etc. Once you setup the computer to collect data then you can run reports for both busy and non-busy times to compare activity. Apache has mod_status and mysql has some statistics tools, you could probably get something from them periodically through cron.

link|improve this answer
Collected through cron and graphed in ganglia (you do run ganglia, right?) See vuksan.com/linux/ganglia for examples. – toppledwagon Feb 10 '10 at 20:53
feedback

Your Answer

 
or
required, but never shown

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