[rrd-users] Re: HRULE/Upper limit

DJ Gregor dj at gregor.com
Sun May 4 05:23:19 MEST 2003


Hey Ketan,

An example of your exact command given to rrdgraph would have been 
useful so we can see exactly what you are trying to do, instead of 
making some guesses.  I'll take a shot at guessing what your problem is 
and propose a solution, in any case.

Okay, you are collecting data and storing it in RRD's in kilobytes.  
So, when you specify "-u 660", you are specifying 660 kilobytes, not 
660 megabytes.  Using "-u" without "--rigid"/"-r" sets the maximum 
value, but if a value higher the argument to "-u" needs to be graphed, 
the upper-limit will be auto-scaled.  Since your data goes up to 250 
megabytes, or 250,000 kilobytes, which I think is what you are trying 
to graph, the graph is re-scaled.  I'm guessing that the Y-axis units 
on your graph are in "K" or 10^3.  You need to set "--rigid" ("-r") to 
disable the behavior and lock the upper limit at the "-u" value no 
matter what.  But you probably don't want to do this because you have 
an underlying problem, I think....

The "--base" option is only used for changing the definition of k, M, 
etc..  Normally, if your graph shows "1k" or "1M", that is equivalent 
to 1,000 and 1,000,000 respectively.  But things like memory are 
generally measured in powers of 2, which 2^10 being 1024, and this 
generally replaces the normal definition of kilo (k) to make the 
numbers easier to deal with.  Mega (M) is similarly scaled to 1024*1024 
((2^10)^2), Giga (G) to 1024*1024*1024 ((2^10)^3), and so on.  So, the 
"--base" option just changes the definitions on the graph for the SI 
prefixes to be a power of 2^10, instead of a power of 10^3, and it does 
not otherwise change your data, such as converting from kilobytes to 
megabytes.

You probably want to leave all of your other graphing options the same, 
except instead of graphing the DEF directly from your RRD (let's assume 
it is called "mem"), use a CDEF to scale your data appropriately and 
then graph the new CDEF variable that you create.  E.g.:

	CDEF:mem_mega=mem,1024,/

Myself, I'm a fan of storing un-scaled data in my RRD's, and graph it 
that way also.  When I store disk statistics, I store bytes 
used/available/etc, vs. kilobytes or megabytes, for email traffic, I do 
messages per second, for round-trip-times, number of seconds, etc..  I 
graph all of these things without scaling the data, and let rrdgraph 
stick the appropriate units on the graph.  IMHO, it makes it much 
easier to understand and work with the data.


	I hope this helps,
	- deej

On Saturday, May 3, 2003, at 07:04 PM, Ketan Patel wrote:

> Hello, I have a little problem with HRULE/Upper limit value while 
> plotting the graph.  The graph is for memory (RAM) consumption. For a 
> graph covering average values for one week, the values range within 
> 150-250MB. Maximum available memory is 654MB. In graph, I have set 
> HRULE:654 and also specified "-u 660" but graph created shows upper 
> value on y-axis as 250. It doesn't strech upwards to cover 660 hrule 
> line. Also, lower value starts at 150MB. When I set "-l 0", it shows 
> values from 0 to 250 but still doesn't cover 660. How to get a graph 
> showing values from 0-660?  Also, GAUGE memory values retrieved from 
> target are in KBytes. So, when I plot them, do I need to convert them 
> into MBytes to show correct values? Does "--base" converts it 
> automatically (I tried using it but the result was same, so I guess it 
> is not doing the conversion.) Another target machine has 1GB of 
> memory, so what shall be HRULE/upper limit value in that case?  I know 
> I am missing something very obvious here. Any insight is highly 
> appreciated. Thanks a lotk2
> \\\ ///
>     / ó ó \
>    0   |   0
>     \  U  /
> -ooo--oooo-
> cheers 	
> It's wonderful when I live in present
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
>
> --
> 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
>
>
Daniel (DJ) Gregor, <dj at gregor.com>             http://www.gregor.com/

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