[rrd-users] Re: Performance (Was: Help with Bash script to calc

This is a discussion on [rrd-users] Re: Performance (Was: Help with Bash script to calc within the RRD Users forums, part of the Networking and Network Related category; Alex van den Bogaerdt wrote: > > >I just use "date +%s" to get the unix time ...


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-20-2006
Simon Hobson
 
Posts: n/a
Default [rrd-users] Re: Performance (Was: Help with Bash script to calc

Alex van den Bogaerdt wrote:

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

>>
>> etime=`date +%s`
>> step=300
>> etime=$(( ${etime} - ( ${etime} % ${step} ) ))

>
>etime=$(( ${etime} / ${step} * ${step} ))
>
>is 10% faster, at least on my system.



>/bin/date -d 19700101\ 00:00\ +0000\ ${etime}sec
>
>It means: the unix epoch (19700101 00:00, timezone UTC) and then
>${etime} seconds further in time (so: reverse of date +%s)


Thanks, works a treat. While I was at it, following from other
threads on performance, I've also tweaked my graphs to have one
pixel/sample and the performance boost is "quite acceptable" ! Not
only plotting speed, but memory consumption is very significantly
reduced - down from being touch and go if it would run out with 3/4G
RAM plus 1G swap to not swapping at all when plotting a stack of 254
in and 254 out values.

I'm most happy now :-)

Just waiting for the boss to ask why I've got such odd graphing periods !

Simon

--
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 10:40 AM.


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