Open Metric
Science, Fiction and Me

Today I Learned

TOP Command

For MacOS, the useful commands are

  • sort according to memory: top -o mreg
  • sort according to execution time: top -o time
  • sort according to CPU usage (this is default): top -o cpu
  • sort according to the number of threads running: top -o threads
  • sort according to the corresponding user name: top -o user
  • show only N (a number) processes: top -n N
  • show only one process: top -pid PIDNUMBER (where on linux this should be top -p PIDNUMBER)

For more options, top -h will help.

htop is a great replacement for top, with build in easy sort, graphical representation etc.

A Random #TIL# for You


Most technical TILs will be updated at datumorphism.leima.is/til

By OctoMiao

Last updated