cheat:top
# To update every <interval> samples:
top -i <interval>
# To set the delay between updates to <delay> seconds:
top -s <delay>
# To set event counting to accumulative mode:
top -a
# To set event counting to delta mode:
top -d
# To set event counting to absolute mode:
top -e
# To not calculate statistics on shared libraries, also known as frameworks:
top -F
# To calculate statistics on shared libraries, also known as frameworks (default):
top -f
# To print command line usage information and exit:
top -h
# To order the display by sorting on <key> in descending order:
top -o <key>
tldr:top
# top
# Display dynamic real-time information about running processes.
# More information: <https://manned.org/top>.
# Start top:
top
# Do not show any idle or zombie processes:
top -i
# Show only processes owned by given user:
top -u username
# Sort processes by a field:
top -o field_name
# Show the individual threads of a given process:
top -Hp process_id
# Show only the processes with the given PID(s), passed as a comma-separated list. (Normally you wouldn't know PIDs off hand. This example picks the PIDs from the process name):
top -p $(pgrep -d ',' process_name)
# Get help about interactive commands:
?
$
cheat.sh