https://access.redhat.com/solutions/2988611
SOLUTION 已验证 - 已更新 2017年七月13日02:53 -
环境
- Red Hat Enterprise Linux 7.3+
- Systemd
问题
- What command can I use to determine the "literal/actual" start-up sequence of service units (get date/time) and/or
which log files should I check? - I know I can use systemd-analyze to get dependency info, but I want to know that actual start-up times/order/logs
of specific services.
决议
1) Enable the "systemd-bootchart" service.
# systemctl enable systemd-bootchart
2) Restart the system.
# systemctl reboot
3) Review the resulting /run/log/bootchart*.svg
file for the boot process to verify ordering of service startup.
# systemctl status systemd-bootchart -l
● systemd-bootchart.service - Boot Process Profiler
Loaded: loaded (/usr/lib/systemd/system/systemd-bootchart.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Fri 2017-03-31 11:23:05 EDT; 3s ago
Docs: man:systemd-bootchart.service(1)
man:bootchart.conf(5)
Process: 468 ExecStart=/usr/lib/systemd/systemd-bootchart -r (code=exited, status=0/SUCCESS)
Main PID: 468 (code=exited, status=0/SUCCESS)
Mar 31 11:23:05 host.example.com systemd-bootchart[468]: Bootchart created: /run/log/bootchart-20170331-1122.svg
Mar 31 11:23:05 host.example.com systemd-bootchart[468]: systemd-bootchart wrote /run/log/bootchart-20170331-1122.svg
Should further assistance be needed, please open a case with Red Hat support and provide the following:
- A full description of the issue being encountered
- A
sosreport
of the system - The resulting
bootchart-*.svg
file
根源
When attempting to implement an ordering dependency within Systemd services, the exact ordering of operations can be difficult to infer. The system logs generally provide timestamps related to the operation, but can be difficult to decipher. The systemd-bootchart
utility yields a Scalable Vector Graphic (SVG) image that yields millisecond resolution of system services.