Latest web development tutorials

Linux top command

Linux command Daquan Linux command Daquan

Linux top command to display real-time dynamic process of.

Access: All users.

grammar

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

Parameter Description:

  • d: to change the display update rate, or the conversational command line (interactive command) by s
  • q: There is no display speed delay, if the user is superuser privileges, the top priority will be the implementation of the highest order
  • c: switch the display mode, there are two modes, one show only the name of the executable file, the other is display the full path and name S: accumulation mode, it will have been completed or lost child process (dead child process) of CPU time accumulated
  • s: safe mode, conversational instruction canceled, to avoid potential crises
  • i: do not show any idle (idle) or useless (zombie) trip
  • n: number of updates, will quit after completion top
  • b: batch file mode, with the "n" parameter used together, the results can be used to output to a file within the top

Examples

Display process information

# top

Show full command

# top -c

In batch mode display program information

# top -b

In the cumulative mode display program information

# top -S

Setting information update frequency

top -n 2

//表示更新两次后终止更新显示

Setting information update

# top -d 3

//表示更新周期为3秒

Displays the specified process information

# top -p 139

//显示进程号为139的进程信息,CPU、内存占用率等

Displays exit after ten update

top -n 10

Users will not be able to use conversational commands for the next trip command

top -s

We will update the display results of the second input to the name of top.log archives

top -n 2 -b < top.log

Linux command Daquan Linux command Daquan