Search Our Database

How to List processes by monitoring RAM usage

Last updated on |
by

To do this, simply SSH to the server and run the command below:

ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20 

You will get something like below:

3642 3.0 /usr/sbin/mysqld
3856 1.9 /usr/local/sbin/clamd
7463 0.7 /usr/sbin/httpd
7767 0.7 /usr/sbin/httpd
7954 0.7 /usr/sbin/httpd
7982 0.7 /usr/sbin/httpd
8809 0.7 /usr/sbin/httpd
14326 0.6 spamd
9285 0.6 /usr/sbin/httpd
9502 0.6 /usr/sbin/httpd
14327 0.5 spamd
4229 0.5 /usr/bin/spamd
13848 0.3 /usr/sbin/httpd
9498 0.3 /usr/sbin/httpd
9505 0.3 /usr/sbin/httpd
9504 0.2 /usr/sbin/httpd
3442 0.1 named
10 0.0 [events/0]
1 0.0 init
11 0.0 [events/1]

The first row is PID, the second row is total percentage RAM consuming, the third row is running process.

This guide is useful when ‘top’ cannot show the running process currently consuming the RAM.