Linux系统卡慢之调优方法

时间:2022-11-06 01:04:49

(Linux系统卡慢之调优方法)

一、查看当前系统装态

1.查看当前进程状态

系统负载过高,系统相当卡慢

top - 23:08:47 up 11:01,  1 user,  load average: 925.72, 927.01, 917.04
Tasks: 3418 total, 1046 running, 2372 sleeping,   0 stopped,   0 zombie
%Cpu(s): 35.5 us, 63.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.6 hi,  0.9 si,  0.0 st
MiB Mem :   3918.5 total,    476.1 free,   2900.9 used,    541.5 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.    728.1 avail Mem 

  

2.查看内存情况

查看内存及swap使用情况

[root@control scripts]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3918        2920         456          15         541         708
Swap:          2047  

二、对系统各进程排序

1.对cpu使用率进行降序排列

[root@control scripts]# 
[root@control scripts]# ps aux --sort=-%cpu |head -n 20
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      35004  1.0  0.1  58044  5104 pts/0    R+   23:30   0:00 ps aux --sort=-%cpu
root     121033  0.3  0.0      0     0 ?        I    23:30   0:00 [kworker/0:3-events]
root         10  0.2  0.0      0     0 ?        I    12:07   1:37 [rcu_sched]
root      48011  0.2  0.0      0     0 ?        I    23:26   0:00 [kworker/0:0-cgroup_pidlist_destroy]
mysql      1244  0.1  9.9 1357880 397984 ?      Ssl  12:07   1:14 /usr/libexec/mysqld --basedir=/usr
root      72606  0.1  0.0      0     0 ?        I    23:20   0:00 [kworker/0:1-xfs-cil/nvme0n1p5]
root          1  0.0  0.3 197248 15652 ?        Ss   12:07   0:05 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
root          2  0.0  0.0      0     0 ?        S    12:07   0:00 [kthreadd]
root          3  0.0  0.0      0     0 ?        I<   12:07   0:00 [rcu_gp]
root          4  0.0  0.0      0     0 ?        I<   12:07   0:00 [rcu_par_gp]
root          6  0.0  0.0      0     0 ?        I<   12:07   0:00 [kworker/0:0H-kblockd]
root          8  0.0  0.0      0     0 ?        I<   12:07   0:00 [mm_percpu_wq]
root          9  0.0  0.0      0     0 ?        S    12:07   0:11 [ksoftirqd/0]
root         11  0.0  0.0      0     0 ?        S    12:07   0:00 [migration/0]
root         12  0.0  0.0      0     0 ?        S    12:07   0:00 [watchdog/0]
root         13  0.0  0.0      0     0 ?        S    12:07   0:00 [cpuhp/0]
root         15  0.0  0.0      0     0 ?        S    12:07   0:00 [kdevtmpfs]
root         16  0.0  0.0      0     0 ?        I<   12:07   0:00 [netns]
root         17  0.0  0.0      0     0 ?        S    12:07   0:00 [kauditd]

2.对内存占有大小进行降序排列

[root@control scripts]# ps aux --sort=-%mem |head -n 20
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mysql      1244  0.1  9.9 1357880 397984 ?      Ssl  12:07   1:14 /usr/libexec/mysqld --basedir=/usr
gdm        1955  0.0  3.5 2843996 141372 tty1   Sl+  12:07   0:14 /usr/bin/gnome-shell
gdm        2042  0.0  1.3 259244 52788 tty1     S+   12:07   0:00 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
gdm        2117  0.0  1.3 1240264 52700 tty1    Sl+  12:07   0:00 /usr/libexec/gsd-media-keys
gdm        2125  0.0  1.2 745352 51832 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-power
gdm        2109  0.0  1.2 809320 51508 tty1     Sl+  12:07   0:03 /usr/libexec/gsd-color
gdm        2094  0.0  1.2 646964 51092 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-xsettings
gdm        2146  0.0  1.2 581116 50628 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-wacom
gdm        2115  0.0  1.2 645832 50520 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-keyboard
gdm        2103  0.0  1.2 496092 50064 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-clipboard
gdm        2071  0.0  1.2 496540 50048 tty1     Sl   12:07   0:00 /usr/libexec/ibus-x11 --kill-daemon
root        986  0.0  1.0 1167316 41504 ?       Ssl  12:07   0:00 /usr/sbin/libvirtd
root        883  0.0  0.8 202764 35484 ?        S    12:07   0:00 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
root        909  0.0  0.8 252904 35064 ?        Ssl  12:07   0:00 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid
root        976  0.0  0.7 401624 30708 ?        Ssl  12:07   0:03 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
polkitd     796  0.0  0.6 1780272 26932 ?       Ssl  12:07   0:17 /usr/lib/polkit-1/polkitd --no-debug
root        948  0.0  0.4 407028 18992 ?        Ssl  12:07   0:00 /usr/sbin/NetworkManager --no-daemon
root       1463  0.0  0.4 377288 18600 ?        Ssl  12:07   0:01 /usr/sbin/rsyslogd -n
root        630  0.0  0.4  93740 16316 ?        Ss   12:07   0:02 /usr/lib/systemd/systemd-journald

