I am pretty sure it doesn't already exist (if it does its hard to find) but I think it would be nice to have a feature that could generate an "effective" unit. By that I mean an output that appears to be a single unit file but which actually takes into consideration all of the dropins in such a way that if you override a directive you will only see the effective output with all directives ordered logically in a way that will show the effective order of execution of the directives.
I am aware of systemctl cat and this is the closest thing you can get to this but this shows everything and is ambiguous in order. systemctl show is also useful but is a little messy to read and for most cases provides too much information.
I feel like a feature like this will help diagnose issues where systemd is not behaving as expected - for example, when you try to override ExecStart via a drop-in: it is required that you have an empty ExecStart first in order to override and then the overriding line; if there was a way of seeing the effective unit, you could see if your drop-in works (replaces the value of ExecStart) or not.
It would also make clear as to which of the lines are actually of use and actually have an effect on the behavior of systemd and produce a less cluttered output when compared with systemctl cat which can often contain many lines that are overridden further down in the output.
For this to work a reasonable order for the directives to be listed in needs to be determined but I can't see that being a problem because there is an logical order, for example with the main directives I use the order would be: Environment, ExecStartPre, ExecStart, ExecStartPost, etc. Directives like Restart which are like metadata of the unit, these could be listed at the top of the Service section.
Came here looking for service effective settings, found about systemctl show, thanks!
Most helpful comment
Came here looking for service effective settings, found about
systemctl show, thanks!