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

This is a discussion on [rrd-users] Re: problem with storing values in the database within the RRD Users forums, part of the Networking and Network Related category; > Could you provide me with a sample? Well, I'm not going to do your work. Your heartbeat probably ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2005
Serge Maandag
 
Posts: n/a
Default [rrd-users] Re: problem with storing values in the database

> 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@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:24 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0