How to find top 10 memory and cpu usage processes
Sometimes server might be responding slowly and need to find which process is consuming high cpu and memory to fix it. Below commands will helpful to find the top 10 cpu and memory usage processes.
Top 10 CPU Usage processes :
$ ps -eo pid,ppid,cmd,%cpu --sort=-%cpu | head -10 PID PPID CMD %CPU 15422 5721 /opt/google/chrome/chrome - 21.7 8610 5721 /opt/google/chrome/chrome - 15.6 29034 5721 /opt/google/chrome/chrome - 7.2 4347 4047 /usr/bin/gnome-shell 6.6 8620 5721 /opt/google/chrome/chrome - 6.5 6837 18023 /usr/lib64/firefox/firefox 5.2 29370 29177 /usr/lib/slack/slack --type 5.1 18023 1 /usr/lib64/firefox/firefox 4.6 5459 18023 /usr/lib64/firefox/firefox 3.3
Top 10 Memory Usage processes :
[ramesh@oc6204431222 ~]$ ps -eo pid,ppid,cmd,%mem --sort=-%mem | head -10 PID PPID CMD %MEM 18023 1 /usr/lib64/firefox/firefox 6.7 2336 2263 /usr/bin/X :0 -background n 6.5 4347 4047 /usr/bin/gnome-shell 5.8 15422 5721 /opt/google/chrome/chrome - 5.4 5593 18023 /usr/lib64/firefox/firefox 4.7 29370 29177 /usr/lib/slack/slack --type 4.0 18132 18023 /usr/lib64/firefox/firefox 3.9 29034 5721 /opt/google/chrome/chrome - 3.7 5699 4347 /opt/google/chrome/chrome 3.1
Share This Post:
more news from the blog