----------------------------------common commands in your work to determine if the server status is normal-------------------------------------
The top command is real-time actual server current CPU, memory, load, process and other information
First line:
00:09:14-Current system time
1days, 13:14-the system has been running for 1 days, 13 hours, 14 minutes (not restarted during this period)
1 users-currently has 1 users logged into the system
The three numbers behind the load average:0.75, 0.91, 0.95-load average are 1-minute, 5-minute, 15-minute loads respectively.
Second line:
tasks-task (process), the system now has a total of 276 processes, of which there are 2 running, 274 in hibernation (sleep), stoped state of 0, zombie State (zombie) 0
Third line: CPU status
6.7% us-The percentage of CPU consumed by user space.
0.9% sy-The percentage of CPU consumed by the kernel space.
0.0% ni-The percentage of CPU that has changed the priority of the process
91.6% id-Idle CPU percentage
0.5% Wa-io waiting for CPU percentage
0.0% hi-Hard Interrupt (Hardware IRQ)% of CPU occupied
0.3% si-Soft Interrupt (software interrupts)% of CPU occupied
0.0% st-The percentage of CPU consumed by virtual memory
Line four: Memory status
7138276k total-Total Physical memory (7GB)
3573996k used-Total Memory in use (3.5GB)
3564280k free-Total free memory (3.5G)
177540k buffers-Cache Memory (177M)
Line five: Swap swap partition
0k total-Swap Area total (0GB)
Total swap area used by 0k used-(0M)
0k free-Total Idle swap area (0GB)
770076k cached-Buffer Swap area total (770M)
Line Six is a blank line
Line seventh below: status monitoring of each process (Task)
pid-Process ID
user-Process Owner
pr-Process Priority
The Ni-nice value. Negative values indicate high priority, positive values indicate low priority
The virtual memory value, in kilobytes, that the virt-process occupies. Virt=swap+res
The res-process consumes the physical memory value, in kilobytes. Res=code+data
Shared memory value used by the shr-process, in kilobytes
S-process state. d= non-disruptive sleep status r= run s= sleep t= track/stop z= zombie Process
%cpu-percentage of CPU time that was last updated to current
Percentage of physical memory used by the%mem-process
Total CPU time used by the time+-process, Unit 1/100 sec
command-Process Name (command name/command line)
While the top command is in use, you can also use some interactive commands to complete the functionality of other parameters.
1: Shows CPU cores taking up resource usage.
< space;: Refresh now.
P: Sort According to CPU usage size.
T: Sort by time, cumulative time.
Q: Exit the top command.
M: Toggles display memory information.
T: Toggles display of process and CPU status information.
C: Toggle display command name and full command line.
M: Sorts according to the size of the memory used.
W: Writes the current settings to the ~/.TOPRC file. This is the recommended way to write top configuration files.
B: Turn on/off the highlight effect of the Allow status process
x: Turn on/off the current sort CPU or memory or run time highlight effect
F: View the current format in which you can define your display content
Z:top Interface Color Switch
Z:top interface color selection (available in 0-7 colors)
Monitoring Server Status command--top under Linux