Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux top command

Linux top command

Linux Command Reference Linux Command Reference

Linux top is a real-time system monitoring tool commonly used on Linux and other Unix-like systems. It provides a dynamic, interactive real-time view showing overall system performance information and information about running processes.

Permissions required: all users.

Syntax

top [-] [d delay] [q] [c] [S] [s] [i] [n] [b]

Parameter Description:

Display information

Some common features and displayed information of the top command:

Overall system information:

Process information:

Features and interactive operations:

Example

Display process information

# top

Display the full command

# top -c

Display program information in batch mode

# top -b

Display program information in cumulative mode

# top -S

Set the number of information updates

top -n 2



// indicates termination of update display after two updates

Set the information update time

# top -d 3



// indicates the update cycle is 3 seconds

Display information for a specified process

# top -p 139



//Display process information for process ID 139, such as CPU and memory usage

Exit after ten updates

top -n 10

The user will not be able to use interactive commands to issue commands to processes

top -s

Linux Command Reference Linux Command Reference