ubuntu 分析系统启动时间

五迷三道 提交于 2020-04-09 04:29:08

ubuntu 分析系统启动时间

分析启动时间

# 系统启动时间
~# systemd-analyze 
Startup finished in 6.783s (firmware) + 8.983s (loader) + 2.522s (kernel) + 3.570s (userspace) = 21.860s

# 各service启动耗时从大到小排列
~# systemd-analyze blame 
          2.754s docker.service
          1.835s fwupd.service
           294ms udisks2.service
           ...
# 链状展示 @后面是开始时间 +后面是启动耗时           
~# 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 @3.564s
└─multi-user.target @3.564s
  └─docker.service @809ms +2.754s
    └─containerd.service @797ms +7ms
      └─network.target @796ms
        └─wpa_supplicant.service @1.404s +7ms
          └─basic.target @689ms
            └─sockets.target @688ms


# 生成图片
~# systemd-analyze plot > boot_analysis.svg
# 打开图片
~# eog boot_analysis.svg

关闭耗时较多的服务

systemctl disable apt-daily.timer
systemctl disable apt-daily-upgrade.timer
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!