[rrd-users] Re: Printing some calculated current values on a graph?
sh at abovenet.de
Tue Aug 12 14:31:37 MEST 2003
> OK, but how? Using GPRINT:user_p:AVERAGE:"Current CPU\: %.2lf user, "
> Gives ERROR: the RRD does not contain an RRA matching the chosen CF
Hmmm, the above should work. Here's an example how I do it:
$rrd_all -u 100 -l 0 -t \"CPU Usage $1\" -v \"Use Percentage\"
AREA:notmon#000000:\"Not Monitored\\n\" COMMENT:\"\\n\" $upper
GPRINT:calc:AVERAGE:\"Average Usage \\: %3.2lf %%\\n\"
GPRINT:calc:MAX:\"Max Usage \\: %3.2lf %%\\n\" $percentage
Try to use no underscore (user_p), I think I remember that there was a problem
with it, just a guess ....
> > BTW, if you use GAUGE and AVERAGE to store your data, you automatically
> > store percentage as the linux raw values are hundredth of seconds ...
> I think I'm doing that, but in my opinion, a value such as 744674 is
> not a percentage. And lets keep it on the list, if you don't mind.
Use rrdtool dump to see what is stored inside the rrd-file. You give it the
744674 but it calculates the difference to the last entry, so that you might
get 3000 hundredth of seconds. If you do the measurement every 5 minutes (300
seconds) the average usage during this timeframe will be 10 100th of seconds,
which will be 10 % as 3000 hundredth of seconds are 10 % of 30000
(300seconds/100) hundredth of seconds.
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
More information about the rrd-users