[rrd-users] Not corect numbers in rrd ?
leif at neland.dk
Mon Jun 18 13:00:36 CEST 2007
----- Original Message -----
To: rrd-users at lists.oetiker.ch
Sent: Monday, June 18, 2007 6:21 AM
Subject: [rrd-users] Not corect numbers in rrd ?
i made a graph which show online users and getting data from mysql and so
but when i look on what data are feeded to rrd they look like this:
and in rrd it looks like this:
1182109560: 5.8000000000e+01 3.7985531650e+01
But in graph last values are 58 (OK) and second one is 37 ( not OK )
Any idea what im doing wrong ?
If you want (a better chance of) the exact numbers out that you put in, you must be sure you enter the data at the exact time which matches the steps.
So do not enter the data at "now", but calculate the time exactly at eg 12:00:00
If you run a cron job at 12:00, it might be finished and enter the data at 12:00:01, and RRD interpolates by "drawing a straight line" between the last time-corrected data and 12:00:01.
Eg, if the value at 11:58:00 was 37 and 12:00:01 was 38, at 12:00:00 it would be 37.985531650
(the calculation is just an example, not the right values (probably))
What works for me in my is storing the timestamp at the start of the script and using it later when I enter the data, my scripts takes quite a few seconds, because they fetch and parse data from webpages. My cron manages to start the job in the right seconds mostly, it doesn't matter for me if it slips a second or two.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rrd-users