Sunday, 17 June 2018

How to find out top 10 CPU and Memory Consuming Process in Linux



In this article, we will show how to find out the resource consumption in a Linux box to figure out the exact issue? “ps” command is a most powerful and popular to achieve our requirements.
The command “ps” command has a lot of options to optimize output as per our requirements.

[root@linuxcnf ~]# ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
PID     PPID   CMD                                              %MEM           %CPU
30118     1        /usr/sbin/mysqld –daemoniz                  16.4               2.4
581       1        /usr/lib/systemd/systemd-jo                    0.4                0.0
991       1        /usr/sbin/rsyslogd –n                            0.2                0.0
985      1        /usr/sbin/winbindd –foregr                     0.2                0.0
2185    985     /usr/sbin/winbindd –foregr                     0.1                 0.0
2482    985    /usr/sbin/winbindd –foregr                     0.0                0.0
762      1        /usr/lib/polkit-1/polkitd -                        0.0                0.0
19524  1904    pickup -l -t unix –u                              0.0                0.0
16405  988     sshd: linuxcnf [priv]                              0.0               0.0
[root@linuxcnf ~]#

The above command will display the list of top 10 CPU and Memory Consumption Process!!!

No comments:

Post a comment