[rrd-users] Re: cpu usage

Stephan Harren sh at abovenet.de
Wed Feb 12 18:16:05 MET 2003

Am Mittwoch, 12. Februar 2003 17:53 schrieb Sonja Pieper:
> Hi,
> has anyone done some logging on cpu-usage
> as in
> cat /proc/stat?
> I want to graph %-Values of idle/user/nice/system time
> the values cat /proc/stat gives you back are simply
> 'jiffies' counted since the computer rebooted
> How do I best save these values? And then how do I
> calculate the percent values or must I do this before
> storing in the rrd?
> Thx for any help
> Sonja

As these are counters, you surely can use them in rrd as counters. As you see, 
these are 1/100 seconds, and if you put them into the rrd as counters, you'll 
get exactly the percentage.


idle counter1: 30000
idle counter2: 60000

Difference: 30000

Divided by 300 seconds (as rrd always calculates a rate), you'll get 100% idle 
time (just an example, will never happen like this, just to make things 

Best regards,


Stephan Harren
Manager Site Operations
Phone +49 69 90554 153
Fax +49 69 90554 111
Cell +49 173 7011126

Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list