View Single Post

   
  #1 (permalink)  
Old 01-05-2008, 03:09 AM
Balino
 
Posts: n/a
Default Info for real memory used

For know the how many phisical memory (RAM) is used, i have executed
the following script

#!/usr/bin/sh
# AIX 5L

#set -x

clear

RealMem=`bootinfo -r`
MeM=0

for i in `ps -edf|awk '{print $1}'|sort -u|grep -v UID`
do
svmon -U $i|head -n 4 >> /tmp/DispMem$$-2
done

cat /tmp/DispMem$$-2

for i in `cat /tmp/DispMem$$-2|grep -v "User"|awk '{print $2}'`
do
MeM=`expr $MeM + $i "*" 4`
done

echo;echo "\t********************"
echo "\tTotal ... "${RealMem}"k"
echo "\tUsed .... "${MeM}"k"
DifMem=`expr ${RealMem} - ${MeM}`
echo "\tFree .... "${DifMem}"k"
echo "\t********************";echo

rm /tmp/DispMem$$-*



But i find that the real memory used is great than the phisical memory
(RAM bootinfo -r).
The negative value for free it is allocate to disk (virtual memory) ??


Thank you
Reply With Quote