[rrd-users] Getting AVG info from RRD Files
Juvenal Carvalho
juniorfc at terra.com.br
Mon Dec 5 19:49:16 CET 2011
Thanks David for share you script.
I've made some adjustments to my data (traffic that I got from the MRTG) and I got this result. If i look at my graph (attached graph_mrtg.GIF), those are not the values.
What am I doing wrong ? Is the PRINT line wrong written ?
[root at mrtg rrd]# /usr/local/rrdtool/bin/rrdtool graph ~jcarvalho/rrd/AVG.png --width=1000 --height=125 -l 0 \
> DEF:inbytes=target.rrd:ds0:AVERAGE \
> DEF:outbytes=target.rrd:ds1:AVERAGE \
> CDEF:inbits=inbytes,8,* \
> CDEF:outbits=outbytes,8,* \
> PRINT:inbits:AVERAGE:"Average IN\: %10.0lf" \
> PRINT:outbits:AVERAGE:"Average OUT\: %10.0lf" \
>
0x0
Average IN: 9776
Average OUT: 84365
From: David OBrien
Sent: Monday, November 28, 2011 16:51
To: Juvenal Carvalho
Cc: j.halifax2 at seznam.cz ; rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] Getting AVG info from RRD Files
root at www:/www/collector# cat ptest.sh
rrdtool graph $GRAPHDIR/workerstats_$DATE.png --width=1000 --height=125 -l 0 \
DEF:connsused=apache.rrd:busy:LAST \
DEF:connsmax=apache.rrd:idle:LAST \
CDEF:zero=connsused,0,* \
CDEF:ru=connsused,1,* \
CDEF:rf=connsmax,1,* \
PRINT:ru:LAST:"Used Connections\: %10.0lf" \
PRINT:rf:LAST:"Free Connections\: %10.0lf" \
root at www:/www/collector# sh ./ptest.sh
0x0
Used Connections: 249
Free Connections: 148
2011/11/28 Juvenal Carvalho <juniorfc at terra.com.br>
I don't have this option. There is another way to get the information ?
[root at mrtg rrd]# /usr/local/rrdtool/bin/rrdtool
RRDtool 1.0.43 Copyright 1997-2001 by Tobias Oetiker <tobi at oetiker.ch>
Usage: rrdtool [options] command command_options
Valid commands: create, update, graph, dump, restore,
last, info, fetch, tune, resize, xport
RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)
For more information read the RRD manpages
--------------------------------------------------
From: <j.halifax2 at seznam.cz>
Sent: Monday, November 28, 2011 15:48
To: "Juvenal Carvalho" <juniorfc at terra.com.br>
Cc: <rrd-users at lists.oetiker.ch>
Subject: Re: [rrd-users] Getting AVG info from RRD Files
>
>> do I need I more recent version ?
>
> I don't think so, it isn't a new feature.
> jh
>
>> ------------ Původní zpráva ------------
>> Od: Juvenal Carvalho <juniorfc at terra.com.br>
>> Předmět: Re: [rrd-users] Getting AVG info from RRD Files
>> Datum: 28.11.2011 18:45:03
>> ----------------------------------------
>> do I need I more recent version ?
>>
>> [root at mrtg rrd]# /usr/local/rrdtool/bin/rrdtool print -s -1y target.rrd
>> AVERAGE
>> ERROR: unknown function 'print'
>> [root at mrtg rrd]# /usr/local/rrdtool/bin/rrdtool
>> RRDtool 1.0.43 Copyright 1997-2001 by Tobias Oetiker <tobi at oetiker.ch>
>>
>>
>> --------------------------------------------------
>> From: <j.halifax2 at seznam.cz>
>> Sent: Monday, November 28, 2011 15:41
>> To: "Juvenal Carvalho" <juniorfc at terra.com.br>
>> Cc: <rrd-users at lists.oetiker.ch>
>> Subject: Re: [rrd-users] Getting AVG info from RRD Files
>>
>> >
>> >> How can I get just 1 value
>> >
>> > Use PRINT instead of fetch
>> > jh
>> >
>> >
>> >> ------------ Původní zpráva ------------
>> >> Od: Juvenal Carvalho <juniorfc at terra.com.br>
>> >> Předmět: Re: [rrd-users] Getting AVG info from RRD Files
>> >> Datum: 28.11.2011 18:22:28
>> >> ----------------------------------------
>> >> Hi Guys
>> >>
>> >> I tried to check the documentation but got no success. I ran the
>> >> command below
>> >> and I got a lot of values and I don't know how to treat those values
>> >> in a
>> >> readable format.
>> >>
>> >>
>> >>
>> >> /usr/local/rrdtool/bin/rrdtool fetch -s -1y target.rrd AVERAGE
>> >>
>> >>
>> >>
>> >> In the attached file I have the result.
>> >>
>> >>
>> >>
>> >> How can I get just 1 value (as is printed in the MRTG graph as
>> >> average) ? For
>> >> example, IN: 16MB/s OUT: 5MB/s
>> >>
>> >>
>> >> Thanks
>> >>
>> >>
>> >> Juvenal
>> >>
>> >>
>> >>
>> >> From: Juvenal Carvalho
>> >> Sent: Wednesday, November 16, 2011 15:52
>> >> To: rrd-users at lists.oetiker.ch
>> >> Subject: Getting AVG info from RRD Files
>> >>
>> >>
>> >> Hi everybody
>> >>
>> >> I'm new working with advanced RRD resources and I'm trying to use my
>> >> data to
>> >> collect some relevant information.
>> >>
>> >> I have a question about how to get the AVG information from a RRD file
>> >> created
>> >> by MRTG.
>> >> I need to get the average from the last month (just the numbers) and
>> >> send it by
>> >> email to a group of users but I don't know how to do it.
>> >>
>> >> Do you know I have a way to get this info ?
>> >>
>> >>
>> >>
>> >> Thanks !
>> >>
>> >>
>> >> Juvenal
>> >>
>> >>
>> >
>> > Esta mensagem foi verificada pelo E-mail Protegido Terra.
>> > Atualizado em 31/12/1969
>> >
>> >
>>
>>
>>
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Atualizado em 05/09/2011
>
>
_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--------------------------------------------------------------------------------
Esta mensagem foi verificada pelo E-mail Protegido Terra.
Atualizado em 31/12/1969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20111205/1f53e2ac/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph_mrtg.GIF
Type: image/gif
Size: 8930 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20111205/1f53e2ac/attachment-0001.gif
More information about the rrd-users
mailing list