[rrd-users] Calculated values question

Hilman, Harlan - CIDM-2 hlhilman at bpa.gov
Wed Oct 23 00:41:18 MEST 2002


I have a router with an OC3 interface from which I am collecting the SNMP
variables ifInOctets and ifOutOctets.  The problem is that I'm getting
apparently unrealistic values from rrdtool.  I've included the details below
(names/passwords changed).

The database was created with the following command:
--------------------------
rrdtool create routername_501.rrd -s 60 \
        DS:InOctets:COUNTER:120:U:U \
        DS:OutOctets:COUNTER:120:U:U \
        RRA:AVERAGE:0.5:1:480 \
        RRA:AVERAGE:0.5:5:600 \
        RRA:AVERAGE:0.5:30:700 \
        RRA:AVERAGE:0.5:120:775 \
        RRA:AVERAGE:0.5:1440:797 \
        RRA:MAX:0.5:5:600 \
        RRA:MAX:0.5:30:700 \
        RRA:MAX:0.5:120:775 \
        RRA:MAX:0.5:1440:797
--------------------------

I then run the following script once per minute using the "sleep 60" shell
command:

--------------------------
#! /usr/bin/perl
foreach $mibvar ("ifInOctets","ifOutOctets") {
        # run snmpget command from command line and collect output
        ($cmd_result)=`/usr/local/bin/snmpget -c secret routername
$mibvar.501`;
        # match string to locate return value position
        $cmd_result =~ /(Counter32: )/;
        # store string following above match in hash (after removing newline
with "chop")
        chop($hash{$mibvar}=$');
        }

# collect variables from hash
($inoctets,$outoctets)=sort values(%hash);

# run rrdtool update command with appropriate variables
`rrdtool update routername_501.rrd N:$inoctets:$outoctets`;
--------------------------

The maximum rate on an OC3 should be 155.52Mbits.  Dividing this by 8 gives
19,440,000 or a maximum rate of 1.944e7 octets/sec.  However, 'rrdtool dump
routername_501.rrd' shows the following entries:

--------------------------
(lines removed for brevity)

                <cf> MAX </cf>
                <pdp_per_row> 120 </pdp_per_row> <!-- 7200 seconds -->
                <xff> 5.0000000000e-01 </xff>

(lines removed for brevity)

<!-- 2002-10-04 21:00:00 PDT / 1033790400 --> <row><v> 1.8941110510e+07
</v><v> 5.8784453352e+05 </v></row>
<!-- 2002-10-04 23:00:00 PDT / 1033797600 --> <row><v> 1.9565661741e+07
</v><v> 8.1380501098e+05 </v></row>
<!-- 2002-10-05 01:00:00 PDT / 1033804800 --> <row><v> 2.0111821696e+07
</v><v> 9.0141130889e+05 </v></row>
<!-- 2002-10-05 03:00:00 PDT / 1033812000 --> <row><v> 1.9649165813e+07
</v><v> 8.1990909064e+05 </v></row>
<!-- 2002-10-05 05:00:00 PDT / 1033819200 --> <row><v> 1.9944517954e+07
</v><v> 1.0144312505e+06 </v></row>
<!-- 2002-10-05 07:00:00 PDT / 1033826400 --> <row><v> 2.0188493326e+07
</v><v> 9.3234107111e+05 </v></row>
<!-- 2002-10-05 09:00:00 PDT / 1033833600 --> <row><v> 1.9731602771e+07
</v><v> 2.8749978765e+06 </v></row>
<!-- 2002-10-05 11:00:00 PDT / 1033840800 --> <row><v> 1.9599883542e+07
</v><v> 1.5501969968e+06 </v></row>
<!-- 2002-10-05 13:00:00 PDT / 1033848000 --> <row><v> 1.9124727063e+07
</v><v> 1.5759323636e+06 </v></row>
<!-- 2002-10-05 15:00:00 PDT / 1033855200 --> <row><v> 1.8348562882e+07
</v><v> 1.4253880865e+06 </v></row>
<!-- 2002-10-05 17:00:00 PDT / 1033862400 --> <row><v> 1.8782677567e+07
</v><v> 8.3519364167e+05 </v></row>

(lines removed for brevity)
--------------------------

While I only see the above problem during times when the line is very likely
maxed out (weekend full backups), I suspect all the values may be
artificially high.  I need to understand how rrdtool comes up with the
values exceeding 1.944e7 for ifInOctets so I can modify the process to
accumulate data more accurately.  Can anyone help me with this?

- Harlan 

--
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