3.对top内存进行排序

top - 23:33:59 up 11:26,  1 user,  load average: 970.20, 946.03, 935.18
Tasks: 3753 total, 1442 running, 2311 sleeping,   0 stopped,   0 zombie
%Cpu(s): 34.5 us, 64.2 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.5 hi,  0.8 si,  0.0 st
MiB Mem :   3918.5 total,    414.7 free,   2962.2 used,    541.7 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.    666.9 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                  
  1244 mysql     20   0 1357880 397984  31000 S   0.3   9.9   1:14.84 mysqld                                                                   
  1955 gdm       20   0 2843996 141372  83436 S   0.0   3.5   0:14.18 gnome-shell                                                              
  2042 gdm       20   0  259244  52788  36968 S   0.0   1.3   0:00.27 Xwayland                                                                 
  2117 gdm       20   0 1240264  52700  41848 S   0.0   1.3   0:00.21 gsd-media-keys                                                           
  2125 gdm       20   0  745352  51832  41280 S   0.0   1.3   0:00.22 gsd-power                                                                
  2109 gdm       20   0  809320  51508  40704 S   0.0   1.3   0:03.53 gsd-color                                                                
  2094 gdm       20   0  646964  51092  40404 S   0.0   1.3   0:00.12 gsd-xsettings                                                            
  2146 gdm       20   0  581116  50628  39968 S   0.0   1.3   0:00.12 gsd-wacom                                                                
  2115 gdm       20   0  645832  50520  40268 S   0.0   1.3   0:00.12 gsd-keyboard                                                             
  2103 gdm       20   0  496092  50064  39860 S   0.0   1.2   0:00.11 gsd-clipboard                                                            
  2071 gdm       20   0  496540  50048  39896 S   0.0   1.2   0:00.09 ibus-x11                                                                 
   986 root      20   0 1167316  41504  30084 S   0.0   1.0   0:00.47 libvirtd                                                                 
   883 root      20   0  202764  35484  34132 S   0.0   0.9   0:00.85 sssd_nss                                                                 
   909 root      20   0  252904  35064  14704 S   0.0   0.9   0:00.65 firewalld                                                                
   976 root      20   0  401624  30708  14352 S   0.0   0.8   0:03.27 tuned                                                                    
   796 polkitd   20   0 1780272  26932  16804 S   0.0   0.7   0:17.74 polkitd                                                                  
   948 root      20   0  407028  18992  15840 S   0.0   0.5   0:00.68 NetworkManager                                                           
  1463 root      20   0  377288  18600   9692 S   0.0   0.5   0:01.53 rsyslogd                                                                 
   630 root      20   0   93740  16316  12884 S   0.0   0.4   0:02.09 systemd-journal                                                          
     1 root      20   0  197248  15652   9004 S   0.0   0.4   0:05.75 systemd                                                                  
  2273 root       9 -11  382676  14532   8916 S   0.0   0.4   0:00.55 pulseaudio                                                               
   667 root      20   0  120404  14484   8384 S   0.0   0.4   0:00.58 systemd-udevd                                                            
  1926 gdm       20   0  561288  14204  11996 S   0.0   0.4   0:00.22 gnome-session-b                                                          
  1503 apache    20   0 1475088  13648   6384 S   0.0   0.3   0:06.50 httpd                                                                    
  2111 gdm       20   0  360724  13476  11644 S   0.0   0.3   0:00.01 gsd-datetime                                                             
   882 root      20   0  191820  12708   9996 S   0.0   0.3   0:00.23 sssd_be                                                                  
  2140 gdm       20   0  457052  12656   9028 S   0.0   0.3   0:01.10 gsd-smartcard                                                            
   795 root      20   0  226576  12520  10948 S   0.0   0.3   0:17.73 vmtoolsd                                                                 
   811 root      20   0  533576  12152  10168 S   0.0   0.3   0:00.18 udisksd                                                                  
  1504 apache    20   0 1343960  11600   6384 S   0.0   0.3   0:05.80 httpd                                                                    
  1506 apache    20   0 1343960  11600   6384 S   0.0   0.3   0:05.70 httpd                                                                    
  1375 gdm       20   0 1139416  11464   8480 S   0.0   0.3   0:00.14 pulseaudio    

