1845613 Members
3815 Online
110246 Solutions
New Discussion

User memory usage

 
SOLVED
Go to solution
Sébastien N
Advisor

User memory usage

Hi,

I want to monitor memory usage for a user (swap+ram) and, if possible for each process of this user.
How to do that with glance or with another tool ?

Thanx.
1 REPLY 1
twang
Honored Contributor
Solution

Re: User memory usage

#!/bin/ksh

t=0
for j in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -
rnk1 | grep -v Kbytes | grep | awk '{print $1}'`
do
t=`expr $t + $j`
done
echo "\nMemory claimed by : $t Kbytes .\n"

I use the above script to find out how much memory claimed by a particular user.