Forum Discussion
smp_86112
May 15, 2012Cirrostratus
Convert negative statistic value to positive bits?
Using Perl/iControl 10.2.0, I am trying to reconstruct the same Statistics output that is shown in the LTM GUI. I have successfully obtained the statistics with the get_statistics method. But some of ...
smp_86112
May 16, 2012Cirrostratus
I have no idea how it works, but I found this post which gave me the answer:
https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/1144711/showtab/groupforums/Default.aspx
I have to get both the high and low value of the statistic, and feed it to this method. Multiply the return value by 8, and it gives me the value I want:
Math::BigInt->new("0x" . unpack("H*", pack("N2", $high, $low)))
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects