[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Tobias Oetiker
Hi Darryl,

the problem with writing books is that it does not pay ... so
unless there is some other business to leaverage with this, it is
realy yet another commmunity service ... if only my days were
longer and I would not have to work for food :-)

cheers
tobi


Today Darryl Lewis wrote:

>
> >>P.S.  Have any of you people who *really* understand rrdtool thought
> >>about writing an O'Reilly book about it?
>
> I don't understand it 100%, but yes, I've thought of it every time I have to 
> try and figure out how do something with it.
> It would need practical examples, both in shell script and in perl.
>
>
>
>
> ==
> The information contained in this email and any attachment is confidential and
> may contain legally privileged or copyright material.   It is intended only 
> for
> the use of the addressee(s).  If you are not the intended recipient of this
> email, you are not permitted to disseminate, distribute or copy this email or
> any attachments.  If you have received this message in error, please notify 
> the
> sender immediately and delete this email from your system.  The ABC does not
> represent or warrant that this transmission is secure or virus free.   Before
> opening any attachment you should check for viruses.  The ABC's liability is
> limited to resupplying any email and attachments
> ==
>
> --
> Unsubscribe mailto:[EMAIL PROTECTED]
> Helpmailto:[EMAIL PROTECTED]
> Archive http://lists.ee.ethz.ch/rrd-users
> WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://tobi.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9902

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Darryl Lewis

>>P.S.  Have any of you people who *really* understand rrdtool thought
>>about writing an O'Reilly book about it?

I don't understand it 100%, but yes, I've thought of it every time I have to 
try and figure out how do something with it.
It would need practical examples, both in shell script and in perl.




==
The information contained in this email and any attachment is confidential and
may contain legally privileged or copyright material.   It is intended only for
the use of the addressee(s).  If you are not the intended recipient of this
email, you are not permitted to disseminate, distribute or copy this email or
any attachments.  If you have received this message in error, please notify the
sender immediately and delete this email from your system.  The ABC does not
represent or warrant that this transmission is secure or virus free.   Before
opening any attachment you should check for viruses.  The ABC's liability is
limited to resupplying any email and attachments
==

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Ruttenberg, Tanya
I originally thought that would do the trick.  However, I've never
gotten the results I want.

For example, here is my original graph statement

rrdtool graph - \
 --start=end-86400 \
 --title=SSA-SRSW-NCC-W00C02 \
 --vertical-label=bandwidth % \
 --imgformat=PNG \
 --width=750 \
 --base=1000 \
 --height=180 \
 --interlaced \
 
DEF:a=/data1/cricket-data//NCC/ssa-srsw-ncc-w00c02_3-1_if.rrd:ifhcinocte
ts:AVERAGE \
 
DEF:b=/data1/cricket-data//NCC/ssa-srsw-ncc-w00c02_3-1_if.rrd:ifhcoutoct
ets:AVERAGE \
 CDEF:A=a,12500,/,100,* \
 CDEF:B=b,12500,/,100,* \
 LINE1:A#00:ifhcinoctets AVERAGE  \
 GPRINT:A:MIN:"Min\: %8.2lf%s" \
 GPRINT:A:AVERAGE:"Avg\: %8.2lf%s" \
 GPRINT:A:MAX:"Max\: %8.2lf%s" \
 GPRINT:A:LAST:"Last\: %8.2lf%s" \
 LINE1:B#FF:ifhcoutoctets AVERAGE \
 GPRINT:B:MIN:"Min\: %8.2lf%s" \
 GPRINT:B:AVERAGE:"Avg\: %8.2lf%s" \
 GPRINT:B:MAX:"Max\: %8.2lf%s" \
 GPRINT:B:LAST:"Last\: %8.2lf%s"

Gives me a nice graph.

I make the following changes removing everything related to the graph
and changing the GPRINTs to PRINTs:

rrdtool graph /var/tmp/out.txt \
 --start=end-86400 \
 
DEF:a=/data1/cricket-data//NCC/ssa-srsw-ncc-w00c02_3-1_if.rrd:ifhcinocte
ts:AVERAGE \
 
