[rrd-users] Not corect numbers in rrd ?
Leif Neland
leif at neland.dk
Mon Jun 18 13:00:36 CEST 2007
----- Original Message -----
From: VladoPortos
To: rrd-users at lists.oetiker.ch
Sent: Monday, June 18, 2007 6:21 AM
Subject: [rrd-users] Not corect numbers in rrd ?
Hi all,
i made a graph which show online users and getting data from mysql and so
on...
but when i look on what data are feeded to rrd they look like this:
58 38
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.
Leif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20070618/42a583ff/attachment.html
More information about the rrd-users
mailing list