<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-2 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19154"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>Thanks David for share you script. </FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>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. </FONT></DIV>
<DIV><FONT face=Calibri>What am I doing wrong ? Is the PRINT line wrong written
?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>[root@mrtg rrd]# /usr/local/rrdtool/bin/rrdtool graph
~jcarvalho/rrd/AVG.png --width=1000 --height=125 -l 0
\<BR>>
DEF:inbytes=target.rrd:ds0:AVERAGE
\<BR>>
DEF:outbytes=target.rrd:ds1:AVERAGE
\<BR>>
CDEF:inbits=inbytes,8,*
\<BR>>
CDEF:outbits=outbytes,8,*
\<BR>>
PRINT:inbits:AVERAGE:"Average IN\: %10.0lf"
\<BR>>
PRINT:outbits:AVERAGE:"Average OUT\: %10.0lf" \<BR>><BR>0x0<BR>Average
IN: 9776<BR>Average
OUT: 84365<BR></FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=dgobrien@gmail.com
href="mailto:dgobrien@gmail.com">David OBrien</A> </DIV>
<DIV><B>Sent:</B> Monday, November 28, 2011 16:51</DIV>
<DIV><B>To:</B> <A title=juniorfc@terra.com.br
href="mailto:juniorfc@terra.com.br">Juvenal Carvalho</A> </DIV>
<DIV><B>Cc:</B> <A
title="mailto:j.halifax2@seznam.cz CTRL + Click to follow link"
href="mailto:j.halifax2@seznam.cz">j.halifax2@seznam.cz</A> ; <A
title="mailto:rrd-users@lists.oetiker.ch CTRL + Click to follow link"
href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</A> </DIV>
<DIV><B>Subject:</B> Re: [rrd-users] Getting AVG info from RRD
Files</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV><A title="mailto:root@www:/www/collector CTRL + Click to follow link"
href="mailto:root@www:/www/collector">root@www:/www/collector</A># cat
ptest.sh</DIV>
<DIV>rrdtool graph $GRAPHDIR/workerstats_$DATE.png --width=1000 --height=125 -l
0 \</DIV>
<DIV>
DEF:connsused=apache.rrd:busy:LAST \</DIV>
<DIV> DEF:connsmax=apache.rrd:idle:LAST
\</DIV>
<DIV> CDEF:zero=connsused,0,* \</DIV>
<DIV> CDEF:ru=connsused,1,* \</DIV>
<DIV> CDEF:rf=connsmax,1,* \</DIV>
<DIV> PRINT:ru:LAST:"Used Connections\:
%10.0lf" \</DIV>
<DIV> PRINT:rf:LAST:"Free Connections\:
%10.0lf" \</DIV>
<DIV><BR></DIV>
<DIV><A href="mailto:root@www:/www/collector">root@www:/www/collector</A># sh
./ptest.sh</DIV>
<DIV>0x0</DIV>
<DIV>Used Connections: 249</DIV>
<DIV>Free Connections: 148</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV><BR>
<DIV class=gmail_quote>2011/11/28 Juvenal Carvalho <SPAN dir=ltr><<A
href="mailto:juniorfc@terra.com.br">juniorfc@terra.com.br</A>></SPAN><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>I don't have this option. There is another way to get the
information ?<BR><BR><BR><BR>[root@mrtg rrd]#
/usr/local/rrdtool/bin/rrdtool<BR>
<DIV class=im>RRDtool 1.0.43 Copyright 1997-2001 by Tobias Oetiker
<<A
href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</A>><BR><BR></DIV>Usage:
rrdtool [options] command command_options<BR><BR>Valid commands: create,
update, graph, dump, restore,<BR>
last, info, fetch, tune, resize, xport<BR><BR>RRDtool is
distributed under the Terms of the GNU General<BR>Public License Version 2.
(<A href="http://www.gnu.org/copyleft/gpl.html"
target=_blank>www.gnu.org/copyleft/gpl.html</A>)<BR><BR>For more information
read the RRD
manpages<BR><BR><BR><BR>--------------------------------------------------<BR>From:
<<A
href="mailto:j.halifax2@seznam.cz">j.halifax2@seznam.cz</A>><BR>Sent:
Monday, November 28, 2011 15:48<BR>
<DIV>
<DIV class=h5>To: "Juvenal Carvalho" <<A
href="mailto:juniorfc@terra.com.br">juniorfc@terra.com.br</A>><BR>Cc:
<<A
href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</A>><BR>Subject:
Re: [rrd-users] Getting AVG info from RRD Files<BR><BR>><BR>>> do I
need I more recent version ?<BR>><BR>> I don't think so, it isn't a new
feature.<BR>> jh<BR>><BR>>> ------------ Původní zpráva
------------<BR>>> Od: Juvenal Carvalho <<A
href="mailto:juniorfc@terra.com.br">juniorfc@terra.com.br</A>><BR>>>
Předmět: Re: [rrd-users] Getting AVG info from RRD Files<BR>>> Datum:
28.11.2011 18:45:03<BR>>>
----------------------------------------<BR>>> do I need I more recent
version ?<BR>>><BR>>> [root@mrtg rrd]#
/usr/local/rrdtool/bin/rrdtool print -s -1y target.rrd<BR>>>
AVERAGE<BR>>> ERROR: unknown function 'print'<BR>>> [root@mrtg
rrd]# /usr/local/rrdtool/bin/rrdtool<BR>>> RRDtool 1.0.43
Copyright 1997-2001 by Tobias Oetiker <<A
href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</A>><BR>>><BR>>><BR>>>
--------------------------------------------------<BR>>> From: <<A
href="mailto:j.halifax2@seznam.cz">j.halifax2@seznam.cz</A>><BR>>>
Sent: Monday, November 28, 2011 15:41<BR>>> To: "Juvenal Carvalho"
<<A
href="mailto:juniorfc@terra.com.br">juniorfc@terra.com.br</A>><BR>>>
Cc: <<A
href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</A>><BR>>>
Subject: Re: [rrd-users] Getting AVG info from RRD
Files<BR>>><BR>>> ><BR>>> >> How can I get just 1
value<BR>>> ><BR>>> > Use PRINT instead of fetch<BR>>>
> jh<BR>>> ><BR>>> ><BR>>> >> ------------
Původní zpráva ------------<BR>>> >> Od: Juvenal Carvalho <<A
href="mailto:juniorfc@terra.com.br">juniorfc@terra.com.br</A>><BR>>>
>> Předmět: Re: [rrd-users] Getting AVG info from RRD Files<BR>>>
>> Datum: 28.11.2011 18:22:28<BR>>> >>
----------------------------------------<BR>>> >> Hi
Guys<BR>>> >><BR>>> >> I tried to check the
documentation but got no success. I ran the<BR>>> >> command
below<BR>>> >> and I got a lot of values and I don't know how to
treat those values<BR>>> >> in a<BR>>> >> readable
format.<BR>>> >><BR>>> >><BR>>>
>><BR>>> >> /usr/local/rrdtool/bin/rrdtool fetch -s -1y
target.rrd AVERAGE<BR>>> >><BR>>> >><BR>>>
>><BR>>> >> In the attached file I have the
result.<BR>>> >><BR>>> >><BR>>>
>><BR>>> >> How can I get just 1 value (as is printed
in the MRTG graph as<BR>>> >> average) ? For<BR>>> >>
example, IN: 16MB/s OUT: 5MB/s<BR>>> >><BR>>>
>><BR>>> >> Thanks<BR>>> >><BR>>>
>><BR>>> >> Juvenal<BR>>> >><BR>>>
>><BR>>> >><BR>>> >> From: Juvenal
Carvalho<BR>>> >> Sent: Wednesday, November 16, 2011
15:52<BR>>> >> To: <A
href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</A><BR>>>
>> Subject: Getting AVG info from RRD Files<BR>>>
>><BR>>> >><BR>>> >> Hi everybody<BR>>>
>><BR>>> >> I'm new working with advanced RRD resources and
I'm trying to use my<BR>>> >> data to<BR>>> >> collect
some relevant information.<BR>>> >><BR>>> >> I have a
question about how to get the AVG information from a RRD file<BR>>>
>> created<BR>>> >> by MRTG.<BR>>> >> I need to
get the average from the last month (just the numbers) and<BR>>>
>> send it by<BR>>> >> email to a group of users but I don't
know how to do it.<BR>>> >><BR>>> >> Do you know I
have a way to get this info ?<BR>>> >><BR>>>
>><BR>>> >><BR>>> >> Thanks !<BR>>>
>><BR>>> >><BR>>> >> Juvenal<BR>>>
>><BR>>> >><BR>>> ><BR>>> > Esta mensagem
foi verificada pelo E-mail Protegido Terra.<BR>>> > Atualizado em
31/12/1969<BR>>> ><BR>>>
><BR>>><BR>>><BR>>><BR>><BR>> Esta mensagem foi
verificada pelo E-mail Protegido Terra.<BR></DIV></DIV>> Atualizado em
05/09/2011<BR>
<DIV class=HOEnZb>
<DIV
class=h5>><BR>><BR><BR>_______________________________________________<BR>rrd-users
mailing list<BR><A
href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</A><BR><A
href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users"
target=_blank>https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR>
<P style="CLEAR: both">
<HR align=left SIZE=2 width=400>
<FONT size=2 face="trebuchet MS, arial">Esta mensagem foi verificada pelo E-mail
Protegido Terra.<BR>Atualizado em 31/12/1969<BR></FONT>
<P></P></BODY></HTML>