You are not logged in.
Hey everyone, after some messing around, and a wee bit of lurking on the arch wiki ( I feel like a traitor, but wow , that place is a repo of delicious knowledge...)
I found this really really neat (to me) set of queries if you're at all interested in the way linux and more specifically systemd boots up.
systemd-analyze blame
prints out a pretty useful log of all of the boot times of yea system unit. For example:
kingghidorah@kingghidorah:~$ systemd-analyze blame
10.588s startupconky.service
5.889s keyboard-setup.service
3.418s exim4.service
1.900s NetworkManager.service
1.664s systemd-fsck@dev-disk-by\x2duuid-3e79e339\x2dc897\x2d46fa\x2dabc2\x2df6840820590b.service
1.333s loadcpufreq.service
872ms alsa-restore.service
766ms lightdm.service
658ms systemd-logind.service
641ms ntp.service
635ms lm-sensors.service
625ms rc-local.service
623ms hddtemp.service
622ms gdomap.service
496ms networking.service
482ms systemd-setup-dgram-qlen.service
436ms upower.service
Which by itself i'd think is pretty cool...but then I saw that you can take it a step further and do something even cooler
systemd-analyze critical-chain
Gives you a nice break down of what units rely on others...
graphical.target @20.550s
└─multi-user.target @13.626s
└─exim4.service @10.208s +3.418s
└─basic.target @9.952s
└─timers.target @9.950s
└─systemd-tmpfiles-clean.timer @9.950s
└─sysinit.target @9.941s
└─console-setup.service @9.677s +262ms
└─kbd.service @9.360s +315ms
└─remote-fs.target @9.342s
└─local-fs.target @9.339s
└─run-user-108.mount @14.602s
└─local-fs-pre.target @7.395s
└─systemd-remount-fs.service @7.329s +62ms
└─keyboard-setup.service @1.437s +5.889s
└─systemd-udevd.service @1.404s +32ms
└─systemd-tmpfiles-setup-dev.service @1.147s +256ms
└─kmod-static-nodes.service @841ms +306ms
└─system.slice @840ms
└─-.slice @840ms
What's .slice anyway?
And now my favorite...the mother load of boot goodieness...
systemd-analyze plot >plot.svg
You can output it to any name you want... but when you run it, it creates a .svg file which you can open with Mirage, or any file reader it appears or even a browser. And it gives you a really really (jaw dropping IMO) chart of what seems like every Unit and Target that boots and it's time, and order of boot.
and it's all in nice large, color format! Here's mine:
Sorry if this is a waste of time or everyone on here knew about this already...but I found this to be pretty neat and definitely made the boot process more visual for me....
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
I found this to be pretty neat
+1
Have you tried the other options?
empty@Arch ~ % systemd-analyze
completing options
blame -- Print list of running units ordered by time to init
critical-chain -- Print a tree of the time critical chain of units
dot -- Dump dependency graph (in dot(1) format)
dump -- Dump server status
plot -- Output SVG graphic showing service initialization
set-log-level -- Set systemd log threshold
time -- Print time spent in the kernel before reaching userspace
verify -- Check unit files for correctness
Sadly, "set-log-level" and "verify" are unavailable in the jessie version
http://manpages.debian.org/cgi-bin/man. … &locale=en
Offline
Good to be aware of these commands, thank you!
I've a different output and am not sure about whether it is how it's supposed to be. The second service - NetworkManager.service @3.572s +763ms - and 8th service - networking.service @2.417s +1.125s - are different to the output above. Is it normal or maybe something to look at more closely?
graphical.target @5.481s
└─multi-user.target @5.480s
└─NetworkManager.service @3.572s +763ms
└─basic.target @3.547s
└─timers.target @3.545s
└─systemd-tmpfiles-clean.timer @3.545s
└─sysinit.target @3.544s
└─networking.service @2.417s +1.125s
└─local-fs.target @2.416s
└─run-user-1000-gvfs.mount @5.268s
└─run-user-1000.mount @4.711s
└─local-fs-pre.target @590ms
└─systemd-remount-fs.service @559ms +25ms
└─keyboard-setup.service @339ms +218ms
└─systemd-udevd.service @333ms +5ms
└─systemd-tmpfiles-setup-dev.service @287ms +43
└─kmod-static-nodes.service @243ms +15ms
└─system.slice @228ms
└─-.slice @227ms
Offline
^ Looks normal enough to me, does everything work?
The startup process is aggressively parallelised under systemd so the ordering of the unit files may change from boot to boot.
Offline
I see, thank you.
Everything works fine. I was just unsure about those services or whether they're supposed to start at that position. It's amazing how rock solid Debian runs - one can really appreciate it after changing back to a Windows system and using that for a while (after a certain time that feels like torture, especially doing things like updates and antivir checks...).
Offline