[rrd-users] Graphs with rate per day rather than rate per second

Shawn Heisey rrd at elyograg.org
Fri Jan 21 23:01:16 CET 2011


On 1/21/2011 11:03 AM, A Darren Dunham wrote:
>
>> The problem that I've run into is that the numbers it graphs are in
>> documents per second, not documents per day.  I've been doing a lot of
>> googling and have come up empty - most of what's out there for regular
>> per second graphs also happens to mention either "per day" or "daily"
>> ... so the searches I've tried are useless.  Here's what I am beginning
>> with:
>>
>> rrdtool graph count.png --end now --start end-365d \
>>     DEF:count=doc_counter.rrd:count:AVERAGE:step=86400 \
>>     LINE1:count#0000FF:"docs per day\l"
>>
>> I figure that I am simply missing an option on the graph statement that
>> tells it to use a different rate scale.  If anyone can help me find my
>> mistake and fix it, I would appreciate your time.
> Modify your data and scale it appropriately.  There are 86400 seconds in
> a day, so multiply by that.
>
> CDEF:perday=count,86400,*
>
> Then graph "perday" instead of "count"

Thank you!  It took some headscratching to translate your advice into a 
usable command, here's what I ended up with, which seems to work pretty 
well:

rrdtool graph count.png --end now --start end-180d  
DEF:count=doc_counter.rrd:count:AVERAGE CDEF:perday=count,86400,* 
LINE1:perday#0000FF:"docs per day\l"

Thanks,
Shawn



More information about the rrd-users mailing list