如何了解 BootUp 上哪一个是不必要的

如何了解 BootUp 上哪一个是不必要的

我查看了有关此问题的每一个问题,但答案如下:“您可以使用找出哪个花费的时间太长systemd-analyze blame,我的输出是这样的:

    1min 25.046s nmbd.service
     20.225s dev-sda2.device
     19.760s keyboard-setup.service
     16.088s systemd-tmpfiles-setup-dev.service
      7.016s NetworkManager-wait-online.service
      5.531s mysql.service
      5.139s apt-daily.service
      4.014s apparmor.service
      3.895s vboxdrv.service
      3.865s fwupd.service
      3.861s systemd-tmpfiles-setup.service
      3.799s click-system-hooks.service
      3.724s ModemManager.service
      3.602s smbd.service
      3.306s grub-common.service
      3.008s plymouth-start.service
      2.764s accounts-daemon.service
      2.469s upower.service
      2.280s plymouth-read-write.service
      2.141s polkit.service
      2.004s irqbalance.service
      1.962s systemd-modules-load.service
      1.478s repowerd.service
      1.429s systemd-logind.service
      1.405s gpu-manager.service
      1.404s tor.service
      1.404s pppd-dns.service
      1.072s snapd.autoimport.service
       856ms thermald.service
       853ms avahi-daemon.service
       811ms udisks2.service
       746ms ssh.service
       621ms apt-daily-upgrade.service
       616ms apport.service
       569ms NetworkManager.service
       562ms speech-dispatcher.service
       550ms rsyslog.service
       547ms switcheroo-control.service
       533ms [email protected]
       488ms systemd-fsck@dev-disk-by\x2duuid-B221\x2dEEC6.service
       482ms gdomap.service
       477ms systemd-sysctl.service
       434ms lm-sensors.service
       428ms systemd-journald.service
       426ms systemd-rfkill.service
       415ms ufw.service
       365ms kmod-static-nodes.service
       363ms binfmt-support.service
       297ms colord.service
       279ms systemd-resolved.service
       264ms wpa_supplicant.service
       257ms snapd.refresh.service
       216ms boot-efi.mount
       213ms dev-hugepages.mount
       212ms dev-mqueue.mount
       205ms systemd-timesyncd.service
       184ms packagekit.service
       171ms proc-sys-fs-binfmt_misc.mount
       168ms resolvconf.service
       161ms systemd-update-utmp.service
       159ms networking.service
       122ms [email protected]
       109ms alsa-restore.service
       102ms lightdm.service
        98ms systemd-tmpfiles-clean.service
        86ms sys-kernel-debug.mount
        73ms systemd-udevd.service
        60ms systemd-udev-trigger.service
        53ms setvtrgb.service
        47ms openvpn.service
        45ms systemd-user-sessions.service
        37ms snap-hello\x2dworld-27.mount
        35ms snap-core-2462.mount
        28ms systemd-remount-fs.service
        26ms ureadahead-stop.service
        12ms systemd-journal-flush.service
        11ms systemd-random-seed.service
         8ms rc-local.service
         7ms dns-clean.service
         6ms minidlna.service
         6ms systemd-update-utmp-runlevel.service
         5ms vboxweb-service.service
         4ms systemd-backlight@backlight:acpi_video0.service
         4ms console-setup.service
         4ms vboxautostart-service.service
         3ms vboxballoonctrl-service.service
         3ms rtkit-daemon.service
         3ms systemd-backlight@backlight:radeon_bl0.service
         3ms plymouth-quit-wait.service
         1ms sys-fs-fuse-connections.mount
       753us dev-loop0.device
       705us snapd.socket
       687us dev-loop1.device

我不知道应该停用哪一个。然后我写了sudo systemctl list-dependencies nmbd.service --reverse,但仍然,这个图表太复杂了,我看不懂:

    nmbd.service
● └─multi-user.target
●   ├─failsafe-graphical.target
●   └─graphical.target

随着新系统更新,我的启动时间增加了,但在此之前,我有双启动,并且删除了计算机上的 Windows。双启动屏幕仍然出现,我从启动配置中将 timeout=10 更改为 timeout=0。也许这是相关的。感谢您的帮助 :)systemd-analyze critical-chain结果:

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @2min 3.976s
└─multi-user.target @2min 3.976s
  └─nmbd.service @1min 43.949s +20.026s
    └─network-online.target @1min 43.947s
      └─NetworkManager-wait-online.service @1min 37.155s +6.792s
        └─NetworkManager.service @1min 35.485s +1.668s
          └─dbus.service @1min 34.525s
            └─basic.target @1min 34.183s
              └─sockets.target @1min 34.183s
                └─snapd.socket @1min 34.155s +27ms
                  └─sysinit.target @1min 34.132s
                    └─apparmor.service @24.743s +8.335s
                      └─local-fs.target @24.742s
                        └─run-user-1000-gvfs.mount @2min 515ms
                          └─run-user-1000.mount @1min 58.528s
                            └─local-fs-pre.target @23.532s
                              └─keyboard-setup.service @4.126s +19.405s
                                └─system.slice @4.030s
                                  └─-.slice @3.372s

此 svg 文件来自http://svgshare.com/i/2ae.svgsystemd-analyze plot

相关内容