Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    26

    Red face 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.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    For memory usage, you could do something like:

    Code:
    for pid in $(ps -o pid -u $USER); do pmap -d $pid|awk '/^mapped/{print $3,$4}';done
    For disk usage, something like:
    Code:
    du -sm /home/$USER
    du -smc $(find /tmp/ -user $USER)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •