I've been working w/ Tobi on the problem we sometimes have with RRD
graphing.
To recap, since ntop doesn't record zero values in the rrd counters, rrd
sees those values as NaN (Not A Number) instead of zero. If there are a lot
of NaNs, the rollup to the next RRA (i.e. from the 5m interval to the 1hour
interval) is NaN instead of the actual rolled up value.
For example, say you are checking IP bytes for oh, mail, and your users all
check their mail boxes on the hour - slight spread out as some clocks are
off.
10:00 500 bytes
10:05 2500 bytes
10:10 -
10:15 -
10:20 -
10:25 -
10:30 -
10:35 -
10:40 -
10:45 -
10:50 -
10:55 2500 bytes
Since less that 50% of the buckets are valued, the 1 hour RRA for 10:00 will
be NaN, instead of the rate equivalent to the actual 5500 bytes.
So when you do a graph that uses the larger time span of the 1 hour RRA
graph, say a 30 day graph, it will see the NaN value.
For most users this doesn't matter, as the value is close to zero and so
gets swamped by other bars.
But if it is a problem for you, I'd like some user(s) to try the following
patch:
--- ntop/plugins/rrdPlugin.c 2005-06-23 11:11:49.000000000 -0500
+++ ntop/plugins/rrdPlugin.c 2005-07-01 11:12:28.479883015 -0500
@@ -530,10 +530,11 @@ static int graphCounter(char *rrdPath, c
safe_snprintf(__FILE__, __LINE__, buf1, sizeof(buf1),
"AREA:ctr#00a000:%s",
spacer(rrdCounter, tmpStr, sizeof(tmpStr)));
argv[argc++] = buf1;
- argv[argc++] = "GPRINT:ctr:MIN:Min\\: %3.1lf%s";
- argv[argc++] = "GPRINT:ctr:MAX:Max\\: %3.1lf%s";
- argv[argc++] = "GPRINT:ctr:AVERAGE:Avg\\: %3.1lf%s";
- argv[argc++] = "GPRINT:ctr:LAST:Current\\: %3.1lf%s";
+ argv[argc++] = "CDEF:actr=ctr,UN,0,ctr,IF";
+ argv[argc++] = "GPRINT:actr:MIN:Min\\: %3.1lf%s";
+ argv[argc++] = "GPRINT:actr:MAX:Max\\: %3.1lf%s";
+ argv[argc++] = "GPRINT:actr:AVERAGE:Avg\\: %3.1lf%s";
+ argv[argc++] = "GPRINT:actr:LAST:Current\\: %3.1lf%s";
#ifdef HAVE_RRD_ABERRANT_BEHAVIOR
safe_snprintf(__FILE__, __LINE__, bufa1, sizeof(bufa1),
"DEF:pred=%s:counter:HWPREDICT", path);
argv[argc++] = bufa1;
-----endpatch-----
TIA!
-----Burton
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop