Skip to content

Instantly share code, notes, and snippets.

@0i0
Last active October 4, 2017 15:58
Show Gist options
  • Save 0i0/afd486a1855a0ee4ccb196881f493d13 to your computer and use it in GitHub Desktop.
Save 0i0/afd486a1855a0ee4ccb196881f493d13 to your computer and use it in GitHub Desktop.
get top processes
ps -Ao pid,%cpu,%mem,comm |sort -nrk 2 | head -n 5 | awk '{gsub("(.+/)","",$4);print $4"\t"$1"\t"$2"\t"$3}'| column -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment