Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to list systemd services in linux "in-the-order-of" they were loaded?

Tags:

systemd

yocto

I am trying to understand the dependencies between different systemd services in my new project. We are using yocto build system and systemd/system services.

If I perform,

systemctl -l

It will list all the services in alphabetic order. But I am specifically looking for any commands/scripts that can be used for listing systemd services "in-the-order-of" they were loaded.

Please help.

like image 245
user3128488 Avatar asked Mar 27 '15 20:03

user3128488


1 Answers

Unfortunately, due to the parallel nature of the boot up process and the potentially complex dependency relationships among services, the service start up order isn't very deterministic. However, systemd-analyze, if present on your system, can graphically plot the start up order of services:

systemd-analyze plot > startup_order.svg

It can also be used to graphically plot service dependencies:

systemd-analyze dot | dot -Tsvg > systemd.svg
like image 129
shibley Avatar answered Oct 24 '22 09:10

shibley