← All languages
$_
Bash command of the day
Random

top

Display real-time system process information.

Description

The top command provides a dynamic, real-time view of a running system. It displays system summary information and a list of processes currently being managed by the kernel, sorted by CPU usage by default.

The display is updated periodically and shows CPU and memory usage, load averages, uptime, and per-process details. The -d option sets the update interval, -p monitors specific PIDs, -u filters by user, and -n limits the number of iterations before exiting.

Top is one of the most commonly used tools for monitoring system performance and identifying processes that are consuming excessive resources.

Arguments

NameDescriptionOptional
-d Delay between screen updates in seconds. Yes
-p Monitor only the specified PIDs. Yes
-u Display only processes belonging to the specified user. Yes
-n Number of iterations before top exits. Yes
-b Batch mode; useful for sending output to a file or another command. Yes

Example

top
top -d 5
top -u www-data
top -p 1234,5678
top -bn 1 > top-output.txt