1 Check the system health status
Planned restart is the basic principle of server maintenance
[root@localhost ll]# top
top - 11:27:11 up 2:25, 3 users, load average: 0.00, 0.01, 0.05
Tasks: 155 total, 2 running, 153 sleeping, 0 stopped, 0 zombie
%Cpu (s): 0.3 us, 0.7 sy, 0.0 ni, 99.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1016860 total, 349232 free, 310992 used, 356636 buff/cache
KiB Swap: 4194300 total, 4194300 free, 0 used. 522180 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5503 root 20 0 146132 2016 1420 R 0.7 0.2 0:00.36 top
1176 root 20 0 553044 18384 5752 S 0.3 1.8 0:03.95 tuned
3445 root 20 0 0 0 0 S 0.3 0.0 0:05.10 kworker/0:0
1 root 20 0 126580 7344 2616 S 0.0 0.7 0:05.78 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.12 ksoftirqd/0
6 root 20 0 0 0 0 S 0.0 0.0 0:00.18 kworker/u2:0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
The first line of information is the task queue information
Three second behavior process information
Fourth and third line CPU information
Fifth and fourth line physical memory information
Six Fifth Behavior SWAP Information
Seven differences between buffering and caching
Buffer: When writing data from memory to hard disk, it will be written to the buffer first. Speed up data writing.
Cache (cache): When data is read from the hard disk to the memory, the cache will be read first. Speed up the reading of data.
Eight use top to view all processes
top -b -n 1 > /root/top.log