Finding out memory usage on Linux

Since having my own server I'm becoming a little OCD on memory usage.

There are two tools I have been using which are

  1. Top:
    view plain print about
    1$ top
    Once its loaded press shift-m to sort by memory. You can read more here
  2. Free
    view plain print about
    1$ Free -m
    This is a high level view of whats being used and whats free. You can read more about this here. Don't worry about the first line of output here its always close as Linux automatically uses all the RAM you've got for caching etc. The second line is usage without counting the OS-internal buffers and cache and is the "real" RAM utilization. * (Thanks to Barney Boisvert for his help on better understanding these :))

Posted: 24-Apr-2009

View: 1761

Permalink: here

Comments

If you want a prettier version of "top" you can use "htop". Still console based, but a bit nicer :o)

#1 James Marshall
24/Apr/09 5:42 PM