[rrd-users] Question about RRDTool ..
jyavenard at gmail.com
Thu Mar 20 05:00:48 CET 2008
Discovered RRDTool not long ago and I'm able to pretty much work just
like I need it to.
However I am experiencing some issues in a particular case.
I am trying to collect some data at 3 hours interval, trying to
simulate what MRTG would be doing.
I want to keep record of those data of a full year and calculate the
average, min and max for:
-Weekly view (so gather the data over the past 7 days and keep it for a month)
-Monthly view (gather the data over the past 31 days and keep it for one year)
I created my RRD database like this:
rrdtool create speed.rrd -s 10800 \
So I have the average, min and max value collected as follow:
data collected every 3 hours (10800 seconds)
for 1 year (2928 x 3 hours = 366 days)
sampled over 1 day (8 records) kept for 31 days
sampled over 1 week kept for 5 weeks
sampled over 1 month kept for 12 month.
Now to generate my graph, I use the following command:
/usr/local/rrdtool-1.2.27/bin/rrdtool graph images/localday.png -l 0 \
-t 'Australia Transfer - DAILY' \
--step 10800 -x HOUR:1:HOUR:3:HOUR:3:0:%k \
DEF:local=speed.rrd:local:AVERAGE DEF:remote=speed.rrd:remote:AVERAGE \
COMMENT:' ' \
COMMENT:'Maximum ' \
COMMENT:'Average ' \
COMMENT:'Minimum ' \
COMMENT:'95th percentile\l' \
LINE1:local#00C000:'Australia ' \
GPRINT:ds0max:'%5.0lf kb/s' \
GPRINT:ds0avg:'%5.0lf kb/s' \
GPRINT:ds0min:'%5.0lf kb/s' \
GPRINT:ds0pct:' %5.0lf kb/s\l' \
GPRINT:ds1max:'%5.0lf kb/s' \
GPRINT:ds1avg:'%5.0lf kb/s' \
GPRINT:ds1min:'%5.0lf kb/s' \
GPRINT:ds1pct:' %5.0lf kb/s\l'
Unfortunately, this doesn't seem to work properly.
For a start I recorded the maximum and minimum value aren't correct,
they are rounded.
Like the maximum in my case should be 1267.13 but it shows as 1266 on the graph.
rrdtool fetch speed.rrd AVERAGE
timestamp local remote
1205895600: 1.2642200000e+03 1.6115000000e+02
1205906400: 1.2642200000e+03 1.6115000000e+02
1205917200: 1.2642200000e+03 1.6115000000e+02
1205928000: 1.2642200000e+03 1.6115000000e+02
1205938800: 1.2642200000e+03 1.6115000000e+02
1205949600: 1.2642200000e+03 1.6115000000e+02
1205960400: 1.2642200000e+03 1.6115000000e+02
1205971200: 1.2661600000e+03 1.6115666667e+02
1205982000: nan nan
1205992800: nan nan
I ran manually the command:
rrdtool update /var/www/html/adslstats/speed.rrd 1205974800:1267.13:161.16
so where is my 1267.13 ??
Then, in the graph itself, the line stop at what is 11AM.
Did I miss anything in the create of the round robin database? Did I
just misunderstand something in the documentation (I did read it over
and over to make sure I didn't make a stupid mistake).
Your help will be appreciated.
This is the page I am generating:
For the data sampled every minute, it works just fine, only the data
sampled every 3 hours give me issues .
More information about the rrd-users