Files
tldr/pages.zh/linux/systemd-analyze.md

25 lines
752 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# systemd-analyze
> 分析和调试系统管理器。
> 显示单位(服务、挂载点、设备、套接字)启动过程的时间细节。
> 更多信息:<https://www.freedesktop.org/software/systemd/man/systemd-analyze.html>。
- 列出所有运行的单位,按初始化所需时间排序:
`systemd-analyze blame`
- 打印时间关键链的单位树:
`systemd-analyze critical-chain`
- 创建一个SVG文件显示每个系统服务的启动时间并突出显示它们在初始化上花费的时间
`systemd-analyze plot > {{path/to/file.svg}}`
- 绘制依赖图并将其转换为SVG文件
`systemd-analyze dot | dot -T{{svg}} > {{path/to/file.svg}}`
- 显示运行单位的安全评分:
`systemd-analyze security`