+ Reply to Thread
Results 1 to 7 of 7

Thread: Memory Usage break-down

  1. #1
    Jordan Guest

    Memory Usage break-down

    This is a neat little tip I just learned. If you want to see a breakdown of how your system memory is being used there is a file you can cat. The file is located at /proc/meminfo.

    Run:
    Code:
    # cat /proc/meminfo
    Results:
    Code:
    MemTotal:      2010416 kB
    MemFree:        319872 kB
    Buffers:        322192 kB
    Cached:         656664 kB
    SwapCached:          0 kB
    Active:         928904 kB
    Inactive:       620452 kB
    HighTotal:     1113856 kB
    HighFree:        62416 kB
    LowTotal:       896560 kB
    LowFree:        257456 kB
    SwapTotal:     2096472 kB
    SwapFree:      2096472 kB
    Dirty:            8360 kB
    Writeback:           0 kB
    AnonPages:      570464 kB
    Mapped:          15756 kB
    Slab:           124304 kB
    PageTables:       8432 kB
    NFS_Unstable:        0 kB
    Bounce:              0 kB
    CommitLimit:   3101680 kB
    Committed_AS:  1612408 kB
    VmallocTotal:   114680 kB
    VmallocUsed:      3576 kB
    VmallocChunk:   110368 kB
    HugePages_Total:     0
    HugePages_Free:      0
    HugePages_Rsvd:      0
    Hugepagesize:     4096 kB
    You can see how and where your memory is being utilized.

  2. CODECALL Circuit advertisement

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    Thats one of the great things about Linux, everything is a file. There is a multitude of other useful information that is found within files in the proc directory as well.

  4. #3
    Hektor is offline Programmer
    Join Date
    Jan 2007
    Posts
    126
    Rep Power
    0
    Quote Originally Posted by John View Post
    Thats one of the great things about Linux, everything is a file. There is a multitude of other useful information that is found within files in the proc directory as well.
    Oh? What other information can we extract?

  5. #4
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    Well, if you cd to your proc directory type ls, all the numbered directories refer to your process id's. You can cd into those directors and get information about each process, for example the cmdline file displays the command used to run that process. Just look through the proc directory, the file names are pretty discriptive.

  6. #5
    Jordan Guest
    Thanks for the info John!

  7. #6
    SexYLinuX Guest
    So you can cd into the processes?

  8. #7
    mop
    mop is offline Learning Programmer
    Join Date
    Apr 2008
    Posts
    30
    Rep Power
    0
    What other information can I get?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I need advice on optimizing memory usage.
    By DarkLordoftheMonkeys in forum C and C++
    Replies: 17
    Last Post: 04-11-2010, 02:13 PM
  2. Please help before I break something...
    By Parabola in forum Database & Database Programming
    Replies: 5
    Last Post: 08-27-2009, 07:19 AM
  3. Replies: 4
    Last Post: 10-06-2008, 07:05 AM
  4. Memory usage by user
    By Tor in forum Linux/Unix General
    Replies: 3
    Last Post: 02-21-2008, 03:47 PM
  5. Memory usage tool
    By kia in forum C and C++
    Replies: 3
    Last Post: 01-20-2008, 05:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

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