- Thread Starter
- #26
Strange output from mem.pl (well known perl script)
Note mem_gap_vm becomes negative
It's counted as
Pretty strange.
Code:
SYSTEM MEMORY INFORMATION:
mem_wire: 1234513920 ( 1177MB) [ 14%] Wired: disabled for paging out
mem_active: + 3365068800 ( 3209MB) [ 40%] Active: recently referenced
mem_inactive:+ 3291779072 ( 3139MB) [ 39%] Inactive: recently not referenced
mem_cache: + 198041600 ( 188MB) [ 2%] Cached: almost avail. for allocation
mem_free: + 211402752 ( 201MB) [ 2%] Free: fully available for allocation
mem_gap_vm: + -32768 ( 0MB) [ 0%] Memory gap: UNKNOWN
-------------- ------------ ----------- ------
mem_all: = 8300773376 ( 7916MB) [100%] Total real memory managed
mem_gap_sys: + 268271616 ( 255MB) Memory gap: Kernel?!
-------------- ------------ -----------
mem_phys: = 8569044992 ( 8172MB) Total real memory available
mem_gap_hw: + 20889600 ( 19MB) Memory gap: Segment Mappings?!
-------------- ------------ -----------
mem_hw: = 8589934592 ( 8192MB) Total real memory installed
SYSTEM MEMORY SUMMARY:
mem_used: 4888711168 ( 4662MB) [ 56%] Logically used memory
mem_avail: + 3701223424 ( 3529MB) [ 43%] Logically available memory
-------------- ------------ ----------- ------
mem_total: = 8589934592 ( 8192MB) [100%] Logically total memory
Note mem_gap_vm becomes negative
It's counted as
Code:
my $mem_all = $sysctl->{"vm.stats.vm.v_page_count"} * $sysctl->{"hw.pagesize"};
my $mem_wire = $sysctl->{"vm.stats.vm.v_wire_count"} * $sysctl->{"hw.pagesize"};
my $mem_active = $sysctl->{"vm.stats.vm.v_active_count"} * $sysctl->{"hw.pagesize"};
my $mem_inactive = $sysctl->{"vm.stats.vm.v_inactive_count"} * $sysctl->{"hw.pagesize"};
my $mem_cache = $sysctl->{"vm.stats.vm.v_cache_count"} * $sysctl->{"hw.pagesize"};
my $mem_free = $sysctl->{"vm.stats.vm.v_free_count"} * $sysctl->{"hw.pagesize"};
my $mem_gap_vm = $mem_all - ($mem_wire + $mem_active + $mem_inactive + $mem_cache + $mem_free);
Pretty strange.