[rrd-users] value and name both
Shabnam Shahreza
shabnam.shahreza at alpha-group.ca
Mon Nov 21 17:14:46 CET 2011
Thanx a lot Tobi;
I just got a chance to test it today...
The output that I get from "PRINT" is perfect to be tested against the actual source files but when I check it with "rrdtool fetch ...." I can't find the match of it in any of the source dbs...
Example:
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? I'm not the one who created the db... I just need to analyze it...
Shabnam Shahreza
-----Original Message-----
From: Tobias Oetiker [mailto:tobi at oetiker.ch]
Sent: Thursday, November 17, 2011 10:03 AM
To: Shabnam Shahreza
Cc: rrd-users at lists.oetiker.ch
Subject: RE: [rrd-users] value and name both
Shabnam,
you can run rrdtool graph twice. the first time without actually
creating a graph, just returning the results of your work via PRINT
statements (use graphv).
then in the second run you customize the arguments according to the
first run ...
since rrdtool spends most of its time 'waiting for data from the
disk' and 'compressing the final chart' the performance impact will
not be all that bad.
cheers
tobi
> Any other work around?
> Imagine this is going to be the maximum CPU-util of some servers and I want to graph the name of the server (source) that caused the highest peak in addition to the value ....
>
> -----Original Message-----
> From: Tobias Oetiker [mailto:tobi at oetiker.ch]
> Sent: Thursday, November 17, 2011 9:38 AM
> To: Shabnam Shahreza
> Cc: rrd-users at lists.oetiker.ch
> Subject: RE: [rrd-users] value and name both
>
> Today Shabnam Shahreza wrote:
>
> > But it still gives me the "value" not the "name of the variable carrying that value"... right?
> >
> > Imagine if the maximum value is 100.05 I want to know also which
> > of the var1,var2,var3,.. has this value....
>
> you do
>
> var1,max,eq,
>
> but the problem is even if you knew, you could not do all that much
> with the information as you can not generate text output using CDEF
>
> cheeers
> tobi
>
> >
> > -----Original Message-----
> > From: Tobias Oetiker [mailto:tobi at oetiker.ch]
> > Sent: Thursday, November 17, 2011 9:27 AM
> > To: Shabnam Shahreza
> > Cc: rrd-users at lists.oetiker.ch
> > Subject: Re: [rrd-users] value and name both
> >
> > Hi Shabnam,
> >
> > you could do it using multiple CDEF expressions, using the IF
> > function, looking at each var in turn, comparing it with the
> > maximum earlier found.
> >
> > cheers
> > tobi
> >
> > Today Shabnam Shahreza wrote:
> >
> > > Since I got no answer on this should I consider that this can't be done at all?
> > > I mean along with the values to draw the graph I need to know what was the source of this "interesting" value (which is maximum here - I even keep it in the name of the variable to see if I can use it later)....
> > >
> > > Any idea?
> > >
> > > Regards;
> > > Sbnm
> > > From: Shabnam Shahreza
> > > Sent: Wednesday, November 16, 2011 10:33 AM
> > > To: rrd-users at lists.oetiker.ch
> > > Subject: value and name both
> > >
> > > Hi everyone:
> > >
> > > Imagine that I have something like this (please ignore if the syntax if not 100% correct - it is more complicated in my script)
> > >
> > > "CDEF:name=var1,var2,var3,var4,... <number of variables>,SORT, POP"
> > >
> > > This gives me the maximum (although I had to use REV as well.. by this is working in my script fine....ignore the syntax please)
> > >
> > > My question is how can I find which one of those "variables" [var1,var2, .... ] was the maximum?!!
> > > I want not only the value but also the "name" of the variable as it has some good information for me....
> > >
> > > Regards;
> > >
> > > Shabnam Shahreza
> > > Alpha Group
> > > p: 647-259-0443
> > > c: 647-638-6440
> > > f: 416-642-2120
> > > 70 York Street, Suite 1501
> > > Toronto, ON M5J 1S9
> > > www.alpha-group.ca<http://www.alpha-group.ca/>
> > >
> > >
> > > Before printing, think about the environment
> > >
> > > ________________________________
> > > The information in this email is confidential and may be subject to solicitor-client privilege and laws relating to intellectual property. The information contained in this e-mail is intended solely for the addressee(s) and access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately and delete this email from your system without making a copy. You should not copy, use or disseminate the information contained in the email. Any views expressed in this email are those of the individual sender, and, except where the sender specifically indicates, do not reflect the views of Alpha Trading Systems Limited Partnership, its subsidiaries, affiliates, partners, directors, officers or employees.
> > >
> >
> >
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list