Linux system monitoring tools

Source: Internet
Author: User

For Linux system administrators, monitoring the system is very important. There are many Linux system monitoring tools, and top is the most commonly used one. It can dynamically observe the status of system processes, so that the system administrator can understand the status of system resources in real time. This article provides an in-depth introduction to the parameters of the top tool.

AD:

As one of the most common and important Linux system monitoring tools in daily management work, top can dynamically observe the system process status, so that the system administrator can understand the system resource status in real time.


Common hotkeys Purpose
T Displays summary information.
M Enable or disable display of memory information.
A Categories show large users of different resources in the system. It helps to quickly identify tasks that consume many resources in the system.
F Add or delete columns to be displayed.
O Adjust the order of the columns to be displayed.
R Adjust the nice value of a running process.
K End a running process.
Z Color/black/white display Switch

1. Related default values

Global

'A'-Alternate Display Mode

* 'D'-Refresh Interval

'I'-IRIX Mode

* 'P'-monitor specific PID

*'S '-Security Mode

'B'-bold display

 

Off (full screen display by default, alternate display on)

3.0 seconds

On

Off

Off

Off

Summary Area

'L'-average load and system running time

'T'-task and CPU status

'M'-memory and swap space status

'1'-single CPU display

 

On

On

On

On (if the system contains multiple processors, only one row is displayed)

Task area

'B'-/reversed colors show highlighted rows/columns

* 'C'-command line for task execution

* 'H'-display thread

* 'I'-display idle tasks

'R'-reverse display

*'S '-accumulative time

'X'-highlight the sorted Columns

'Y'-highlight a running task

'Z'-color/black/white display

 

On (off)

Off (only the task name is displayed, and the full format of the task is not displayed)

Off

On

On

Off

Off

On

Off

Note: * When top is started, use the command line parameter to overwrite the specified parameter value.

Ii. Command Line startup parameters:

Usage: top-HV |-bcisshm-D delay-N iterations [-u user |-u user]-p pid [, PID...]

-B: Run in batch mode. It is usually used to transmit the output results of top to other programs or store them as files.

-C: displays the command line for executing the task.

-D: Set the delay time.

-H: Help

-H: displays threads. When this setting is enabled, the threads generated by all processes are displayed.

-I: displays idle processes.

-N: number of executions. Generally used in combination with-B

-U: monitors user-related processes.

-U: monitors user-related processes.

-P: monitors the specified process. Process IDs are separated by commas (,) when multiple processes are monitored. This option can only be used in the command line.

-S: Safe mode operation

-S: accumulative time mode

-V: displays the top version and exits.

-M: Memory Unit automatically displayed (K/M/G)

3. Column Information

In the top table, 26 English letters are used to match the information field of the process. You can use F to add or remove a specified column, and use o to adjust the display order of the column. The following sections describe these fields.

A: PID (process ID): ID of the task process

B: ppid (parent process PID): process ID of the parent task

C: ruser (real User Name): Real Name of the task owner

D: UID (User ID): ID of the task owner

E: User name: Task owner name

F: group (group name): name of the task owner Group

G: tty (controlling TTY): Terminal

H: Pr (priority): Priority

I: Ni (Nice value): Nice Value

J: P (last used CPU (SMP )):

K: % CPU (CPU usage): CPU usage

L: Time (CPU time): CPU time

M: Time + (CPU time, hundredths): CPU time, accurate to seconds

N: % MEM (memory usage (RES): memory usage

O: virt (virtual image (Kb): virtual memory. Virt = swap + Res

P: swap (swapped size (Kb): swap space

Q: res (resident size (Kb): resident memory. Res = code + Data

R: Code (code size (Kb )):

S: data (data + stack size (Kb )):

T: SHR (shared mem size (Kb): shared memory.

U: nflt (page fault count ):

V: mcm t (dirty pages count ):

W: S (Process status): Process status

There are the following types:

D = uninterruptible sleep = cannot be awakened to sleep

R = running

S = sleeping = sleep

T = traced or stopped = error or stop status

Z = zombie status

X: Command (command line or program name): process name or command line

Y: wchan (sleeping in function ):

Z: Flags (Task flags ):

Example 1: add and remove process information fields (input F)

 

Example 2: Adjust the display sequence of the Process Information Field (input O)

Iv. Interactive commands

1. Global commands

Press enter and space: refresh the display information

? , H: Help

=: Remove the display restrictions of all tasks

A: Switching the alternate Display Mode

B: Switch in bold

D. S: Change the interface Refresh Interval

G: select another window/column group.

I: IRIX or Solaris mode switch

U and U: monitor specific user processes

K: Process Termination

Q: Exit top.

R: reset the nice value of the process.

W: current storage settings

Z: change the color Template

2. Summary Area Command

L: average load and system running time display Switch

M: memory and swap space usage display Switch

T: current task and CPU Status display Switch

1: CPU status is displayed in summary or separately.

3. Task zone commands

Appearance Style

B: The highlighted rows/columns are displayed in black/reversed colors. Controls the explicit format of X and Y interactive commands.

X: highlight the sorted Columns

Y: highlight a running task

Z: color/black/white display.

Display content

C: name of the command line or process for executing the task

F. O: add and remove process information fields and adjust the display sequence of process information fields.

H: display thread

S: Time Accumulation Mode

U: monitors user-related processes.

Number of tasks displayed

I: displays idle processes.

N or #: set the maximum number of tasks displayed

Task sorting

M: sort by memory usage

N: sort by PID

P: sort by CPU usage

T: sort by time +

<: Sort by the adjacent column on the left of the current sorting Column

>: Sort by the adjacent column on the right of the current sorting Column

F or O: select the sorting Column

R: reverse sorting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.