Skip to content

Instantly share code, notes, and snippets.

@TerryFunggg
Last active January 16, 2021 04:55
Show Gist options
  • Save TerryFunggg/ce598a3ab5607d4dc0a1e5e600397af4 to your computer and use it in GitHub Desktop.
Save TerryFunggg/ce598a3ab5607d4dc0a1e5e600397af4 to your computer and use it in GitHub Desktop.
Linux command for finding high CPU consumption process
ps -eo pid,ppid,%mem,%cpu,comm --sort=-%cpu | head
# Result :
#
# PID PPID %MEM %CPU COMMAND
# 948934 948837 2.9 44.4 spotify
# 948781 1 2.9 27.5 spotify
# 948876 948836 1.5 9.2 spotify
# 80755 1 7.5 5.3 firefox
# 948919 948781 1.1 3.6 spotify
# 393 1 0.0 2.2 dbus-daemon
# 577 536 0.0 2.0 dbus-daemon
# 11760 11747 0.1 1.9 zscroll
# 11577 420 1.4 1.5 Xorg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment