Categories
Uncategorized

List of Processes consuming most of the RAM/Memory with ps command – Linux

This command will list the processes which are consuming most of the RAM. I am using ‘head -n 10‘ to list only top 10 memory intense process. You may remove it from the last.
Command:-

ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | head -n 10

 

5312.29 Mb /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/server.the-d2.com.pid --socket=/var/lib/mysql/mysql.sock
1060.39 Mb /usr/bin/node /home/the-d2/public_html/main.js
426.16 Mb /usr/bin/clamscan -
363.12 Mb memcached -d -p 11211 -u memcached -m 1024 -c 1024 -P /var/run/memcached/memcached.pid -l 127.0.0.1
223.23 Mb /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
54.77 Mb /usr/libexec/webmin/virtual-server/lookup-domain-daemon.pl
23.51 Mb lfd - sleeping
16.94 Mb /usr/bin/php-cgi
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.11 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf

 

 

Memory intense process
High Memory consuming process

 

Leave a Reply