Forum Discussion

Steven_Hotovy_8's avatar
Steven_Hotovy_8
Icon for Nimbostratus rankNimbostratus
Jun 10, 2005

How to tell if STATISTIC is cumulative or not

Joe,

 

 

Most STATISTIC values derived from the API calls are cumulative, in which case you can derive "instantaneous" values by subtracting the current value and the value from the previous sampling.

 

 

However, a number of STATISTICs seem to be already instantaneous, like MEMORY_TOTAL_BYTES from System/Statistics->get_global_statistics and CLIENT_SIDE_CURRENT_CONNECTIONS from LocalLB/VirtualServer->get_statistics.

 

 

Does the on-line documentation explain which STATISTICs are cumulative and which are not? If not, how do we figure this out?

 

 

Thanks,

 

Steve
  • You are correct that some statistics are cumulative while others are a current value. Currently the SDK does not explicitly state which statistic is a cumulative total or current. Funny thing is, after 4 years of customers using our SDK, this is the first request for this. Maybe that is because in 4.x we had a limited set of statistic types available.

     

     

    As of 9.x this got tricky as we introduced a slew of new statistics in the interfaces. I'll look into getting this information included in the next SDK but in the mean time you can go by the following guidelines:

     

     

    Cumulative

     

    + Anything with a TOTAL in the type that is from something that commonly would change. (ie. total system memory wouldn't normally change, but total memory used would).

     

    + Bytes in/out

     

    + Packets in/out

     

     

    Current Value

     

    + Anything with a CURRENT in the type

     

    + Anything with TOTAL that wouldn't normally change

     

    + Anything else that wouldn't imply a counter.

     

     

    I'm sure I've missed some categories here but in most cases if you use common sense you'll have it correct. I'll work on getting these values categorized and post it here when I do as well as getting it into the SDK documentation.

     

     

    In the mean time, if you have a question about a specific statistic, pass it along and we'll let you know.

     

     

    -Joe