Forum Discussion

David_Newman_10's avatar
David_Newman_10
Icon for Nimbostratus rankNimbostratus
Jul 08, 2005

Discrepancy between iControl statistics and console

I am using iControl to pull statistics on pool members.

 

I first invoke LocalLB.Pool::reset_statistics on the pool level, which successfully zeroes out all of the statistics for the pool, and all of its members.

 

 

I then invoke LocalLB.Pool::get_statistics, and then LocalLB.PoolMember::get_statistics on each of the pool members.

 

The problem is that I find a discrepancy between the statistics pulled via iControl, and the statistics displayed for the same pool members on the BIG-IP console. The statistics should be the same, especially after all traffic has stopped flowing through the pool.

 

 

The console always displays the correct values. However, sometimes I obtain the correct values via iControl, and sometimes I obtain zeroes, as if iControl has not yet pulled the statistics.

 

 

Are you aware of any timing or synchronization issues that can explain this discrepancy?

 

 

Thanks,

 

 

David

 

 

5 Replies

  • iControl is pulling the statistics from the same place as the CLI so the data should be the same. The data is stored in 64bit numbers. Since there is no standard schema type for a 64bit integer, we split it up into the UInt64 structure with a high and low 32bit value. Are you sure you are creating a correct 64bit value in your client language before you are displaying the results. A good way to test this would be to dump both the low and high values alongside with your calculated value to determine whether or not you have a calculation error.

     

     

    -Joe

     

  • Thanks for the response, but it doesn't on the surface seem to be the code that is the problem.

     

     

    Sometimes I get the correct statistics, and sometimes I do not. It seems that there is a timing issue. Perhaps the statistics are refreshed at different rates on the BIG-IP itself? After a period of time the statistics become synchronized between what iControl fetches, and what is displayed upon the console. This is quite puzzling.

     

     

    David
  • There is no timing issue as both the CLI, GUI, and iControl pull the statistics in real-time from the system. There is no buffering or caching so each component should report the same values. As I said before, there are some 64-bit conversion issues that could occur. If you are not building the 64-bit value correctly from the UInt64's low and high members, then it could seem off.

     

     

    I would suggest, you modify the client app to print out the low, high, and calculated 64bit value just to make sure it's not a conversion problem. If you could also print out the bigpipe statistics and post them up then we can help you out further.

     

     

    -Joe
  • Joe,

     

     

    It is working now. Turns out it was not a data conversion problem, but rather the order in which get_statistics and reset_statistics events were sequenced in the code.

     

     

    Thanks for your responses, it helped me to focus on finding the real problem.

     

     

    David
  • I guess that would do it! Glad to be of some help and feel free to post any other issues you come up with?

     

     

    If you've got a minute, I'd like to hear about the kind of project you are working on. That kind of info helps us in future product planning as well as enhancing the sample code and api's in future SDKs.

     

     

    -Joe