[nmglug] [Fwd: Re: [dt-general] DigiTemp to rrd tool graphing]

a akaluta at taosnet.com
Mon Dec 7 12:01:40 PST 2009


Nick:
Thanks for your communication.
Does the accompanying script make any sense to you,can you suggest how
to use it?,apparently is not a perl script.I believe it will populate a
rrdtool data base as part of an example program.
Anthony

> #!/usr/bin/perl -w
#
# DigiTemp v2.1 RRDB database Creation
#
# Copyright 1997-2001 by Brian C. Lane <bcl at brianlane.com>
www.brianlane.com
# All Rights Reserved
#
# This program is free software; you can redistribute it and/or modify
it
# under the terms of the GNU General Public License as published by the
Free
# Software Foundation; either version 2 of the License, or (at your
option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for
# more details.
#
# You should have received a copy of the GNU General Public License
along
# with this program; if not, write to the Free Software Foundation,
Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

use Time::Local;
use RRDp;

/RRDp::start "/usr/local/rrdtool/bin/rrdtool";

# Create the database

RRDp::cmd "create digitemp.rrd \
DS:room:GAUGE:600:U:U  \ 
DS:attic:GAUGE:600:U:U  \
DS:desk:GAUGE:600:U:U   \
RRA:AVERAGE:0.5:1:600    \  
RRA:AVERAGE:0.5:6:700    \  
RRA:AVERAGE:0.5:24:775   \  
RRA:AVERAGE:0.5:288:797  \  
RRA:MIN:0.5:1:600        \  
RRA:MIN:0.5:6:700        \  
RRA:MIN:0.5:24:775       \  
RRA:MIN:0.5:288:797      \
RRA:MAX:0.5:1:600        \  
RRA:MAX:0.5:6:700        \  
RRA:MAX:0.5:24:775       \  
RRA:MAX:0.5:288:797";

$answer = RRDp::read;
#print $$answer;

RRDp::end;


On Mon, 2009-12-07 at 11:56 -0700, Nick Frost wrote:
> a wrote:
> >
> > ------------------------------------------------------------------------
> >
> > Subject:
> > Re: [dt-general] DigiTemp to rrd tool graphing
> > From:
> > a <akaluta at taosnet.com>
> > Date:
> > Mon, 07 Dec 2009 11:36:48 -0700
> > To:
> > DigiTemp General Discussions <dt-general at lists.brianlane.com>
> >
> > To:
> > DigiTemp General Discussions <dt-general at lists.brianlane.com>
> >
> >
> > What does this mean #! /usr/bin/pearl  -w
> >   
> -w means enable or disable warnings. But it should be "perl" and not 
> "pearl". PERL = Programmed Extraction and Reporting Language. pearl = 
> white things found in oysters that are expensive. :-)
> 
> man perl
> 
> "If something strange has gone wrong with your program and you’re not
> sure where you should look for help, try the -w switch first. It will
> often point out exactly where the trouble is."
> 
> "The "use warnings" pragma (and the -w switch) produces some lovely
> diagnostics."
> 
> >> prelimary-Did I download correct perl as indicated in initial step  2)
> >> above?
> >> What do I do with the following,do I load it manually or somehow put it
> >> in /usr/bin/perl -w
> >>     
> which perl
> 
> or;
> 
> wheris perl
> 
> should tell you where perl lives on your system. As long as PERL is in 
> /usr/bin/ you're fine, unless you want a specific version of PERL, in 
> which case you will change the script's first line to point at the 
> version of PERL you want to use. If it's not and somewhere else (e.g. 
> /usr/local/bin/)
> 
> your would change the script's first line accordingly;
> 
> e.g.
> 
> #!/usr/local/bin/perl -w
> 
> Hope that helps,
> 
> -Nick
> 
> 
> 




More information about the nmglug mailing list