[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
I have been collecting stats and graphing them for months. Suddenly, after
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
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


# $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',
                "--lower-limit", '0',
                "--base", '1000',





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


           "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