From: Khalid Benhayoune (benhayoune_k@YAHOO.FR)
Date: Sun Jan 19 2003 - 13:36:40 EST
Hi all,
AIX 4.3.3
I writed the following script to estimate the total memory usage by all processes in the system based on the "virtual" colonne of the "svmon -C" command, but the result returned is always greater than the size of real memory (bootinfo -r).
Is that normal ? Did I miss something ? I really need your help.
Here is the script :
----------------------
#!/bin/ksh
pagesize=4096
typeset -i totmem=0
for a in `ps -ef|grep -v "PID"|awk '{if ($5 ~ /:/) {print $8} else print $9}'|se
d "s/^-//"|sort|uniq`;do
totmem=$totmem+`svmon -C \`basename $a\` -n|head -n 4|tail -n 1|awk '{print $4}'
|sed "s/does/0/g"`
done
totmem=$totmem*$pagesize
echo $totmem
exit 0
----------------------
Thank you in advance.
K.Benhayoune
System engineer/DBA
Phone : 212-63-61-70-97
Address : Rue 76, n° 14, Bd Oum Rabia, EL OULFA - CASABLANCA
---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:29 EDT