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

A Darren Dunham ddunham at taos.com
Fri Jan 21 19:03:06 CET 2011


On Thu, Jan 20, 2011 at 05:55:00PM -0700, Shawn Heisey wrote:
> I've created some RRDs for a Solr index that track document count, with 
> the following statements.
> 
> rrdtool create doc_counter.rrd \
>          --step 86400 \
>          DS:count:COUNTER:604800:0:18446744073709551615 \
>          RRA:AVERAGE:0.5:1:730 \
>          RRA:AVERAGE:0.5:7:520 \
>          RRA:AVERAGE:0.5:30:6000
> 
> rrdtool create doc_gauge.rrd \
>          --step 3600 \
>          DS:did:GAUGE:7200:0:18446744073709551615 \
>          RRA:MAX:0.5:1:600 \
>          RRA:MAX:0.5:24:600 \
>          RRA:MAX:0.5:168:12000
> 
> The first one updates once a day, the second one once an hour.  I would 
> like to now graph these, starting with the first one, the COUNTER.  I 
> figure the GAUGE one will be pretty easy, since there's no rates involved.

> 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"

-- 
Darren



More information about the rrd-users mailing list