[systemd-devel] Antw: Re: Explain status "Loaded: not-found (Reason: No such file or directory)"

Lennart Poettering lennart at poettering.net
Mon May 13 07:51:59 UTC 2019

On Mo, 13.05.19 08:08, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) wrote:

> > Typically, when you see "not-found" as "Loaded" value, you'll also see
> > "No such file or directory" as "Reason" value, but there are some
> > other cases, since units are not always synthesized from unit files on
> > disk, but from other concepts too.
> >
> Thanks for the explanation; it's more clear now. However I'd prefer a message
> like "Loaded: iotwatch.target could not be found", so
> * name what is missing, and
> * use an "errno message" only for specific system calls (not to summarize
> several)

The name of the unit missing is shown in the same output a tiny bit
further up, we try to repeat ourselves too often. "systemctl status"
is supposed to compress a lot of information into little space.

Note that these "errno" error strings are generally how things are
done on UNIX. For example, if you use plain "rm" to remove a missing
file, or "cat" to cat it you get the same error strings:

    $ rm kkkk
    rm: cannot remove 'kkkk': No such file or directory
    $ cat kkkk
    cat: kkkk: No such file or directory

UNIX admins typically recognize the "No such file or directory" phrase
and know what it means. I mean, UNIX is sometimes a bit cryptic, but
it is how it is...


Lennart Poettering, Berlin

More information about the systemd-devel mailing list