How is Memory Utilization calculated for HP-UX server?
Formula :
Used Memory (%) = ((Total Memory - Free Memory) / Total Memory) * 100
We are getting the Total Memory using the command: grep Physical /var/adm/syslog/syslog.log
Total Memory = 8377100 Kbytes
Total Memory (MB) = 8180.76
We are getting the Free Memory using the command: /usr/bin/vmstat 1 3 This command will give free memory in terms of number pages. So we have to find what is size of each page. Page size will be get from the following commands:
export UNIX95=1;top -h -n5 -d1 -f /tmp/appmanager.txt;cat /tmp/appmanager.txt ;rm -f /tmp/appmanager.txt
export UNIX95=1;export TERM=xterm;/usr/sbin/kmtune -q vps_pagesize | tail -1 | tr -s " " "\t"
/usr/sbin/kctune -q vps_pagesize
Free Memory = 1499135 * 4Kbytes
Free Memory (MB) = (1499135 *4 / 1024) = 5855.99
Used Memory (%) = ((8180.76 - 5855.99) / 8180.76) *100 = 28.42 (%)
Used Memory(MB) = Total Memory - Free Memory = 2324.77 (MB)
New to ADSelfService Plus?