Linux View Performance Command Introduction

  
                  During the system maintenance process, you may need to check the CPU usage at any time and analyze the system status according to the corresponding information. In CentOS, you can use the top command to view CPU usage. After running the top command, the CPU usage status is displayed in full screen mode and will be in the dialog mode -- with top-based commands, you can control the display mode and more. The command to exit top is q. Let's take a look at the relevant commands.
Linux View performance operation examples:
Enter "top" in the command line to start top
top The full-screen dialog mode can be divided into three parts: system information bar, command input field, process List bar.
Part 1 -- The top system information bar:
The first line (top):
"00:11:04" is the current time of the system;
"3:35" is the system start After the current operation time;
"2 users" is the user currently logged into the system, more specifically the number of terminals logged into the user - the same user will be connected to multiple terminals of the system at the same time For multiple users connected to the system, the number of users here will also be
for the number of terminals;
"load average" is the average of the current system load, the next three values ​​are 1 minute ago, 5 The average number of processes before the minute and 15 minutes ago. Generally, when the value exceeds the number of CPUs, the CPU will be more difficult to carry the process contained in the current system;
The second line (Tasks): Br> "59 total" is the total number of current system processes;
"1 running" is the number of processes currently running;
"58 sleeping" is the number of processes currently in the wait state;
"0 stoped "The number of system processes that were stopped;
"0 zombie" is the number of processes being restored;
the third line (Cpus):
respectively The current CPU usage;
The fourth line (Mem):
indicates the total amount of memory, the current usage, the amount of free memory, and the amount of memory used in the buffer;
The fifth line (Swap) :
indicates that the category is the same as the fourth line (Mem), but it reflects the usage of the swap partition (Swap). Usually, when swap partitions are used frequently, they will be treated as insufficient physical memory.
Part 2 -- The internal command prompt in the middle section:
Linux View performance top You can control the display mode of the process through the internal command of top. The internal commands are as follows:
-Linux View performance change screen update frequency
l - Turn off or turn on the first line of the first line of the first part of the information
t - Close or open the first part of the second line Tasks and the third Representation of row Cpus information
m - Turn off or turn on the first part of the fourth line Mem and the fifth line of the Swap information
N - Arrange the process list in the order of the size of the PID (third part later)
P - Arrange the process list in the order of the CPU usage size (described later in Section 3)
M - Arrange the process list in the order of the memory usage size (described later in the third section)
h - Display help < Br>n - Set the number of processes displayed in the process list
q - Exit top
s -
Linux View performance change screen update cycle
Part 3 - The last part of the process list bar :
The list of processes distinguished by PID will be updated periodically according to the set screen update time. Linux View Performance The top internal command allows you to control how it is displayed.

Copyright © Windows knowledge All Rights Reserved