Forum Discussion
Richard__Harlan
May 23, 2006Historic F5 Account
get_memory_usage_information
I have a script that is trying to get the memory used on the boxed. I am useing get_memory_usage_information I can get total memroy with out a problem just haveing a problem getting used_memory. From the SDK it looks like I can ask for used_memory just like total_memory but all I get back is zero. Any ideas? Thanks
3 Replies
- Hunter, can you post your code where you are having a problem. What are the values of the low and high compontents of the UInt64 structure returned?
-Joe - I'd be careful about dropping the high 32 bits of those values. For memory it's probably OK as long as you don't have more than 4GB. A safer approach would be to build a native 64 bit value from the low and high components of our UInt64 structure.
my $total_memory = &build64($memory_info->{"total_memory"}); ---------------------------------------------------------------------------- build64 ---------------------------------------------------------------------------- sub build64() { ($UInt64) = (@_); $low = $UInt64->{"low"}; $high = $UInt64->{"high"}; For some reason this doesn't work... $value64 = Math::BigInt->new($high)->blsft(32)->bxor($low); $value64 = Math::BigInt->new(Math::BigInt->new($high)->blsft(32))->bxor($low); return $value64; }
I guess that's assuming you don't have 64bit support builtin (which isn't the default) and you have the Math::BigInt module on your system.
-Joe - Richard__HarlanHistoric F5 AccountOne last question is the get_memory_usage_information used memory the total memory used in the box, or just what is used by the TMM? Thanks
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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