On Wed, Jun 28, 2006 at 04:07:44PM +0200, Nicolas Dorfsman wrote:
The RRD files are created as "DERIVE" datatypes with a minimum
value of 0, which should handle 32/64-bit counter overflows automatically. (See the rrdcreate man-page).Well...the man is not so confident :
If you cannot tolerate ever mistaking the occasional counter reset for a legitimate counter wrap, and would prefer "Unknowns" for all legitimate counter wraps and resets, always use DERIVE with min=0. Otherwise, using COUNTER with a suitable max will return correct values for all legitimate counter wraps, mark some counter resets as "Unknown", but can mistake some counter resets for a legitimate counter wrap.
OK, you got me on that one.
It seems that using COUNTER for the byte-counts in both the netstat- and ifstat-RRD's might be a good idea. The question then becomes "what's a suitable max" for these data ? Should I assume they are 32-bit counters ? I know some of them are not (e.g. Solaris has 64-bit counters for bytes in/out per interface).
I'll change it to a counter now, with MAX set to "unknown". The overflow handling should still work correctly, if I understand the RRD docs right.
Note: This doesn't affect all of the existing RRD's, only new ones created.
Regards, Henrik