[rrd-users] GAUGE not functioning correctly?

Cade M. Robinson Cade.Robinson at servicenet.com
Fri Aug 11 20:18:12 MEST 2000


I setup RRDTool both alone and in MRTG and they are screwing up the
numbers passed in when I want a GAUGE.

example from rrdtool fetch command:
966006000: 1.7200000000e+02 1.5000000000e+01 NaN NaN
 966006600: 1.7200000000e+02 1.5998333333e+01 NaN NaN
 966007200: 1.6900500000e+02 1.1008333333e+01 NaN NaN
 966007800: 1.9296000000e+02 3.5958333333e+01 NaN NaN
 966008400: 1.7303333333e+02 1.8030000000e+01 NaN NaN
 966009000: 1.7000500000e+02 1.4006666667e+01 NaN NaN
 966009600: 1.7499166667e+02 1.8991666667e+01 NaN NaN
 966010200: 1.6900000000e+02 1.1000000000e+01 NaN NaN
 966010800: 1.7400000000e+02 1.6000000000e+01 NaN NaN
 966011400: 1.7100000000e+02 1.3000000000e+01 NaN NaN
 966012000: 1.7399500000e+02 1.5995000000e+01 NaN NaN


Here are the real values:
172 15
172 16
169 11
193 36
173 18
170 14
175 19
169 11
174 16
171 13
174 16


They should all be 966010800: 1.7400000000e+02 1.6000000000e+01 NaN NaN
but I am seeing:
966008400: 1.7303333333e+02 1.8030000000e+01 NaN NaN
and
966009600: 1.7499166667e+02 1.8991666667e+01 NaN NaN

These numbers are essentially right but not really.

Sometimes they are whole units off.

Is this RRDTool or my crate / update command?
Could it be that the time of update if a sec or two past the data time?
Like the time will be 966009601 instead of 966009600.  Do the values carry
over?  If this is the case I would see it in all of them since they are
all updating at a time a sec or two after the real time.

Here is my create from perl:
RRDp::start "$rrdtool";
  RRDp::cmd "create $datadir/test.rrd -b $ctime-$oneday -s $steptime
$input1 $input2 $input3 $input4
RRA:AVERAGE:0.5:1:600
        RRA:AVERAGE:0.5:6:700
        RRA:AVERAGE:0.5:24:775
        RRA:AVERAGE:0.5:288:797
        RRA:MAX:0.5:1:600
        RRA:MAX:0.5:6:700
        RRA:MAX:0.5:24:775
        RRA:MAX:0.5:288:797
";

here are the input variables:
$ctime = time;
$steptime = 600;
$range = 192;
$dstype = "GAUGE";
$in1min = "U";
$in1max = "U";
$in2min = "U";
$in2max = "U";
$in3min = "U";
$in3max = "U";
$in4min = "U";
$in4max = "U";
$heartbeat = 900;

$oneday = 86400; # 60 seconds * 60 minutes * 24
hours
$oneweek = 604800; # 7 days
$onemonth = 2678400; # 31 days 
$oneyear = 31536000; # 365 days

$lastrra = "0.5:1:1";
$dailyrra = "0.5:1:$range";
$weeklyrra = "0.5:6:$range";
$monthlyrra = "0.5:24:$range";
$yearlyrra = "0.5:288:$range";

$input1 = "DS:input1:$dstype:$heartbeat:$in1min:$in1max";
$input2 = "DS:input2:$dstype:$heartbeat:$in2min:$in2max";
$input3 = "DS:input3:$dstype:$heartbeat:$in3min:$in3max";
$input4 = "DS:input4:$dstype:$heartbeat:$in4min:$in4max";


Here is my update:
RRDp::start "$rrdtool";
  RRDp::cmd "update $datadir/test.rrd
  $ctime:$in1:$in2:$in3:$in4";
  $answer = RRDp::read;
  $status = RRDp::end;

Where ctime is the perl time function and the inX variables are the
integer values or "U" if undefined.


Thanks
Cade




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