View Single Post

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

can't you get that with monitor?

jbalino@sscc.osakidetza.net (Balino) wrote in message news:<d6754643.0408302324.56dc4d07@posting.google. com>...
> 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