4.对top的cpu进行排序

top - 23:35:11 up 11:28,  1 user,  load average: 925.18, 937.49, 933.01
Tasks: 3350 total, 1213 running, 2137 sleeping,   0 stopped,   0 zombie
%Cpu(s): 35.2 us, 63.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.4 hi,  0.9 si,  0.0 st
MiB Mem :   3918.5 total,    500.3 free,   2876.1 used,    542.1 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.    752.7 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                  
 40859 root      20   0   68624   9492   4124 R   0.9   0.2   0:00.89 top                                                                      
  1244 mysql     20   0 1357880 397984  31000 S   0.4   9.9   1:14.99 mysqld                                                                   
121033 root      20   0       0      0      0 I   0.4   0.0   0:00.93 kworker/0:3-events                                                       
    10 root      20   0       0      0      0 R   0.2   0.0   1:38.46 rcu_sched                                                                
  2901 root      20   0   12832   3212   2892 S   0.2   0.1   0:06.89 log.sh                                                                   
 11316 root      20   0   12832   3252   2932 S   0.2   0.1   0:04.92 log.sh                                                                   
 11338 root      20   0   12832   3188   2864 S   0.2   0.1   0:00.42 log.sh                                                                   
 11588 root      20   0   12832   3344   3016 S   0.2   0.1   0:09.57 log.sh                                                                   
 18141 root      20   0   12832   3232   2908 S   0.2   0.1   0:02.09 log.sh                                                                   
 19853 root      20   0   12832   3184   2860 S   0.2   0.1   0:01.83 log.sh                                                                   
 22687 root      20   0   12832   3248   2924 S   0.2   0.1   0:13.91 log.sh                                                                   
 25858 root      20   0   12832   3316   2988 S   0.2   0.1   0:00.65 log.sh                                                                   
 26270 root      20   0   12832   3316   2996 S   0.2   0.1   0:03.01 log.sh                                                                   
 28339 root      20   0   12832   3264   2940 S   0.2   0.1   0:05.26 log.sh                                                                   
 32276 root      20   0   12832   3272   2952 S   0.2   0.1   0:01.92 log.sh                                                                   
 37834 root      20   0   12832   3332   3012 S   0.2   0.1   0:04.11 log.sh                                                                   
 40221 root      20   0   12832   3208   2888 S   0.2   0.1   0:03.18 log.sh                                                                   
 53572 root      20   0   12832   3264   2936 S   0.2   0.1   0:01.10 log.sh                                                                   
 62329 root      20   0   12832   3112   2788 S   0.2   0.1   0:03.67 log.sh                                                                   
 68358 root      20   0   12832   3296   2972 S   0.2   0.1   0:01.46 log.sh                                                                   
 72045 root      20   0   12832   3100   2776 S   0.2   0.1   0:10.57 log.sh                                                                   
 75636 root      20   0   12832   3168   2840 S   0.2   0.1   0:03.24 log.sh                                                                   
 75933 root      20   0   12832   3264   2940 S   0.2   0.1   0:00.46 log.sh                                                                   
 78521 root      20   0   12832   3268   2944 S   0.2   0.1   0:03.96 log.sh                                                                   
 83423 root      20   0   12832   3248   2924 S   0.2   0.1   0:01.05 log.sh                                                                   
 86644 root      20   0   12832   3148   2824 S   0.2   0.1   0:02.52 log.sh                                                                   
 89434 root      20   0   12832   3168   2840 S   0.2   0.1   0:00.44 log.sh                                                                   
 94082 root      20   0   12832   3264   2940 S   0.2   0.1   0:00.61 log.sh                                                                   
 99308 root      20   0   12832   3156   2832 S   0.2   0.1   0:05.37 log.sh                                                                   
