[rrd-users] Re: Graphing
Clifton Royston
cliftonr at lava.net
Thu Jan 3 20:28:46 MET 2002
On Thu, Jan 03, 2002 at 08:20:07PM +0100, Tobias Oetiker wrote:
> > 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
Ummm, what Tobi says is correct, and what I wrote was wrong.
I was misreading your clear statement above about what you were
returning and what you wanted to graph. What I gave you would instead
show the total number of users signed in, which I had been thinking was
what you wanted, not the change per time period. Sorry about that!
-- Clifton
--
Clifton Royston -- LavaNet Systems Architect -- cliftonr at lava.net
WWJD? "JWRTFM!" - Scott Dorsey (kludge) "JWG" - Eddie Aikau
--
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