[rrd-users] Help with Bash script to calc end-time in multiples of 300 ?

This is a discussion on [rrd-users] Help with Bash script to calc end-time in multiples of 300 ? within the RRD Users forums, part of the Networking and Network Related category; I noted a response to a previous thread to make sure you specify end time in multiples of you step.......


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-18-2006
Rob Conway
 
Posts: n/a
Default [rrd-users] Help with Bash script to calc end-time in multiples of 300 ?

I noted a response to a previous thread to make sure you specify end time in multiples of you step....I have just been using --end NOW and as I run this on a 266mhz processor (NSLU2) I need all the help I can get in optimisation...
I have a step time of 300 seconds and use bash shell scripting.......Can anyone assist in a code snippet to enable me to somehow round my time to the nearest 300 ?

I just use "date +%s" to get the unix time but how can I easily round this value ?


quote: from Alex

Set start and end times to a whole multiple of the amount of seconds
per pixel. Not: "end=now" (either explicitly or implicitly), but
"end=${endtime}" where variable endtime is computed by your front end
and is a whole multiple of 3600 (or 86400, or 300, or 604800 etc.)
whatever your step*steps is.


thanks rob
--
Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/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:20 AM.


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