[rrd-users] RPN bugs?

Jeff Wheat jeff at cetlink.net
Mon Apr 24 20:30:21 MEST 2000


I am running into some problems with FreeBSD 4.0 and 3.4 on an Intel
machine.
I have been collecting stats and graphing them for months. Suddenly, after
moving
the databases to a faster machine with a newer OS (4.0) and newer RRDTOOL, I
am getting wacked graphs. Basically, the graphs are displaying the maximum
speed
of the interface instead of the actual speeds. Here is a clip of my perl
script. The two
lines commented out are the original lines. The two replacements do the
right thing.
I need to use RPN to be get rid of spikes. Please email me if I am just
being stupid
and have the incorrect syntax. This had been working though. Many thanks in
advance!

Jeff


# $SPEED is passed via an argument


my @daily   = ("--start", ( - 24*3600 ));
my @weekly  = ("--start", ( - 7 * 24*60*60 ));
my @monthly = ("--start", ( - 31 * 24*60*60 ));
my @yearly  = ("--start", ( - 365 * 24*60*60 ));

my $title = "Graph of $DESCR. Maximum speed: $SPEED";

sub mkgraph {
        my($filename, @range) = @_;

        my $graphret = RRDs::graph $filename, "--title", $title,
                "--vertical-label", 'bits per second',
                "--width", '580', "--height", '220',
                @range,
                "--lower-limit", '0',
                "--base", '1000',

           "DEF:input=$RRD:ifInOctets:AVERAGE",
           "DEF:output=$RRD:ifOutOctets:AVERAGE",
           "DEF:minin=$RRD:ifInOctets:MIN",
           "DEF:minout=$RRD:ifOutOctets:MIN",
           "DEF:maxin=$RRD:ifInOctets:MAX",
           "DEF:maxout=$RRD:ifOutOctets:MAX",

           #"CDEF:inc=input,8,*,$SPEED,GT,$SPEED,input,8,*,IF",
           #"CDEF:outc=output,8,*,$SPEED,GT,$SPEED,output,8,*,IF",
           "CDEF:inc=input,8,*",
           "CDEF:outc=output,8,*",
           "CDEF:mininc=minin,8,*,$SPEED,GT,$SPEED,minin,8,*,IF",
           "CDEF:minoutc=minout,8,*,$SPEED,GT,$SPEED,minout,8,*,IF",
           "CDEF:maxinc=maxin,8,*,$SPEED,GT,$SPEED,maxin,8,*,IF",
           "CDEF:maxoutc=maxout,8,*,$SPEED,GT,$SPEED,maxout,8,*,IF",

           "CDEF:perinc=100,inc,$SPEED,/,*",
           "CDEF:peroutc=100,outc,$SPEED,/,*",

           "AREA:inc#FFCCCC",
           "AREA:outc#CCCCFF",

           "LINE1:inc#FF0000:Inbound traffic (to your site)",
           "LINE1:outc#0000FF:Outbound traffic (from your site)\\c",

           "COMMENT:\\s",

           "GPRINT:inc:LAST:Input  Current\\: %.3lf %sb/s",
           "GPRINT:inc:AVERAGE:Average\\: %.3lf %sb/s",
           "GPRINT:mininc:MIN:Min\\: %.3lf %sb/s",
           "GPRINT:maxinc:MAX:Max\\: %.3lf %sb/s",
           "GPRINT:perinc:LAST:Utilization\\: %.1lf %%\\j",

           "GPRINT:outc:LAST:Output Current\\: %.3lf %sb/s",
           "GPRINT:outc:AVERAGE:Average\\: %.3lf %sb/s",
           "GPRINT:minoutc:MIN:Min\\: %.3lf %sb/s",
           "GPRINT:maxoutc:MAX:Max\\: %.3lf %sb/s",
           "GPRINT:peroutc:LAST:Utilization\\: %.1lf %%\\j",




--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users



More information about the rrd-users mailing list