Find the answer to your Linux question:
Results 1 to 5 of 5
I'm looking for a way to monitor memory usage based on procid ... both res and shared mem. Where can I find this information? I was thinking about /proc/PID/status....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    3

    Monitor process memory usage


    I'm looking for a way to monitor memory usage based on procid ... both res and shared mem. Where can I find this information? I was thinking about /proc/PID/status.

  2. #2
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Sorry, I'm not entirely sure what you're looking for but have you tried looking at the /proc/meminfo file and using top to monitor memory usage?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    3
    Thanks .. but /proc/meminfo gives the sytem information. I am interested in process information.

    Basically for each process I want to look at Total, Res and Shared memory. I am running Linux version 2.6.10. I believe /proc/pid/statm provides this information but it is broken in this version.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User DThor's Avatar
    Join Date
    Jan 2006
    Location
    Ca..na...daaa....
    Posts
    319
    You needed it in a form other than "top" gives you? It has quite a few options for batch processing.

    DT

  6. #5
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2

    Thumbs up This is what you are exactly looking for.

    See these links and follow the guide, I am using this and one more script provided by him, ( not available on the channel ) For my application monitoring and also paging etc in case the application's memory usage goes beyond specified limits..

    Memory usage Retrieval on Linux ( process wise and general )

    How much RAM is used per program .


    -- Ritu

Posting Permissions

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