[rrd-users] weird behaviour of rrd graph
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Wed Sep 29 22:25:05 CEST 2010
> Anyway, regarding the modulo trick - i`m not sure if i got that right
>
> You mean like this ?
>
> export now=$(( `date +"%s"` - $((`date +"%s"` % 21600)) ))
> rrdtool .... --start end-1y --end $now ....
There will be shortcuts. For instance, if your shell uses integer
calculations (probably it does), try:
rrdtool ... --end $((`date +%s` / 21600 * 21600)) ...
Or, if you want to have some logging available not just for yourself but
also for others, so that the problem can be reproduced, export now as you
do, combined with the shortcut I proposed, and echo the entire rrdtool
command line to a logfile ( echo rrdtool ... --end $now ... >>
/tmp/rrd.txt )
If this actually makes a difference, it could be that all your graphs are in
the undesired way. If so, subtract an hour or so from the date.
Keep us posted please!
More information about the rrd-users
mailing list