Results 1 to 2 of 2
Hi all,
I have a server with several users. so I need to monitor their Disc and memory usage individually, Can any one help me.....?
I create perl script (using ...
- 11-03-2011 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 23
Help for monitor memory and Disc usage by each users
Hi all,
I have a server with several users. so I need to monitor their Disc and memory usage individually, Can any one help me.....?
I create perl script (using free -tom and df -h) it can give overall server disc and memory usage but I need to get individual user usage please help.
- 11-03-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,844
For memory usage, you could do something like:
For disk usage, something like:Code:for pid in $(ps -o pid -u $USER); do pmap -d $pid|awk '/^mapped/{print $3,$4}';done
Code:du -sm /home/$USER du -smc $(find /tmp/ -user $USER)


Reply With Quote