[rrd-users] rrd-users Digest, Vol 30, Issue 9

Hans Schulz hans at vega.demon.nl
Thu Jun 25 20:28:51 CEST 2009


I noticed that the RRDTool version that came with Ubuntu 9.04 uses pango
as text renderer and that my (Perl) scripts that worked well with
rrdtool under the previous versions had problems with that. Especially,
when running rrdgraph I got error messages about invalid codes etc.
I converted all scripts to UTF-8 using iconv and that solved it for me.
It is remarkable that, although there is a lot of discussion on the Net
about rrdtool and pango on this specific subject, that no-one mentions
this very simple solution.
Perhaps this issue is worth being addressed in the docs.
cheers
hans schulz

Op donderdag 25-06-2009 om 11:42 uur [tijdzone +0200], schreef
rrd-users-request at lists.oetiker.ch:
> Send rrd-users mailing list submissions to
> 	rrd-users at lists.oetiker.ch
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> or, via email, send a message with subject or body 'help' to
> 	rrd-users-request at lists.oetiker.ch
> 
> You can reach the person managing the list at
> 	rrd-users-owner at lists.oetiker.ch
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rrd-users digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Generate rrd graph in real time (Robert Hagens)
>    2. Biased graph - shifted average periods (Igor I. Shulz)
>    3. Re: Generate rrd graph in real time (William R. Lorenz)
>    4. Uses for RRD besides graphs... (Joshua Toyota)
>    5. Is php-rrdtool really necessary? -- was: Generate rrd	graph
>       in real time (Eduardo Bragatto)
>    6. Re: Generate rrd graph in real time (David Thornton)
>    7. Re: Generate rrd graph in real time (frankie)
>    8. Re: Biased graph - shifted average periods (Simon Hobson)
>    9. VDEF creates different Minimums (Rothe)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 24 Jun 2009 08:18:33 -0700
> From: "Robert Hagens" <rhagens at envysion.com>
> Subject: Re: [rrd-users] Generate rrd graph in real time
> To: "Simon Hobson" <linux at thehobsons.co.uk>,
> 	<rrd-users at lists.oetiker.ch>
> Message-ID:
> 	<271D6D43F249314EB218B0F9A0F704CE01685A71 at EXVBE012-14.exch012.intermedia.net>
> 	
> Content-Type: text/plain;	charset="us-ascii"
> 
> Hi,
> I couldn't get php-rrdtool to work, it seems that support has stopped
> for it. I could be wrong. I do all my work in php, and fire up rrdtool
> as a separate process, and pipe commands to/from it from php.
> 
> Rob
> 
>  
> 
> Robert Hagens | Chief Technical Officer| Envysion, Inc. 
> 
> 950 Spruce Street | Louisville, CO 80027
> 
> 303.590.2365 office | 303.590.2351 fax
> 
> rhagens at envysion.com | www.envysion.com | Visit our blog
> 
> 
> -----Original Message-----
> From: rrd-users-bounces at lists.oetiker.ch
> [mailto:rrd-users-bounces at lists.oetiker.ch] On Behalf Of Simon Hobson
> Sent: Wednesday, June 24, 2009 8:51 AM
> To: rrd-users at lists.oetiker.ch
> Subject: Re: [rrd-users] Generate rrd graph in real time
> 
> frankie wrote:
> >Hi all,  I want to generate the graph realtime when the web page is
> visited
> >by someone similar to cacti . Is php-rrdtool is the only way to do it?
> 
> No. I do it at work with a bash script and rrdtool, but I suspect php 
> or perl would be better as the bash script is not pretty !
> 
> See
> https://lists.oetiker.ch/pipermail/rrd-users/2009-January/015167.html
> 
> -- 
> Simon Hobson
> 
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 24 Jun 2009 15:22:49 +0400
> From: Igor I.  Shulz <ishulz at mail.ru>
> Subject: [rrd-users] Biased graph - shifted average periods
> To: rrd-users at lists.oetiker.ch
> Message-ID: <E1MJQYz-00063U-00.ishulz-mail-ru at f58.mail.ru>
> Content-Type: text/plain; charset=koi8-r
> 
> Help pls
> My brain is boiling out.
> 
> I've created rrd-file to accumulate data on a per-hour-basis (--step 3600). Thre are two AVERAGE sets:
> RRA:AVERAGE:0.5:4:62
> RRA:AVERAGE:0.5:24:45
> 
> --start set on the edge of a day - 1242248400
> 
> But 4-hour averages are not set on even 4-hour ranges (00:00, 04:00, 08:00 etc), but are set on ranges 03:00, 07:00, 11:00. This is part of dump of my rrd-file:
> 
>                 <cf> AVERAGE </cf>
>                 <pdp_per_row> 4 </pdp_per_row> <!-- 14400 seconds -->
>                 <xff> 5.0000000000e-01 </xff>
> ...
>                 <database>
>                         <!-- 2009-05-03 19:00:00 EEST / 1241366400 --> <row><v> NaN .........
>                         <!-- 2009-05-03 23:00:00 EEST / 1241380800 --> <row><v> NaN .........
>                         <!-- 2009-05-04 03:00:00 EEST / 1241395200 --> <row><v> NaN .........
>                         <!-- 2009-05-04 07:00:00 EEST / 1241409600 --> <row><v> NaN .........
> 
> Daily average (by 24 points) is also shifted - periods are not 00:00-23:59, but 03:00-02:59:
> 
>                 <cf> AVERAGE </cf>
>                 <pdp_per_row> 24 </pdp_per_row> <!-- 86400 seconds -->
>                 <xff> 5.0000000000e-01 </xff>
> ............
>                 <database>
>                         <!-- 2009-03-30 03:00:00 EEST / 1238371200 --> <row><v> NaN ....
>                         <!-- 2009-03-31 03:00:00 EEST / 1238457600 --> <row><v> NaN .... 
>                         <!-- 2009-04-01 03:00:00 EEST / 1238544000 --> <row><v> NaN ....
> 
> As result I have ugly shifted line on a graphs.
> 
> Is it possible to set average periods on the more reasonable points?
> 00:00, 04:00 ... for 4-hour average
> and
> 00:00, 00:00 ... for daily average
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 24 Jun 2009 12:17:51 -0400 (EDT)
> From: "William R. Lorenz" <wrl at express.org>
> Subject: Re: [rrd-users] Generate rrd graph in real time
> To: Robert Hagens <rhagens at envysion.com>
> Cc: rrd-users at lists.oetiker.ch
> Message-ID: <Pine.LNX.4.64.0906241209040.23015 at pluto.express.org>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> 
> Hello,
> 
> On Wed, 24 Jun 2009, Robert Hagens wrote:
> 
> > I couldn't get php-rrdtool to work, it seems that support has stopped 
> > for it. I could be wrong. I do all my work in php, and fire up rrdtool 
> > as a separate process, and pipe commands to/from it from php.
> 
> > frankie wrote:
> 
> >>> Hi all, I want to generate the graph realtime when the web page is 
> >>> visited by someone similar to cacti . Is php-rrdtool is the only way 
> >>> to do it?
> 
> >> No. I do it at work with a bash script and rrdtool, but I suspect php 
> >> or perl would be better as the bash script is not pretty !  See 
> >> https://lists.oetiker.ch/pipermail/rrd-users/2009-January/015167.html
> 
> 
> It is also possible to reference a PHP script for an image, i.e.:
> 
>    <img src="/rrd-image-script.php" />
> 
> In the top of that PHP script, you will need to add the following, BEFORE 
> ANYTHING ELSE, to specify the document is a binary-encoded PNG image:
> 
>    <?php
>    header("Content-Type: image/png\n");
>    header("Content-Transfer-Encoding: binary");
>    ?>
> 
> At that point, you can just call out to rrdtool to get the image data, 
> using something akin to <?=system("rrdtool graph - OPTIONS")?> (of course, 
> please the OPTIONS with your options).  The '-' prints to stdout, and thus 
> returns the image data via the system call to the page for its transfer.
> 
> This is, in my opinion, the easiest method to produce dynamic PHP graphs. 
> You can also call out to /rrd-image-script.php?name=mygraph&param1=val1 or 
> specify other variables that should be passed in on the HTTP GET string, 
> which will allow you to generate more than one graph from the same script.
> 
> Hope this helps,
> 
> 
> -- 
> William R. Lorenz
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 24 Jun 2009 23:43:29 -0400
> From: Joshua Toyota <jearsh at gmail.com>
> Subject: [rrd-users] Uses for RRD besides graphs...
> To: rrd-users at lists.oetiker.ch
> Message-ID:
> 	<5045aab20906242043s4ecb1891v6b9def439a5fc2f7 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hello,
> 
> I was wondering if anyone has used RRD(Tool) for anything besides
> generating graphs.  At the moment, I am working on a project where I
> need to pull up data based on different time periods, (today, this
> week, this month).  However, the way I am presenting the information
> isn't in a graph.  Has anyone done anything similar to this?
> 
> Thanks,
> 
> jearsh
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Thu, 25 Jun 2009 00:41:56 -0300
> From: Eduardo Bragatto <eduardo at bragatto.com>
> Subject: [rrd-users] Is php-rrdtool really necessary? -- was: Generate
> 	rrd	graph in real time
> To: rrd-users at lists.oetiker.ch
> Message-ID: <AEF7472F-C3F3-4C05-A347-F916E7478CEB at bragatto.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
> 
> On Jun 24, 2009, at 12:18 PM, Robert Hagens wrote:
> 
> > Hi,
> > I couldn't get php-rrdtool to work, it seems that support has stopped
> > for it. I could be wrong. I do all my work in php, and fire up rrdtool
> > as a separate process, and pipe commands to/from it from php.
> 
> I've tried using it in the past and although I could get it compiled  
> and running, it seemed to be unstable and failed to work correctly in  
> certain situations -- it was a long time ago, don't ask for details.
> 
> However, because of that first bad experience and the fact that I  
> haven't heard of any development on the php module, I gave up using it  
> and I'm using system() calls to run rrdtool from a php script.
> 
> Does anyone know, if there's any _considerable_ performance  
> degradation by using system() calls instead of having internal calls  
> directly to the rrdtool functions?
> 
> 
> - Eduardo Bragatto
> 
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Wed, 24 Jun 2009 23:49:40 -0400
> From: David Thornton <northdot9 at gmail.com>
> Subject: Re: [rrd-users] Generate rrd graph in real time
> To: "William R. Lorenz" <wrl at express.org>
> Cc: rrd-users at lists.oetiker.ch
> Message-ID:
> 	<3f6b9a460906242049r2a33bf63ua412a6417d7c84c0 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> you want rrdcgi
> 
> it's great I love it.
> 
> it's a cgi script that does exactly what you want (I think)
> 
> http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html
> 
> David
> 
> On Wed, Jun 24, 2009 at 12:17 PM, William R. Lorenz<wrl at express.org> wrote:
> > Hello,
> >
> > On Wed, 24 Jun 2009, Robert Hagens wrote:
> >
> >> I couldn't get php-rrdtool to work, it seems that support has stopped
> >> for it. I could be wrong. I do all my work in php, and fire up rrdtool
> >> as a separate process, and pipe commands to/from it from php.
> >
> >> frankie wrote:
> >
> >>>> Hi all, I want to generate the graph realtime when the web page is
> >>>> visited by someone similar to cacti . Is php-rrdtool is the only way
> >>>> to do it?
> >
> >>> No. I do it at work with a bash script and rrdtool, but I suspect php
> >>> or perl would be better as the bash script is not pretty ! ?See
> >>> https://lists.oetiker.ch/pipermail/rrd-users/2009-January/015167.html
> >
> >
> > It is also possible to reference a PHP script for an image, i.e.:
> >
> > ? <img src="/rrd-image-script.php" />
> >
> > In the top of that PHP script, you will need to add the following, BEFORE
> > ANYTHING ELSE, to specify the document is a binary-encoded PNG image:
> >
> > ? <?php
> > ? header("Content-Type: image/png\n");
> > ? header("Content-Transfer-Encoding: binary");
> > ? ?>
> >
> > At that point, you can just call out to rrdtool to get the image data,
> > using something akin to <?=system("rrdtool graph - OPTIONS")?> (of course,
> > please the OPTIONS with your options). ?The '-' prints to stdout, and thus
> > returns the image data via the system call to the page for its transfer.
> >
> > This is, in my opinion, the easiest method to produce dynamic PHP graphs.
> > You can also call out to /rrd-image-script.php?name=mygraph&param1=val1 or
> > specify other variables that should be passed in on the HTTP GET string,
> > which will allow you to generate more than one graph from the same script.
> >
> > Hope this helps,
> >
> >
> > --
> > William R. Lorenz
> >
> > _______________________________________________
> > rrd-users mailing list
> > rrd-users at lists.oetiker.ch
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >
> 
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Wed, 24 Jun 2009 22:53:54 -0700 (PDT)
> From: frankie <frankie823 at gmail.com>
> Subject: Re: [rrd-users] Generate rrd graph in real time
> To: rrd-users at lists.oetiker.ch
> Message-ID: <1245909234837-3153352.post at n2.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> Thank you All reply.
> Finally, I use php-rrd to get my work done.:-D
> It seems that there are dependency problems when install rrdtool 1.3.x
> version in centos4.5. I have to try the version one by one and installed
> 1.2.7 eventually.
> -- 
> View this message in context: http://n2.nabble.com/Generate-rrd-graph-in-real-time-tp3136242p3153352.html
> Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
> 
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Thu, 25 Jun 2009 07:49:13 +0100
> From: Simon Hobson <linux at thehobsons.co.uk>
> Subject: Re: [rrd-users] Biased graph - shifted average periods
> To: "Igor I. Shulz" <ishulz at mail.ru>, rrd-users at lists.oetiker.ch
> Message-ID: <a0624081ac668cd608e7c at simon.thehobsons.co.uk>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
> 
> Igor I.  Shulz wrote:
> 
> >I've created rrd-file to accumulate data on a per-hour-basis (--step 
> >3600). Thre are two AVERAGE sets:
> >RRA:AVERAGE:0.5:4:62
> >RRA:AVERAGE:0.5:24:45
> >
> >--start set on the edge of a day - 1242248400
> >
> >But 4-hour averages are not set on even 4-hour ranges (00:00, 04:00, 
> >08:00 etc), but are set on ranges 03:00, 07:00, 11:00.
> ...
> >Is it possible to set average periods on the more reasonable points?
> >00:00, 04:00 ... for 4-hour average
> >and
> >00:00, 00:00 ... for daily average
> 
> What is the local timezone on the server ? I'm guessing that since 
> your email says +4, your server might be set to +3 and this would 
> account for your problem.
> 
> RRD uses UTC, and all steps are aligned on Unix epoch (ie "start of 
> time" at midnight 1st Jan 1970). Hourly/daily etc steps will always 
> be aligned on midnight UTC.
> 
> It's been discussed regularly in the past, but I can't recall what 
> teh answer was.
> 
> -- 
> Simon Hobson
> 
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
> 
> 
> 
> ------------------------------
> 
> Message: 9
> Date: Thu, 25 Jun 2009 11:29:46 +0200
> From: "Rothe" <Rothe at albakom.de>
> Subject: [rrd-users] VDEF creates different Minimums
> To: <rrd-users at lists.oetiker.ch>
> Message-ID: <69F3BFB4B24E694FAEC110F13D4EC7E029BF26 at MAIL.hnc.loc>
> Content-Type: text/plain; charset="us-ascii"
> 
> Moins,
> 
>  
> 
> I have some data to create a graph. I create one graph with a size,
> which it's the standard size. So I don't set width and height. In this
> graph the VDEF for MINIMUM
> 
> is correct calculated.
> 
> Then I create a second graph, bigger than the other with the width of
> 1024pixel and heigth of 768 pixel. All other Definitions are the same
> like the first. But here the VDEF for 
> 
> MINIMUM don't calculated correct. The value is to high.
> 
>  
> 
> So here is a link to the little Graph: 
> http://www.mordur.de/0014.f83d.cd16_12.png
> 
>  
> 
> And the big: http://www.mordur.de/0014.f83d.cd16_12_big.png
> 
>  
> 
> You can see that the MINIMUM in the big pic is incorrect.
> 
> Here are the commands to create:
> 
>  
> 
> Normal Pic: 
> 
>  
> 
> rrdtool graph /srv/www/htdocs/modreport/pics/0014.f83d.cd16_12.png
> --start 1245813840  --end 1245921840
> --title='1.3.6.1.2.1.10.127.1.1.4.1.2.3 von 0014.f83d.cd16'   -X 1
> --vertical-label='_' --color CANVAS#EEEEEE --color GRID#FF5000 --color
> AXIS#0000A0 --color ARROW#0000A0
> DEF:myoid=/srv/www/htdocs/modreport/reports/0014.f83d.cd16_12.rrd:OID_12
> :AVERAGE  CDEF:realoid=myoid,1,\*     VDEF:min=realoid,MINIMUM
> GPRINT:min:"Minimum %.2lf "    VDEF:max=realoid,MAXIMUM
> GPRINT:max:"Maximum %.2lf "  LINE1:realoid#0000A0
> 
>  
> 
> Big Pic:
> 
>  
> 
> rrdtool graph /srv/www/htdocs/modreport/pics/0014.f83d.cd16_12_big.png
> --start 1245813840  --end 1245921840
> --title='1.3.6.1.2.1.10.127.1.1.4.1.2.3 von 0014.f83d.cd16'   -X 1
> --vertical-label='_' --color CANVAS#EEEEEE --color GRID#FF5000 --color
> AXIS#0000A0 --color ARROW#0000A0 --width=1024  --height=768
> DEF:myoid=/srv/www/htdocs/modreport/reports/0014.f83d.cd16_12.rrd:OID_12
> :AVERAGE  CDEF:realoid=myoid,1,\*     VDEF:min=realoid,MINIMUM
> GPRINT:min:"Minimum %.2lf "    VDEF:max=realoid,MAXIMUM
> GPRINT:max:"Maximum %.2lf "  LINE1:realoid#0000A0
> 
>  
> 
> 
> 
> The MAXIMUM is correct calculated in both. I've check this whith a
> rrdtool fetch at the real values.
> 
>  
> 
> 
> 
> 
> 
> regards
> 
> Sven Rothe 
> ALBAKOM GmbH
> Streuwiesenweg 44
> 18119 Rostock-Diedrichshagen
> 
> Tel.:   0381-77896-30 
> Fax.:   0381-77896-33 
> e-mail: rothe at albakom.de 
> 
> 
> 
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090625/45697bb2/attachment.html 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: image/jpeg
> Size: 3825 bytes
> Desc: image001.jpg
> Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090625/45697bb2/attachment.jpe 
> 
> ------------------------------
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> 
> 
> End of rrd-users Digest, Vol 30, Issue 9
> ****************************************



More information about the rrd-users mailing list