[rrd-users] Re: problem with storing values in the database

Serge Maandag serge.maandag at staff.zeelandnet.nl
Wed Feb 23 20:57:48 MET 2005


> Could you provide me with a sample?

Well, I'm not going to do your work.

Your heartbeat probably is 600 and your step 300
(that's pretty standard)

If you type "date +%s" on your command line, you'll
Get the number of seconds that have passed since 
01-01-1970 00:00:00. That's called an epoch timestamp.

Round it to the nearest 300 seconds border and use that
timestamp to update your database.

timestamp=`date +%s | awk '{print $1-($1%300)}'`
rrdtool update file.rrd $timestamp:$value1:$value2

Serge.

-------------
Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list