Under SuSE, (Mem: 31908592k total, 31421504k used,) how do i know which process or program using my memory?
Linux TOP Command – Understanding Memory Usage in SUSE
linuxsusetop
linuxsusetop
Under SuSE, (Mem: 31908592k total, 31421504k used,) how do i know which process or program using my memory?
Best Answer
The standard (command-line) program for checking cpu/memory usage for processes is
top
there is also a slightly more feature-fullhtop
however on a lot of systems its bound totop
anyway (same waybash
is almost always bound tosh
on most modern linux systems). There are also various GUI wrappers for top/htop availableAfter opening top, clicking
M
will sort by memory usage.EDIT - 4-12 For clarity I decided to expand on the sorting. Here is a typical
top
window when run from the terminal shell, this is already sorted by%MEM
The column that interests you most is
%MEM
which will give you the share of total available memory used by that process.VIRT
gives the virtual memory footprint of the process, of which onlyRES
amount is currently in physical memory (the rest is swapped out, and not currently shown on the table)In order to sort by a column you hit
F
(shift-F) and the screen will change to the followingas you can see, hitting
n
will select sort by memory percentage (hit enter to return back to the table view). (There is a legacy shortcut Shift-m that will toggle sort by memory when hit on the table view) You can use<
and>
in the table view (shift - , and shift-.) to cycle the column that is sorted.At the table view, hitting lowercase
m
will toggle the memory summary view.Note: I played around with sorting columns so the columns are shuffled from the first image.
Like a lot of unix/linux command line utilities there are many little tricks and things and hidden features - top is a very powerful tool. For instance, you can show multiple tables at the same time (say the top 5 instead of top 20 but for 4-5 different parameters)- how? I don't know, but I accidentally got to that when taking the screenshots. A full chapter of a good book on *nix can be devoted to
top
, so the summary above is just a small primer to get what you need to know about your processes.