A crash course in top

The top program is a text based application that displays a real-time summary of resource usage and a list of processes.
The on-screen display can be modified by issuing commands linked to keyboard keys

Type top to launch the program and try these common commands:
t
Toggles between text and graphical views of CPU usage (none, text, pipes, solid)
m
Toggles between text and graphical views of memory usage (none, text, pipes, solid)
E
Toggles unit size for memory (KiB through EiB)
1
[1] Shows CPU usage per core, while [2] shows per socket
c
Toggle COMMAND to/from executable vs full cmd line
d
Change refresh rate; Enter number in increments of .1 seconds
<
Change sort column one column to the left
>
Change sort column one column to the right
Note: it can be hard to detect which column is currently sorted
Recommend pressing [<] repeatedly to ensure sort order is left-most column
Then pressing [>] and counting off each Column
R
Toggle ascending/descending sort order of current column
Scroll down through list of processes
Scroll up through list of processes
Scroll right for information that runs offscreen
Scroll left to return from offscreen data
u
Filter by user; enter a username at the prompt
o
Filter by Other columns; COLUMN=pattern
=
Clear all column filters
h
Display an information dense cheat sheet of commands
W
Save configuration; applies current configuration on subsequent starts


Extended Topics
How to read graphical view of usage [Click To Expand]
In graphical mode CPU, RAM, & Swap are shown as:
%Cpu(s)
user%/sys%
total%
[|||||||
]
Unit Mem :
%used/amntM
 
[||||||||||
]
Unit Swap:
%used/amntS
 
[||||
]
 
user%
= Percentage of CPU used for user processes
 
sys%
= Percentage of CPU used for system processes
 
total%
= Percentage of CPU used for all processes
 
Unit
= The unit size for memory (i.e. GibiBytes)
 
%used
= Percentage of RAM/Swap used
 
amntM
= Amount of Memory(RAM) host has
 
amntS
= Amount of Swap space host has
How to Add, Remove, & Reorder columns [Click To Expand]
  • f
    Select Columns to Display, Hide, and Order
  •  
    To display or hide columns
  •  
    Asterix indicates displayed columns
  •  
    [Arrow Up/Down] to highlight a column
  •  
    [SPACE] to display/hide
  •  
    To change column order
  •  
    [Arrow Up/Down] to highlight a column
  •  
    [Arrow Right] to "pickup" the column
  •  
    Note how the highlight expands to the description
  •  
    [Arrow Up/Down] to move the column
  •  
    [Arrow Left] to "drop" the column into place
  •  
    To select the default column to sort on
  •  
    [Arrow Up/Down] to highlight a column
  •  
    [s] to select the highlighted column
  •  
    Note column name appears at end of very top line
  • ESC
    to exit Column Selection screen; Changes are applied instantly
  • Understanding Load Average [Click To Expand]
  •  
    * SkyView Perspective *
  •  
    Load average can be thought of as:
          "the number of cores needed to work on all running or waiting to be run tasks"
  •  
    When Load Average is _____ than the actual core count:
  •  
    less    = Good: there are unused resources
  •  
    equal  = Ok: all cores busy, no tasks waiting for a free core
  •  
    more  = Busy: all cores busy, tasks waiting for free cores
  •  
    The first line in top shows how the load is changing over time
  •  
    1st # = average load over last 1 minute
  •  
    2nd # = average load over last 5 minutes
  •  
    3rd # = average load over last 15 minutes