[systemd-devel] "Inactive/dead" services that are enabled are indistinguishable from unused or oneshot services

Mike Kazantsev mk.fraggod at gmail.com
Thu Mar 17 23:20:22 PDT 2011


On Thu, 17 Mar 2011 22:58:00 +0100
Lennart Poettering <lennart at poettering.net> wrote:

> On Thu, 17.03.11 22:48, Lennart Poettering (lennart at poettering.net) wrote:
> 
> > > Unfortunately, new rsyslog.service (and services using "systemctl stop"
> > > directly) can affect such display, which I think shows the flawed
> > > assumption that "enabled" in systemd means "should be active,
> > > period" (with the exception of "oneshot" units) on my part, and I don't
> > > know easy solution to this, short of adding another enabled-like state.
> > 
> > Hmm, yeah. This problem is hard. But I think simply showing "enabled but
> > not running" is already quite useful, even if a service on that list is
> > not necessarily buggy, but just not hooked in by anything.
> 
> Thinking about this, maybe a simpler solution would be to add a switch
> to list all services that have been running since the boot but are not
> running anymore. That would be quite trivial to implement. Does that
> make sense to you?
> 

Looks like kinda "systemctl snapshot" diffs to me.

It's not really hard to do now with systemctl, grep, sort and diff, plus
some service which does initial snapshot late at boot, but it looks
like a kludge to me - services tend to fail at boot as well, and
desired system state (enabled/disabled) may change over uptime (i.e.
new stuff installed, something got disabled), so it doesn't make sense
anymore to compare anything to just a boot-state.

Maybe it'd make sense to add ability to diff state snapshots in this
regard, comparing (and saving) not just running but also enabled/masked
services.

It looks way out of scope of systemctl, too, and more in the realm of
systemd-query tool, maybe developed separately, as it sounds more like
a separate systemd-monitoring solution at this point ;)


-- 
Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110318/bb985216/attachment-0001.pgp>


More information about the systemd-devel mailing list