[rrd-users] Re: Graphing

Tobias Oetiker oetiker at ee.ethz.ch
Thu Jan 3 20:20:07 MET 2002


Today Christohper Pope wrote:

>
> Hi,
>
> MRTG/RRDTOOL always graphs in <something>/<some time>, which is normally just what I want to do,
> but in some situations I want to graph just the number of times something happened during a time frame.
> For example if I was keeping track of members logging into a site I would query
> (every 5 minutes) something like
>
> SELECT COUNT(*) as count FROM users WHERE last_login > DATE_SUB( NOW(), INTERVAL 5 MINUTE );
>
> Say this returns something like 35 users the first time, and 40 users the second time.
>
> I issue an update into the users.rrd w/the following create definition:
> rrdtool create --start `date +%s` user.rrd \
>   	DS:signin:GAUGE:600:0:U \
>    	RRA:AVERAGE:0.5:1:288 \
>     	RRA:AVERAGE:0.5:3:1680 \
> 	RRA:AVERAGE:0.5:6:1440 \
> 	RRA:AVERAGE:0.5:288:365
>
> Graphing this, the results are in signins per second and i get something like
> (40 - 35)/(300 secs).  I want the scale to be in "per 5 minutes" so that what I
> get is a graph of the number of users that signed in in that 5 minute interval,
> and not the average. So i used a CDEF in my graph command
> CDEF:s_signin=signin,300,*
> which should cancel with the division and leave me with (40 - 35) but instead
> I get values of over 1000 and the site just isn't that popular.  Is there
> something I'm missing?

Yes, what you want to use is the ABSOLUTE data type, then things
will look much better ... rest is fine

tobi
>
> Thanks
> Chris Pope
>
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
 / // _ \/ _ \/ / phoneto:+41(0)1-632-5286  faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ mailto:oetiker at ee.ethz.ch http://people.ee.ethz.ch/~oetiker


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list