DEF:b=/data1/cricket-data//NCC/ssa-srsw-ncc-w00c02_3-1_if.rrd:ifhcoutoct
ets:AVERAGE \
 CDEF:A=a,12500,/,100,* \
 CDEF:B=b,12500,/,100,* \
 PRINT:A:MIN:"Min\: %8.2lf%s" \
 PRINT:A:AVERAGE:"Avg\: %8.2lf%s" \
 PRINT:A:MAX:"Max\: %8.2lf%s" \
 PRINT:A:LAST:"Last\: %8.2lf%s" \
 PRINT:B:MIN:"Min\: %8.2lf%s" \
 PRINT:B:AVERAGE:"Avg\: %8.2lf%s"\
 PRINT:B:MAX:"Max\: %8.2lf%s" \
 PRINT:B:LAST:"Last\: %8.2lf%s"

And get what I guess is the expected behavior, but it's not what I want:

Min:   486.93m
Avg:13.15
Max:97.81
Last: 2.23
Min: 1.43
Avg:31.61
Max:98.62
Last: 2.43

What I want is a list of datapoints that made up the LINE in the graph,
(preferably listed with a timestamp).

Tanya

P.S.  Have any of you people who *really* understand rrdtool thought
about writing an O'Reilly book about it?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex van den
Bogaerdt
Sent: Tuesday, October 24, 2006 11:50 AM
To: rrd-users@list.ee.ethz.ch
Subject: [rrd-users] Re: Printing a text report instead of a graph

On Tue, Oct 24, 2006 at 11:37:15AM -0400, Ruttenberg, Tanya wrote:

> I still think xport seems kind of messy--you have to wade through all 
> that XML to get your data.  But if noone has a different suggestion I 
> will go back to trying RRDs::xport.

erm... are you saying you want the result of GPRINT, but not in the
graph but rather as text?  If so: use PRINT.

--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Alex van den Bogaerdt
On Tue, Oct 24, 2006 at 11:37:15AM -0400, Ruttenberg, Tanya wrote:

> I still think xport seems kind of messy--you have to wade through all
> that XML to get your data.  But if noone has a different suggestion I
> will go back to trying RRDs::xport.

erm... are you saying you want the result of GPRINT, but not in the
graph but rather as text?  If so: use PRINT.

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Andreas Maus
On Tue, Oct 24, 2006 at 11:37:15AM -0400, Ruttenberg, Tanya wrote:
Hi Tanya.
> I *do* think it seems more like a buffering issue than an xport issue as
> I said.

> I think I must have first tried RRDs::xport first. I wonder why I didn't
> use it?  
> 
> I still think xport seems kind of messy--you have to wade through all
> that XML to get your data.  But if noone has a different suggestion I
> will go back to trying RRDs::xport.
Note: If you use RRDs::xport you don't have to parse XML.

RRSs::xport returns an array with all the information you need.

I posted sample code some months ago. Search for "Re: rrd fetch and RPN"
or look directly at: http://lists.ee.ethz.ch/rrd-users/msg11005.html

(Hint: You can also take a look at shared-demo.pl which ships
with rrdtool - at least in the .tar.gz).

HTH,

Andreas.

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
mail: [EMAIL PROTECTED]   72070 Tuebingen, Germany
tel.: +49 7071 9457 456 www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Ruttenberg, Tanya
I *do* think it seems more like a buffering issue than an xport issue as
I said.

I think I must have first tried RRDs::xport first. I wonder why I didn't
use it?  

I still think xport seems kind of messy--you have to wade through all
that XML to get your data.  But if noone has a different suggestion I
will go back to trying RRDs::xport.

Thanks.

