~/doc/Averaging.time.series.txt This is a note on keeping track of network management counters over time without consuming too much disk space. Some notes on counters. - They needn't start from zero. - They needn't be persistent across agent restarts - They can wrap around (> 32 bits) The idea is to keep a database relation (or more) Counter ID (agent ID (e.g. IP address), counter ID (e.g. registration id + Distinguishing attribute values (row index)) Start of sample (Unix time) Starting counter value (Counter64?) Starting sysUpTime (10mS) ? Time of last sample (Unix time) Value of counter (Counter64 with account taken of wrapping) sysUpTime at last sample (10mS) Sum square (new counter value?) Max rate delta (adjusted for time between samples) At each sample we capture the new value of the counter and the sysUpTime. From the sysUpTime, we determine whether the agent has gone down, and hence whether to start a new record (epoch?). This should be indicated by new sysUptime < last sysUpTime. We should also be able to determine if the counter has wrapped. We should be able to do some statistics on the average. With the square we should be able to some variances too? I don't have time to sit down yet to work these through. (Note that the counter is basically SUM(X). I think that with a little extra information being recorded we can save a lot of disk space compared to recording every sample.