[rrd-users] Re: Combining COUNTER and GAUGE

Serge Maandag serge.maandag at staff.zeelandnet.nl
Tue Mar 2 17:31:36 MET 2004


> I'd like to log and graph the cpu utilization of a process as 
> well as # of users on the same graph.
> 
> Initially I tried doing this with MRTG (with rrdtool as the 
> backend) but MRTG even with rrdtool on the backend doesn't 
> allow you to choose DS types PER DS, just per rrd.  

The difference between gauge and counter is that for a counter
Rrdtool remember the previous value. When a new value comes in,
Rrdtool distracts the previous value and the result is divided by
The step interval. So when updating with 300, 900, 1800, rrdtool
Puts in the database: (300-Unkn)/300, (900-300)/300, (1800-900)/300
So that would be NaN. 2, 3.

You could do this calculation yourself in your getcpu script if you
Keep the previous values in a temp file. You can then change the ds type
For cpu to gauge.

> I then update the database using something like rrdtool 
> update test.rrd 
> N:`./getcpu`:`./getusers`
>
> Am I doing this correctly?  Is it possible to mix COUNTER and 
> GAUGE DS's on the same graph?

Looks fine to me. Mixing counters and gauges in a graph is no problem.

> I think it's possible to graph DS's from 2 different RRD's, should I 
> just keep the COUNTER in 1 RRD and the GAUGE in a seperate one?

I tend to keep things that are not directly related in different rra's.
It's a drag to add or remove ds's from a rrd when needed.

As long as your O.S. and filesystem do not complaint there's no real
reason
To stick things together in one rrd file. Well, performance perhaps if
you are
Updating lots of DS's frequently. 

Serge.

-------------
Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php

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