[rrd-users] CF's ?

Tuc at T-B-O-H.NET ml at t-b-o-h.net
Sun Dec 16 02:33:21 CET 2007


> > 	Is there somewhere that the CF's are detailed in how
> > they present the number, with examples?
> 
> No, because they don't.
>
	There has to be a reason there are different CF's. If
they all return the same thing then there is no use. I put the
numbers into the RRD as a GUAGE, I'm looking just to get the
same thing out. Does that mean LAST then?
>
> > 	The problem I'm having is I put in whole numbers to
> > my RRD (X out of 10 pings), and when I pull them back using
> > AVERAGE I get decimal numbers. Should I be using a CF at all?
> > Should it be LAST?
> 
> You can't put numbers in an RRD.  See my site, normalization and
> consolidation.
> 
> The best you can do is to make sure normalization is a noop.
> Do do so, you use timestamps which are a whole multiple of your
> step size.
> 
> All numbers in the RRD will be rates.  CF's determine how to get
> those rates.  This is also described on the same page you just
> visited.
> 
	I don't understand what your trying to tell me, nor the
page. Can you give an example? Since I'm pretty bad at math, I'm
better with seeing examples and extrapolating what I need from
them usually. 

	I'm using MRTG calling the following as my outside 
target:

#!/usr/bin/perl


$start_secs = time();

open (CMD, "/bin/ping -c10 -q -A $ARGV[0]|");

while (<CMD>) 
{
  if ( /(\d+)\s+received/) 
  {
     $pings=$1;
  }
#rtt min/avg/max/mdev = 7.364/38.679/83.590/25.899 ms
  if (/mdev = (\d*\.{0,1}\d+)\/(\d*\.{0,1}\d+)\/(\d*\.{0,1}\d+)\/(\d*\.{0,1}\d+)
\ ms/)
  {
    $min = $1;
    $avg = $2;
    $max = $3;
  }
}
if (!$pings)
{
$min=$avg=$max=0;
}
close (CMD);

print $pings."\n";
print $min."\n";
print $avg."\n";
print $max."\n";
print "$start_secs\n";
print "hostmon-data\n";

exit;


	My RRD is set to :

[root at ports docs]# rrdtool info c-14-ping.rrd |more
filename = "c-14-ping.rrd"
rrd_version = "0001"
step = 300
last_update = 1197768610
ds[ds0].type = "GAUGE"
ds[ds0].minimal_heartbeat = 600
ds[ds0].min = 0.0000000000e+00
ds[ds0].max = 1.1000000000e+03
ds[ds0].last_ds = "UNKN"
ds[ds0].value = 1.0000000000e+02
ds[ds0].unknown_sec = 0
ds[ds1].type = "GAUGE"
ds[ds1].minimal_heartbeat = 600
ds[ds1].min = 0.0000000000e+00
ds[ds1].max = 1.1000000000e+03
ds[ds1].last_ds = "UNKN"
ds[ds1].value = 6.0940000000e+01
ds[ds1].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 800
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 800
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = NaN
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 800
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 1.7803666667e+02
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 2.2512327333e+02
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 800
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 1.7803666667e+02
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[3].cdp_prep[1].value = 2.2512327333e+02
rra[3].cdp_prep[1].unknown_datapoints = 0
rra[4].cf = "MAX"
rra[4].rows = 800
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 800
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = NaN
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 800
rra[6].pdp_per_row = 24
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = 1.0000000000e+01
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = 1.1190874000e+02
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 800
rra[7].pdp_per_row = 288
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 1.0000000000e+01
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = 1.1190874000e+02
rra[7].cdp_prep[1].unknown_datapoints = 0

	I'm trying to graph ds0 as pings. (Using a proprietary
tool). Should I instead be using LAST? If so, how do I adjust
the RRD to use a new CF, as I didn't see it as part of rrdtune.

		Thanks, Tuc



More information about the rrd-users mailing list