[rrd-users] constant values, ie: never change (long)

xs-list-rrd-users at undef.net xs-list-rrd-users at undef.net
Mon Sep 27 23:04:19 MEST 1999


hey all, i seem to be doing something wrong but can't quite pinpoint what
it is that i'm doing. the problem that i'm having is 2 fold, every time i
update my rrd database, and graph it, the line never moves from it's
position (ie: allways shows the same value) the second problem is that rrd
allways takes the same value for the 2 DS' i have in my database.

here is the code i am using:

to create the db:

rrdtool create xs-test.rrd \
DS:input:COUNTER:600:U:U    \
DS:output:COUNTER:600:U:U   \
RRA:AVERAGE:0.5:1:600       \ 
RRA:AVERAGE:0.5:6:600       \
RRA:AVERAGE:0.5:24:600      \
RRA:AVERAGE:0.5:288:732     \
RRA:MAX:0.5:1:600           \
RRA:MAX:0.5:6:600           \
RRA:MAX:0.5:24:600          \
RRA:MAX:0.5:288:732

which is a ripoff of what is in the tutorial, and to graph data i am
using:

rrdtool graphxs-test.png --start -86400   \ 
DEF:inoctets=xs-test.rrd:input:AVERAGE    \
DEF:outoctets=xs-test.rrd:output:AVERAGE  \
AREA:inoctets#00FF00:"In traffic"         \
LINE1:outoctets#0000FF:"Out traffic"


which is also a ripoff, and to enter data, i am using the following perl
script:

#!/usr/bin/perl 
use RRDs;
$epochtime = time;
$ininterface = "3";
$snmpdata = `/usr/local/bin/snmpget 208.235.96.xx secret 2.2.1.10.$ininterface 2.2.1.16.$ininterface`;
($inputinfo,$outputinfo) = split(/\n/, $snmpdata);

($crap1,$moredata1) = split(/interfaces.ifTable.ifEntry.ifInOctets./, $inputinfo);
($interface,$input) = split(/=/, $moredata1);
$input =~ s/ //g;
$interface =~ s/ //g;

($crap2,$moredata2) = split(/interfaces.ifTable.ifEntry.ifOutOctets./, $outputinfo);
($interface,$output) = split(/=/, $moredata2);
$output =~ s/ //g;
$interface =~ s/ //g;

RRDs::update qw(xs-test.rrd N:$input:$output);

which i put in crontab to run every 5 minutes, and it ran and if i
print out the values w/ print "$input / $output\n";, works fine, the
values increase when printed, but not in the database. i have tried the
RRDp module also, which didn't  work.
so i tried a system call of: system 'rrdtool update xs-test.rrd
N:$input:$output';

and it started updating and changing values, only problem is, it was
seeing the same values for input and output, so i tried to use the -t flag
to tell it what arguments it was getting, still no luck. and after a few
updates it stoped, and went back to the unchanging value.

it's not that the data isn't reading at all (or so it seems), it just
seems that it never changes.

here is my system info:

FreeBSD sh.undef.net 3.3-STABLE FreeBSD 3.3-STABLE #5: Mon Sep 27 00:03:11
EDT 1999     xs at sh.undef.net:/usr/src/sys/compile/SH  i386

This is perl, version 5.005_03 built for i386-freebsd

gcc version 2.7.2.3

UCD-snmp version: 4.0.1

rrdtool 1.0.7

and here is an example of two snmp updates from that system:
(16:59:01)(xs at sh)(~/public_html/src/rrd)$ snmpget 208.235.96.xx secret
2.2.1.10.3
interfaces.ifTable.ifEntry.ifInOctets.3 = 1040658871
(17:02:49)(xs at sh)(~/public_html/src/rrd)$ snmpget 208.235.96.xx secret
2.2.1.10.3
interfaces.ifTable.ifEntry.ifInOctets.3 = 1040719669


any ideas? am i stupid?
-xs


-- 

end 
/*
 *  Greg Albrecht
 *  xs-sig(at)undef.net
 *  Please read headers for complete contact information.
 *  "That which doesn't kill me only makes me want more."
 *  $spam_bait=" xs-scapture at undef.net ";
 */

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list