Boot Time
Booting up a device involves numerous steps and sequences of events. Boot time includes measurement, analysis, human factors, initialization techniques, and reduction techniques. In other words, Boot time is the time from power on to user start.
Generating boot-chart in rpi4
If the systemd-bootchart.service disabled, enable and start the service with the systemctl commands
Code Block |
---|
|
$ systemctl enable systemd-bootchart
$ systemctl start systemd-bootchart |
Code Block |
---|
|
root@RaspberryPi-Gateway:~# systemctl status systemd-bootchart
● systemd-bootchart.service - Boot Process Profiler
Loaded: loaded (/lib/systemd/system/systemd-bootchart.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-11-23 10:53:08 UTC; 2s ago
Docs: man:systemd-bootchart.service(1)
man:bootchart.conf(5)
Main PID: 8672 (systemd-bootcha)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-bootchart.service
└─8672 @lib/systemd/systemd-bootchart -r
Nov 23 10:53:08 RaspberryPi-Gateway systemd[1]: Started Boot Process Profiler. |
systemd-analyze
systemd-analyze - shows timing details about the boot process
Code Block |
---|
|
root@RaspberryPi-Gateway:~# systemd-analyze
Startup finished in 3.120s (kernel) + 49.190s (userspace) = 52.311s
multi-user.target reached after 49.139s in userspace |
systemd-analyze critical-chain - prints a tree of the time-critical chain of units
Code Block |
---|
|
root@RaspberryPi-Gateway:~# systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
multi-user.target @49.139s
└─webpabroadband.service @46.001s +3.135s
└─parodus.service @45.444s +546ms
└─ccspwifiagent.service @15.984s +29.437s
└─CcspPandMSsp.service @10.556s +5.309s
└─PsmSsp.service @9.553s +986ms
└─logagent.service @8.384s +1.109s
└─CcspCrSsp.service @6.972s +1.364s
└─dbus.service @4.815s
└─basic.target @4.659s
└─sockets.target @4.629s
└─dbus.socket @4.592s
└─sysinit.target @4.200s
└─systemd-update-done.service @4.136s +35ms
└─systemd-journal-catalog-update.service @3.864s +83ms
└─systemd-tmpfiles-setup.service @3.704s +78ms
└─local-fs.target @3.630s
└─nvram-rdkssa.mount @17.996s
└─local-fs-pre.target @2.750s
└─systemd-tmpfiles-setup-dev.service @2.676s +41ms
└─systemd-sysusers.service @2.394s +238ms
└─systemd-remount-fs.service @1.814s +277ms
└─systemd-journald.socket @1.369s
└─system.slice @608ms
└─-.slice @608ms |
systemd-analyze blame - Lists all running units, ordered by the time to initialize
Code Block |
---|
|
root@RaspberryPi-Gateway:~# systemd-analyze blame
29.437s ccspwifiagent.service
11.789s CcspWebUI.service
11.042s hostapd.service
5.309s CcspPandMSsp.service
4.755s utopia.service
3.200s systemd-random-seed.service
3.135s webpabroadband.service
2.389s CcspTelemetry.service
1.950s rdk-oss-ssa-ecfsinit.service
1.944s disable_systemd_restart_param.service
1.696s systemd-logind.service
1.662s snmpd.service
1.603s dev-mmcblk0p2.device
1.364s CcspCrSsp.service
1.338s checkrpiwifisupport.service
1.109s logagent.service
1.041s RdkWanManager.service
986ms PsmSsp.service
803ms user@0.service
691ms dnsmasq.service
681ms ocsp-support.service
597ms systemd-udev-trigger.service
546ms parodus.service
542ms CcspTr069PaSsp.service
423ms dev-mqueue.mount
414ms sys-kernel-debug.mount
403ms tmp.mount
393ms kmod-static-nodes.service
388ms iptables.service
382ms ip6tables.service
374ms ebtables.service
360ms rbus_session_mgr.service
354ms systemd-user-sessions.service
336ms CcspEthAgent.service
322ms CcspTandDSsp.service
306ms sys-kernel-config.mount
294ms systemd-hwdb-update.service
291ms systemd-modules-load.service
287ms systemd-journal-flush.service
277ms systemd-remount-fs.service
269ms sys-fs-fuse-connections.mount
263ms notifyComp.service
256ms ntpd.service
252ms run-postinsts.service
247ms systemd-sysctl.service
240ms swupdate.service
238ms systemd-sysusers.service
166ms systemd-journald.service
151ms CcspLMLite.service
135ms systemd-update-utmp.service
103ms OvsAgent_ovsdb-server.service
91ms RdkFwUpgradeManager.service
89ms systemd-udevd.service
84ms systemd-machine-id-commit.service
83ms systemd-journal-catalog-update.service
78ms systemd-tmpfiles-setup.service
77ms var-volatile.mount
51ms boot.mount
47ms user-runtime-dir@0.service
41ms systemd-tmpfiles-setup-dev.service
38ms systemd-update-utmp-runlevel.service
35ms systemd-update-done.service
20ms rdkbLogMonitor.service |
systemd-bootchart
Graph Location: graph is generated and stored in /run/log by default
Code Block |
---|
|
root@RaspberryPi-Gateway:/run/log# ls
bootchart-20211123-1053.svg journal |
Graph Format : SVG format
View file |
---|
name | bootchart-20211123-0515.svg |
---|
height | 250 |
---|
|