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.

When I run uptime, I get output similar to the following:

 07:50:39 up 13 days,  5:00,  1 user,  load average: 0.00, 0.02, 0.00

Is there a way, other than by running uptime every X-many minutes, to get a more historical load average?

I'd like to be able to graph the load averages across the last week, month, etc.

Perhaps I'm looking in the wrong place?

Update
I can't choose between collectd (@david spillet) or munin (@icapan) - so for now, I'll use both (on different machines).

Thanks :)

share|improve this question

4 Answers 4

I use collectd to record system load amongst a number of other parameters. It stores the data in RRD stores that can be graphed and otherwise analysed using the many available tools and scripts. I use a modified version of this script for my graphing (sample output).

Collectd has plugins for monitoring lots of stuff (everything commonly asked for and a few things on top), and creating your own shouldn't be difficult if you need something specialised, so makes for a very flexible tool. Configuring the graphs in rrd.cgi is a very manual process, though not difficult, though you might well find a more convenient tool for working with the RRD files maintained by collectd.

share|improve this answer
    
that looks pretty cool - will definitely look at it as an option :) –  warren Sep 22 '09 at 6:30

Munin is the easiest way to get uptime graphs with minimum effort in installing and configuring. I also use atop for aggregate cpu usage by some process, but that is not what You asked for.

share|improve this answer
1  
Yes, Munin is nice and it's extremely easy to write your own plugin, too. –  wazoox Sep 21 '09 at 11:18
    
I'll check this one out, too –  warren Sep 22 '09 at 6:30

Look at man sadc (System activity data collector) and man sar (Collect, report, or save system activity information).

On my Ubuntu system, all I had to do to enable data collections, since the cron job was already in place, was edit /etc/default/sysstat and change this line to "true":

ENABLED="true"

To display load information similar to uptime, do:

sar -q

To display default output for a particular time range and date (here, the 20th of the month):

sar -s 11:00:00 -e 14:00:00 -f /var/log/sysstat/sa20
share|improve this answer
    
thanks @Dennis - but collectd and munin are closer to what I'm looking for –  warren Oct 4 '09 at 11:17

Load average data can be found in /proc/loadavg pseudo-file. The format there is maybe more suitable for an automatic processing. Apart from the format, these are exactly the same numbers as those you receive when you execute the uptime command.

Once ago, to solve a problem similar to yours, I just scheduled a bash script with cron to read /proc/loadavg and issue a rrdtool update command to update a RRD database.

share|improve this answer
    
running cron every minute would certainly work, but I'm hoping to accomplish this without something so.. laborious :) –  warren Sep 22 '09 at 6:29

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.