Difference between revisions of "Nokia / freebsb memory utilization calculation"

From cpwiki.net
Jump to: navigation, search
Check Point Profressional Services
(Pushed from Themanclub.)
 

Latest revision as of 15:41, 24 May 2013

Formula

% utilization =    used  memory / total  =  
total – available / total =  
hw.physmem – ((vm.stats.vm.v_inactive_count * hw.pagesize) + (vm.stats.vm.v_cache_count * hw.pagesize) + (vm.stats.vm.v_free_count * hw.pagesize))  / hw.physmem 

commands to gather memory data

sysctl -a | grep vm.stats.vm.v_inactive_count
sysctl -a | grep vm.stats.vm.v_cache_count
sysctl -a | grep vm.stats.vm.v_free_count
sysctl -a | grep  hw.pagesize
sysctl -a | grep hw.physmem


Links

http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt