Forum Discussion
Statistics
I've started working with the .NET Assembly of this project, I wanted to use it to get some statistics and monitoring of the BIG-IPs we have in our environment. Though I've hit a bit of a stumbling block.
Looking at the API it shows that the response from the BIG-IP for LocalLBPool.get_statistics(String[] poolNames) is a LocalLBPoolStatistics. This is a group of statistics which has has a ULong64 value inside which is broken into high (32bit) and a low value (32bit) to combine. The issue is that C recognizes the response types as Signed 64bit Ints.
How do I convert these two 64bit values into a 64 bit Unsigned long? Do I bit shift the high order value by 32 still? I already see issues where the low value in some cases are wrapping, however if I cast it as an unsigned 64bit int the two values do not represent what I see on the LB itself.
Regards,
Jordan
- Hi Jordan, I should really just wrap a To64Bit function into the .Net assembly. Here's a little bit of code you can use to convert the Ulong64 structure into a 64 bit value.
UInt64 build64(iControl.CommonULong64 ul64) { return (UInt64)((UInt64)(ul64.high<<32) | (UInt64)ul64.low); }
- Jordan_43509NimbostratusHi Joe,
- Let's go apples-to-apples here. In your first post, you mentioned you were looking at Pool statistics, but are now comparing them to VIP stats. The stats returned from iControl should be the same as the statistics option shows on the respective object pages. If you are seeing something inconsistent, if you could pass along the values in the GUI and then the high and low values from the ULong64 structure, I'll see if I can dig in a bit more.
- Jordan_43509NimbostratusSorry for the confusion, I was originally working on Pool Stats then went over to Virtual Server stats because I thought maybe it was an error in the return data.
Details Bits IN Bits Out
All 66.0G 45.0G
Ephemeral 0 0
Other 66.0G 45.0G
Statistic Name High Low
(No Cast) STATISTIC_CLIENT_SIDE_BYTES_IN 1 -331265964
(No Cast) STATISTIC_CLIENT_SIDE_BYTES_OUT 1 1331262815
(UInt64) STATISTIC_CLIENT_SIDE_BYTES_IN 1 18446744073378285652
(UInt64) STATISTIC_CLIENT_SIDE_BYTES_OUT 1 1331262815
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com