top - display Linux processes
top
Options you will use
-b- Batch mode: print plain text instead of the full-screen display (for scripts and logs).
-n NUMBER- Exit after this many updates: top -b -n1 is one snapshot.
-H- Show threads instead of processes.
-p PID- Monitor only these PIDs (comma separated).
-d SECONDS- Delay between updates.
Gotchas
- Keys: 1 shows per-CPU lines, M sorts by memory, P sorts by CPU, k kills, q quits.
- The load average line counts R plus D processes. %wa is time waiting on I/O.
Taught in
Try top in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.