| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| MRTG + WMI + Help http://www.steveshipway.org/forum/viewtopic.php?f=11&t=130 |
Page 1 of 1 |
| Author: | stevesh [ Sat Feb 14, 2004 1:22 pm ] |
| Post subject: | |
If your data gatherer were run as a daemon, it would be able to collect and store the value on the first call, and then compare on the subsequent calls. You could also do this via a registry save. When you first call for counter A, the program returns 0 but saves the current value of A into the registry in a special area along with the time the sample was taken. Next time it is called, it spots that it already has a previous sample, and if the time is not too far into the past (eg, <6 min) then it returns (curren - stored)/timedifference. Then, it stores the current time and value for use on the next call. RRD actually uses a similar method to calculate the values in the RRAs. Steve |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|