[rrd-users] Graphing
Christohper Pope
cpope at sell.com
Thu Jan 3 19:42:19 MET 2002
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?
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
More information about the rrd-users
mailing list