101858 root      20   0   12832   3176   2848 S   0.2   0.1   0:11.43 log.sh                                                                   
107071 root      20   0   12832   3160   2836 S   0.2   0.1   0:01.44 log.sh                                                                   
107192 root      20   0   12832   3260   2940 S   0.2   0.1   0:01.06 log.sh                                                                   
108720 root      20   0   12832   3180   2848 S   0.2   0.1   0:09.35 log.sh                                                                   
109394 root      20   0   12832   3212   2880 S   0.2   0.1   0:09.07 log.sh                                                                   
117366 root      20   0   12832   3256   2936 S   0.2   0.1   0:00.34 log.sh                                                                   
122689 root      20   0   12832   3220   2896 S   0.2   0.1   0:12.39 log.sh                                                                   
127515 root      20   0   12832   3180   2856 S   0.2   0.1   0:03.92 log.sh                                                                   
127665 root      20   0   12832   3240   2912 S   0.2   0.1   0:07.83 log.sh                                                                   
130999 root      20   0   12832   3212   2888 S   0.2   0.1   0:01.11 log.sh                                                                   
     1 root      20   0  197248  15652   9004 S   0.0   0.4   0:05.75 systemd                                                                  
     2 root      20   0       0      0      0 S   0.0   0.0   0:00.03 kthreadd                                                                 
     3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp                                                                   

三、分析进程状态

经上述操作分析,发现内存及cpu资源负载过高原因有两个, 1.MYSQL数据库占有一定资源。 2.log.sh脚本重复运行,占有大量资源。

四、处理方法

1.kill所有的log.sh进程

ps -ef | grep log.sh |grep -v grep | awk '{print $2}' | xargs kill -15

2.停止mysql服务器

[root@control scripts]# systemctl stop mysqld.service 
[root@control scripts]# systemctl status mysqld.service 
● mysqld.service - MySQL 8.0 database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Thu 2021-04-29 23:50:12 CST; 10s ago
  Process: 87312 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)
  Process: 2015 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS)
  Process: 1244 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 1110 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS)
  Process: 995 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
 Main PID: 1244 (code=exited, status=0/SUCCESS)

3.查看当前系统状态

top - 23:51:03 up 11:44,  1 user,  load average: 0.23, 175.83, 544.20
Tasks: 267 total,   1 running, 266 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.7 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3918.5 total,   2592.0 free,    885.3 used,    441.3 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.   2791.3 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                  
  1015 root      20   0   36092   3696   2796 S   0.3   0.1   0:00.51 crond                                                                    
 87359 root      20   0   64016   4988   4072 R   0.3   0.1   0:00.02 top                                                                      
     1 root      20   0  197248  15656   9004 S   0.0   0.4   0:06.34 systemd                                                                  
     2 root      20   0       0      0      0 S   0.0   0.0   0:00.03 kthreadd                                                                 
     3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp                                                                   
     4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp                                                               
     6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0H-kblockd                                                     
     8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq                                                             
     9 root      20   0       0      0      0 S   0.0   0.0   0:12.46 ksoftirqd/0                                                              
    10 root      20   0       0      0      0 I   0.0   0.0   1:39.59 rcu_sched                                                                
    11 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/0                                                              
    12 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 watchdog/0                                                               
    13 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0                                                                  
    15 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kdevtmpfs                                                                
    16 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 netns                                                                    
    17 root      20   0       0      0      0 S   0.0   0.0   0:00.01 kauditd                                                                  
    18 root      20   0       0      0      0 S   0.0   0.0   0:00.12 khungtaskd                                                               
    19 root      20   0       0      0      0 S   0.0   0.0   0:00.00 oom_reaper                                                               
    20 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 writeback                                                                
    21 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kcompactd0                                                               
    22 root      25   5       0      0      0 S   0.0   0.0   0:00.00 ksmd                                                                     
    23 root      39  19       0      0      0 S   0.0   0.0   0:02.19 khugepaged                                                               
    24 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 crypto                                                                   
    25 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kintegrityd                                                              
    26 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kblockd                                                                  
    27 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 md                                                                       
    28 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 edac-poller                                                              
    29 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 watchdogd                                                                
    44 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kswapd0                                                                  
    95 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kthrotld                                                                 
    96 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/24-pciehp                                                            
    97 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/25-pciehp                                                            
    98 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/26-pciehp                                                            
    99 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/27-pciehp                                                            
   100 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/28-pciehp                                                            
   101 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/29-pciehp                                                            
   102 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/30-pciehp                                                            
   103 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/31-pciehp                                                            
   104 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/32-pciehp                                                            
   105 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/33-pciehp                                                            
   106 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/34-pciehp                                                            
   107 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/35-pciehp                                                            

四、测试系统状态

1.查看CPU和内存状态

