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
来源:oschina
链接:https://my.oschina.net/ois/blog/3225322