Real-Time Process Monitoring
Default output columns are recognizable from other resource tools:
- The process ID (PID).
- User name (USER) is the process owner.
- Virtual memory (VIRT) is all memory the process is using, including the resident set, shared libraries, and any mapped or swapped memory pages. (Labeled VSZ in the ps command.)
- Resident memory (RES) is the physical memory used by the process, including any resident shared objects. (Labeled RSS in the ps command
- Process state (S) displays as:
- D = Uninterruptible Sleeping
- R = Running or Runnable
- S = Sleeping
- T = Stopped or Traced
- Z = Zombie
- CPU time (TIME) is the total processing time since the process started. May be toggled to include cumulative time of all previous children.
- The process command name (COMMAND).
Fundamental Keystrokes in top
|? Or H||Help for interactive keystrokes.|
|L,T,M||Toggles for load, threads, and memory header lines.|
|1||Toggle showing individual CPUs or a summary for all CPUs in header.|
|S||Change the refresh (screen) rate, in decimal seconds (e.g., 0.5, 1, 5).|
|B||Toggle reverse highlighting for Running processes; default is bold only.|
|B||Enables use of bold in display, in the header, and for Running processes.|
|Shift+H||Toggle threads; show process summary or individual threads.|
|U, Shift+U||Filter for any user name (effective, real).|
|Shift+M||Sorts process listing by memory usage, in descending order.|
|Shift+P||Sorts process listing by processor utilization, in descending order.|
|K||Kill a process. When prompted, enter PID, then signal.|
|R||Renice a process. When prompted, enter PID, then nice_value.|
|Shift+W||Write (save) the current display configuration for use at the next top restart.|
How to Control Processes in Linux using bg, fg and jobs Commands
How to Kill Processes in Linux using – kill, pkill, killall
Interpreting Displayed Load Average Values in “uptime” Command Output
Understanding ‘top’ Command Output Fields in Linux