[root@control scripts]# ps aux --sort=-%cpu |head -n 20
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         10  0.2  0.0      0     0 ?        I    12:07   1:39 [rcu_sched]
root          1  0.0  0.3 197248 15656 ?        Ss   12:07   0:06 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
root          2  0.0  0.0      0     0 ?        S    12:07   0:00 [kthreadd]
root          3  0.0  0.0      0     0 ?        I<   12:07   0:00 [rcu_gp]
root          4  0.0  0.0      0     0 ?        I<   12:07   0:00 [rcu_par_gp]
root          6  0.0  0.0      0     0 ?        I<   12:07   0:00 [kworker/0:0H-kblockd]
root          8  0.0  0.0      0     0 ?        I<   12:07   0:00 [mm_percpu_wq]
root          9  0.0  0.0      0     0 ?        S    12:07   0:12 [ksoftirqd/0]
root         11  0.0  0.0      0     0 ?        S    12:07   0:00 [migration/0]
root         12  0.0  0.0      0     0 ?        S    12:07   0:00 [watchdog/0]
root         13  0.0  0.0      0     0 ?        S    12:07   0:00 [cpuhp/0]
root         15  0.0  0.0      0     0 ?        S    12:07   0:00 [kdevtmpfs]
root         16  0.0  0.0      0     0 ?        I<   12:07   0:00 [netns]
root         17  0.0  0.0      0     0 ?        S    12:07   0:00 [kauditd]
root         18  0.0  0.0      0     0 ?        S    12:07   0:00 [khungtaskd]
root         19  0.0  0.0      0     0 ?        S    12:07   0:00 [oom_reaper]
root         20  0.0  0.0      0     0 ?        I<   12:07   0:00 [writeback]
root         21  0.0  0.0      0     0 ?        S    12:07   0:00 [kcompactd0]
root         22  0.0  0.0      0     0 ?        SN   12:07   0:00 [ksmd]
[root@control scripts]# ps aux --sort=-%mem |head -n 20
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
gdm        1955  0.0  3.5 2843996 141424 tty1   Sl+  12:07   0:16 /usr/bin/gnome-shell
gdm        2042  0.0  1.3 259244 52788 tty1     S+   12:07   0:00 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
gdm        2117  0.0  1.3 1240264 52700 tty1    Sl+  12:07   0:00 /usr/libexec/gsd-media-keys
gdm        2125  0.0  1.2 745352 51832 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-power
gdm        2109  0.0  1.2 809320 51508 tty1     Sl+  12:07   0:03 /usr/libexec/gsd-color
gdm        2094  0.0  1.2 646964 51092 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-xsettings
gdm        2146  0.0  1.2 581116 50628 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-wacom
gdm        2115  0.0  1.2 645832 50520 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-keyboard
gdm        2103  0.0  1.2 496092 50064 tty1     Sl+  12:07   0:00 /usr/libexec/gsd-clipboard
gdm        2071  0.0  1.2 496540 50048 tty1     Sl   12:07   0:00 /usr/libexec/ibus-x11 --kill-daemon
root        986  0.0  1.0 1167316 41504 ?       Ssl  12:07   0:00 /usr/sbin/libvirtd
root        883  0.0  0.8 202764 35484 ?        S    12:07   0:00 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
root        909  0.0  0.8 252904 35064 ?        Ssl  12:07   0:00 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid
root        976  0.0  0.7 401624 30708 ?        Ssl  12:07   0:03 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
polkitd     796  0.0  0.6 1780404 27536 ?       Ssl  12:07   0:19 /usr/lib/polkit-1/polkitd --no-debug
root       1463  0.0  0.4 377288 19020 ?        Ssl  12:07   0:01 /usr/sbin/rsyslogd -n
root        948  0.0  0.4 407028 18992 ?        Ssl  12:07   0:00 /usr/sbin/NetworkManager --no-daemon
root        630  0.0  0.4  93740 16844 ?        Ss   12:07   0:02 /usr/lib/systemd/systemd-journald
root          1  0.0  0.3 197248 15656 ?        Ss   12:07   0:06 /usr/lib/systemd/systemd --switched-root --system --deserialize 18

2.查看系统整体状态

系统已恢复正常,测试shell命令行终端有无卡顿缓慢情况,经测试恢复正常。

[root@control scripts]# top
top - 23:51:24 up 11:44,  1 user,  load average: 0.16, 164.44, 532.60
Tasks: 267 total,   1 running, 266 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3918.5 total,   2592.0 free,    885.2 used,    441.3 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.   2791.3 avail Mem