Without having to manually trace dependencies, e.g. with systemctl show or systemctl cat, and manually inspect the state of the system with systemctl status and systemctl list-units, is there a way to preview what a systemctl stop|start|restart would do?
Failing that, after the fact, is there a way to show a trace of which jobs were queued and why?
The kind of trace I would like to see in either case is something like:
starting X due to user request adding Y to the transaction because it is required by X adding Z1, Z2, Z3 because they are wanted by Y … PS: The --dry-run option is only available on later versions of systemd than the one I have, and is documented to only be supported on certain operations that are not relevant for my use case.
systemctl poweroff --dry-runon my workstation (systemd version 237) as a normal non-root user, and it simply ignored the--dry-runoption and shut my computer down. A bug in systemd, or a lack of understanding of the documentation on my part?systemctl list-dependencies <unit>?list-dependenciesis in the same category asshow,catetc., i.e. requires manual work to interpret for my use case. For one thing, it does not seem to follow the symlinks forWantedBy=, so some units are obviously missing from the list.