[rrd-users] Re: Help a new and slightly lost user! :(

Michael Thompson mike at thompsonmike.co.uk
Sat Nov 13 11:20:09 MET 2004

On Saturday 13 November 2004 09:50, Michael Thompson wrote:

Sorry, I just read that message and realised it does not make any sense!

What is happening is that it is logging data, but it is logging the verticle 
scale as k, it needs to show the difference in packets between each reading, 
and not have any m k or any other symbols apart from the amounts.

I did come up with the following code:

    # if rrdtool database doesn't exist, create it
        if (! -e "$rrd/$_[0].rrd")
                print "creating rrd database for $_[0]..\n";
                RRDs::create "$rrd/$_[0].rrd",
                        "-s 300",

        # insert values into rrd
        RRDs::update "$rrd/$_[0].rrd",
                "-t", "in",

        # create traffic graphs
        &CreateGraph($_[0], "day", $_[1]);
        &CreateGraph($_[0], "week", $_[1]);
        &CreateGraph($_[0], "month", $_[1]);
        &CreateGraph($_[0], "year", $_[1]);

sub CreateGraph

# creates graph

        RRDs::graph "$img/$_[0]-$_[1].png",
                "-s -1$_[1]",
                "-t traffic on $_[0] :: $_[2]",
                "-h", "80", "-w", "600",
                "-l 0",
                "-a", "PNG",
                "-v bytes/sec",
                "GPRINT:drop:MAX:  Max\\: %5.1lf %s",
                "GPRINT:drop:AVERAGE: Avg\\: %5.1lf %S",
                "GPRINT:drop:LAST: Current\\: %5.1lf %Sbytes/sec\\n",
        if ($ERROR = RRDs::error) { print "$0: unable to generate $_[0] $_[1] 
traffic graph: $ERROR\n"; }

But that prints m on the GPRINT lines, and I am not sure of how to get rid. I 
am also not entirly sure of the accuracy of the results.

Any thoughts??

Many Thanks for your time


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
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list