-Original Message-
From: Andreas Maus [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 24, 2006 11:34 AM
To: Ruttenberg, Tanya
Cc: rrd-users@list.ee.ethz.ch
Subject: Re: [rrd-users] Re: Printing a text report instead of a graph

On Tue, Oct 24, 2006 at 11:08:30AM -0400, Ruttenberg, Tanya wrote:
Hi Tanya.

> I have a perl script that generates a list of around 300 rrd files and

> cranks through each one, producing an xport for each one.  I use 
> RRDp::cmd with xport.
>
> The main issue we've seen I posted about previously to this list in a 
> post called "Rrdxport issues".
Ah, yes. Found that post.

Hmmm ... After a very fast look at RRDp.pm it seems that it will call
rrdtool directly und uses its output.
Usually stdout/stdin are buffered and maybe the buffering produces this
mess. (Just a wild guess ;)

I used RRDs::xport inside a perl-Script for about 200 Hosts (two RRD
files per host) without any problems.

> It seems like it might be an output buffering issue rather than an 
> rrdxport issue, but I haven't been able to fix it in any case.
Could you try RRDs::xport instead? It is directly linked against librrd
(at least it doesn't call rrdtool directly).

HTH,

Andreas.

P.S.: _If_ RRDs::xport work I guess you should report this bug with
RRDp::cmd

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
mail: [EMAIL PROTECTED]   72070 Tuebingen, Germany
tel.: +49 7071 9457 456 www.science-computing.de

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Andreas Maus
On Tue, Oct 24, 2006 at 11:08:30AM -0400, Ruttenberg, Tanya wrote:
Hi Tanya.
> I have a perl script that generates a list of around 300 rrd files and
> cranks through each one, producing an xport for each one.  I use
> RRDp::cmd with xport.
>
> The main issue we've seen I posted about previously to this list in a
> post called "Rrdxport issues".
Ah, yes. Found that post.

Hmmm ... After a very fast look at RRDp.pm it seems
that it will call rrdtool directly und uses its output.
Usually stdout/stdin are buffered and maybe the buffering
produces this mess. (Just a wild guess ;)

I used RRDs::xport inside a perl-Script for about 200 Hosts
(two RRD files per host) without any problems.

> It seems like it might be an output buffering issue rather than an
> rrdxport issue, but I haven't been able to fix it in any case.
Could you try RRDs::xport instead? It is directly linked against
librrd (at least it doesn't call rrdtool directly).

HTH,

Andreas.

P.S.: _If_ RRDs::xport work I guess you should report this bug
with RRDp::cmd

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
mail: [EMAIL PROTECTED]   72070 Tuebingen, Germany
tel.: +49 7071 9457 456 www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Ruttenberg, Tanya
I have a perl script that generates a list of around 300 rrd files and
cranks through each one, producing an xport for each one.  I use
RRDp::cmd with xport.

The main issue we've seen I posted about previously to this list in a
post called "Rrdxport issues".

It seems like it might be an output buffering issue rather than an
rrdxport issue, but I haven't been able to fix it in any case.



-Original Message-
From: Andreas Maus [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 24, 2006 10:37 AM
To: Ruttenberg, Tanya
Cc: rrd-users@list.ee.ethz.ch
Subject: Re: [rrd-users] Printing a text report instead of a graph

On Tue, Oct 24, 2006 at 10:27:17AM -0400, Ruttenberg, Tanya wrote:
Hi Tanya.

> I have been using rrdtool for over a year and I have yet to figure out

> a reliable way to print my data in a textual report rather than as a 
> graph.
> What is the best way to do this?  I have tried rrdtool xport, but have

> encountered some problems with it that I can't figure out.
I prefer rrdtool xport ;)
What is/was your problem with xport?
Which "language" are we talking about? Shell? Perl? Something else?

> Advice?
Again rrdtool xport ;)

Andreas.

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
mail: [EMAIL PROTECTED]   72070 Tuebingen, Germany
tel.: +49 7071 9457 456 www.science-computing.de

--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi



[rrd-users] Re: Printing a text report instead of a graph

2006-10-24 Thread Andreas Maus
On Tue, Oct 24, 2006 at 10:27:17AM -0400, Ruttenberg, Tanya wrote:
Hi Tanya.
> I have been using rrdtool for over a year and I have yet to figure out a
> reliable way to print my data in a textual report rather than as a
> graph.
> What is the best way to do this?  I have tried rrdtool xport, but have
> encountered some problems with it that I can't figure out.  
I prefer rrdtool xport ;)
What is/was your problem with xport?
Which "language" are we talking about? Shell? Perl? Something else?

> Advice?
Again rrdtool xport ;)

Andreas.

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
mail: [EMAIL PROTECTED]   72070 Tuebingen, Germany
tel.: +49 7071 9457 456 www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:[EMAIL PROTECTED]
Helpmailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi