Forum Discussion
High Low value in System.Statistics.get_global_statistics
I've been exploring iControl System.System Info and System.Statistics and don't understand the high/low values. In some case the high value is zero while in others its not. Could some explain this to me.
(Common.Statistic){
type = "STATISTIC_CLIENT_SIDE_BYTES_IN"
value =
(Common.ULong64){
high = 9
low = -393526359
}
time_stamp = 0
}
(Common.Statistic){
type = "STATISTIC_CLIENT_SIDE_BYTES_OUT"
value =
(Common.ULong64){
high = 30
low = -1655949687
}
time_stamp = 0
}
(Common.Statistic){
type = "STATISTIC_CLIENT_SIDE_PACKETS_IN"
value =
(Common.ULong64){
high = 0
low = 191824680
}
time_stamp = 0
}
(Common.Statistic){
type = "STATISTIC_CLIENT_SIDE_PACKETS_OUT"
value =
(Common.ULong64){
high = 0
low = 219471652
}
time_stamp = 0
}
- Lots of history in that question. When we first developed iControl in 2001, the SOAP standard and encodings didn't support 64 bit numbers. To add to that, Java didn't support unsigned values so we were stuck signed ints for the high and low values (thus the negative numbers in some of them). We then had to find a way to turn our 64 bit statistic values into numbers that the various client toolkits supported. In hindsight, we probably should have also passed down a string with the 64 bit value in it.
- HamishCirrocumulusIn hindsight, we probably should have also passed down a string with the 64 bit value in it.
- Jeremy_Mann_141Nimbostratus
I think the formula is bit shifted, not a power of 32, given the following result:
statistics[] = (Common.Statistic){ type = "STATISTIC_CLIENT_SIDE_BYTES_IN" value = (Common.ULong64){ high = 97 low = 841866601 } time_stamp = 0 }, (Common.Statistic){ type = "STATISTIC_CLIENT_SIDE_BYTES_OUT" value = (Common.ULong64){ high = 390 low = 2041437072 } time_stamp = 0 },
The formula for the result would be
value = high << 32 + low
Giving value = (97 << 32) + 841,866,601 = 417,453,694,313
The alternative would yield (97^32) + 841866601 = 3773075507922571775273744352333525624409237957166570158701128042
- Jeff_d_Ambly_24Nimbostratusso what is appropriate formula? should this be bit shifted?
- Jason_Cohen_417Historic F5 Account
The correct formula should be to left shift the high value.
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