启动缓慢。如何阅读 systemd-analyze 责备/关键链/情节

启动缓慢。如何阅读 systemd-analyze 责备/关键链/情节

我在 Virtualbox VM 中运行 Xubuntu 20.04。VM 映像存储在健康的 SSD 上。安装后它启动速度很快。我不记得/没有注意到启动过程何时变慢,所以我必须找到另一种方法。

systemd-analyze blame/critical chain/plot 输出对我来说毫无意义。因此,我已经禁用了一半的服务,但没有成功。

输出如下:

systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @1min 34.321s
└─multi-user.target @1min 34.319s
  └─snapd.seeded.service @1min 34.144s +174ms
    └─snapd.service @1min 29.467s +4.669s
      └─basic.target @1min 29.255s
        └─sockets.target @1min 29.252s
          └─snapd.socket @1min 29.225s +19ms
            └─sysinit.target @1min 29.101s
              └─systemd-timesyncd.service @1min 28.556s +539ms
                └─systemd-tmpfiles-setup.service @1min 28.441s +89ms
                  └─local-fs.target @1min 28.402s
                    └─run-user-1000.mount @1min 33.447s
                      └─local-fs-pre.target @1.220s
                        └─keyboard-setup.service @715ms +503ms
                          └─systemd-journald.socket @677ms
                            └─-.mount @625ms
                              └─system.slice @625ms
                                └─-.slice @625ms

$ systemd-analyze blame
1min 27.486s dev-sda5.device                                      
4.669s snapd.service                                        
1.611s networkd-dispatcher.service                          
1.445s udisks2.service                                      
1.365s accounts-daemon.service                              
1.282s dev-loop0.device                                     
1.278s dev-loop1.device                                     
1.218s dev-loop2.device                                     
1.184s dev-loop3.device                                     
1.168s dev-loop4.device                                     
1.162s dev-loop5.device                                     
1.152s dev-loop6.device                                     
1.022s lightdm.service                                      
985ms systemd-logind.service                               
743ms apache2.service                                      
731ms NetworkManager.service                               
709ms ModemManager.service                                 
692ms systemd-resolved.service                             
675ms avahi-daemon.service                                 
637ms upower.service                                       
632ms polkit.service                                       
539ms systemd-timesyncd.service                            
536ms thermald.service                                     
519ms [email protected]                                    
503ms keyboard-setup.service                               
474ms wpa_supplicant.service                               
471ms gpu-manager.service                                  
460ms systemd-journald.service                             
401ms ssh.service                                          
396ms apport.service                                       
356ms grub-common.service                                  
355ms e2scrub_reap.service                                 
349ms teamviewerd.service                                  
345ms systemd-udevd.service                                
344ms phpsessionclean.service                              
335ms alsa-restore.service                                 
322ms apparmor.service                                     
276ms lvm2-lvmpolld.service                                
270ms systemd-udev-trigger.service                         
269ms colord.service                                       
268ms systemd-journal-flush.service                        
253ms ubuntu-fan.service                                   
247ms vboxadd-service.service                              
210ms kerneloops.service                                   
190ms systemd-tmpfiles-clean.service                       
188ms hddtemp.service                                      
174ms snapd.seeded.service                                 
152ms snap-snapd-11107.mount                               
152ms lm-sensors.service

systemd-analyze 图

相关内容