Similarly to the previous tip about find out top processes by RAM and CPU usage, you can also use top command to view the same information. Perhaps there’s an extra advantage of this approach when compared to the previous one: the “header” of top provides extra information about the current status and usage of the system: the uptime, load average, and total number of processes, to name a few examples.
To display the top 15 processes sorted by memory use in descending order, do:
As opposed to the previous tip, here you have to use
+%MEM
(note the plus sign) to sort the output in descending order:
From the command above, the option:
-b
: runs top in batch mode-o
: used to specify fields for sorting processeshead
utility displays the first few lines of a file and- the
-n
option is used to specify the number of lines to be displayed.
No comments:
Post a Comment