py-rrdtool-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[py-rrdtool-users] RE: py-rrdtool usage (Markus Törnqvist)


From: Reuben Stump
Subject: [py-rrdtool-users] RE: py-rrdtool usage (Markus Törnqvist)
Date: Fri, 14 Mar 2003 14:23:47 -0500

Markus,

It wasn't so bad to make use of, it's much like Perl's bindings.  I've converted my old CGI from Perl to Python and have had 0 issues so far, though to be honest, I haven't been using more than RRD::Graph at this point.

I thought I might pass on what I found in the past, it might get you started.

Each option passed to the RRD commands must be placed a seperate parameter to RRD functions.  So you can't just create one long string and send it into the function.

Once you get passed this, it's pretty much the same as you commands you're used to.

import rrdtool

try:
        aDictionary = rrdtool.info('/var/rrd/AnRRD.log')
except rrdtool.error, err:
        print "RRD error:", err


Same for Graphing:

try:
        size = rrdtool.graph('demo.gif','--title="Demo Graph"',
                'DEF:cel=demo.rrd:exhaust:AVERAGE', 'CDEF:far=cel,1.8,*,32,+',
                'LINE2:cel#00a000:"D. Celsius"', 'LINE2:far#ff0000:"D. Fahrenheit"')
except rrdtool.error, err:
        print "RRD Error:", err







> Reuben M. Stump
Senior Test Engineer, System III
Citrix Systems, Inc

Phone: 954.229.6386
FAX:    954.229.6175
Email:  address@hidden
<mailto:address@hidden>


-----Original Message-----
From: address@hidden
[mailto:address@hidden]
Sent: Friday, March 14, 2003 12:05 PM
To: address@hidden
Subject: py-rrdtool-users Digest, Vol 3, Issue 1


Send py-rrdtool-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.nongnu.org/mailman/listinfo/py-rrdtool-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of py-rrdtool-users digest..."


Today's Topics:

   1. py-rrdtool usage (Markus Törnqvist)
   2. py-rrdtool usage (Markus Törnqvist)


----------------------------------------------------------------------

Date: Fri, 14 Mar 2003 13:48:31 +0200
From: "Markus Törnqvist" <address@hidden>
To: address@hidden
Subject: [py-rrdtool-users] py-rrdtool usage
Message-ID: <address@hidden>
Content-Type: text/plain; charset=iso-8859-1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: list
Message: 1

Hi!

I would like to inquire about the state of documentation.

Reading the source code did not give me much help, since I'm not a master
programmer and pretty unacquainted with C, so what if someone put up
at least an example on creating an rrd file?

When I checked with pydoc, it looked more like a copypaste from the shell
commands. Like wtf. Naturally python spew error messages at me when it
didn't work.

This total lack of consideration for users is disturbing, to put it mildly.
Why would anyone want to create a utility that's neither documented
nor usable?
I hope someone out there re-implements rrd in python, if the situation is
not corrected. Just take a look at python-cdb's documentation, it's not
much, but it states clearly how it's used. Can't have taken more than
two minutes to write it.

Oh well, guess I have to write everything with os.system().

Awaiting your reply,

--
Markus Törnqvist



------------------------------

Date: Fri, 14 Mar 2003 13:37:18 +0200
From: "Markus Törnqvist" <address@hidden>
To: address@hidden
Subject: [py-rrdtool-users] py-rrdtool usage
Message-ID: <address@hidden>
Content-Type: text/plain; charset=iso-8859-1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Precedence: list
Message: 2

Hi!

I would like to inquire about the state of documentation.

Reading the source code did not give me much help, since I'm not a master
programmer and pretty unacquainted with C, so what if someone put up
at least an example on creating an rrd file?

When I checked with pydoc, it looked more like a copypaste from the shell
commands. Like wtf. Naturally python spew error messages at me when it
didn't work.

This total lack of consideration for users is disturbing, to put it mildly.
Why would anyone want to create a utility that's neither documented
nor usable?
I hope someone out there re-implements rrd in python, if the situation is
not corrected. Just take a look at python-cdb's documentation, it's not
much, but it states clearly how it's used. Can't have taken more than
two minutes to write it.

Oh well, guess I have to write everything with os.system().

Awaiting your reply,

--
Markus Törnqvist



------------------------------

_______________________________________________
py-rrdtool-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/py-rrdtool-users


End of py-rrdtool-users Digest, Vol 3, Issue 1
**********************************************


reply via email to

[Prev in Thread] Current Thread [Next in Thread]