[rrd-users] value and name both
David Thornton
northdot9 at gmail.com
Tue Nov 22 14:57:58 CET 2011
Hey Shabnam, David here :)
Shabnam is using a shell script to construct rrdgraph statements.
My suggestion to Shabnam originally ( off list ) was to do some rrd
fetch commands before the main rrdgraph construction.
Var1=`rrdfetch ds1 maximum blah`
Var2=`rrdfetch ds2 maximum blah`
If var1 > var2
Max ="var1"
Else
Max = "var2"
Fi
...
Rrdgraph "stuff ... $max ... Stuff "
But now I wonder if you can I do a vdef (maximum) fetch? how do I
distinguish between vdef maximum and cdef max?
David Thornton
Northdot9
On 11/21/11, Simon Hobson <linux at thehobsons.co.uk> wrote:
> Shabnam Shahreza wrote:
>
>>Imagine this is one of the printed outputs which I got by using
>>"AVERAGE 1" comparing file1/2/3:
>>
>> print[10] = "7.843519 \n"
>>
>>This search fails to show me which one of file1/2/3 has this value:
>>
>>rrdtool fetch -s -1y file1 AVERAGE 1 | grep 843519
>>rrdtool fetch -s -1y file2 AVERAGE 1 | grep 843519
>>rrdtool fetch -s -1y file3 AVERAGE 1 | grep 843519
>>
>>Even I dumped the output but still unable to locate the value....
>>
>>Is this due to some normalization or something?
>
> Almost certainly.
>
> rrdtool fetch simply returns the data stored in the database - it
> does **NOT** do any data manipulation. rrdgraph on the other hand
> will resample the data to fit your graph unless you take care to make
> this a null operation.
>
> Even if you use rrdtool graph, I would not try finding data like that
> - it only takes a very small change in conditions for that exact
> value to not appear.
>
> However, in the example I gave, you did not have to look for a value
> (at least not in a separate run) - what you printed was an index to
> the data set that gave rise to the value you were after. Ie, you
> wouldn't get something like 7.843519 and have to find where it came
> from, you'd get (for example) 1, 2, or 3 - signifying source 1, 2, or
> 3 respectively.
> And BTW - please don't try and take threads off-list unless asked to.
> It's impolite both to the person your asking for one-to-one help from
> and to the rest of the people on the list who may well be able to
> assist. Also, it means the conversation doesn't go into the list
> archives for the benefit of others looking for answers later.
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
--
Sent from my mobile device
More information about the rrd-users
mailing list