[systemd-devel] Antw: Re: [EXT] Re: Q: Querying units for "what provides" a target

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Fri Sep 9 10:08:53 UTC 2022


>>> Michael Biebl <mbiebl at gmail.com> schrieb am 09.09.2022 um 10:55 in
Nachricht
<CAGWsdOibC4k0CqxubSRKRV3ZU=xPpdeMYGnA8b4sC80hMDbqOg at mail.gmail.com>:
> Example: syslog.service
> 
> $ systemctl status syslog.service
> ● rsyslog.service - System Logging Service
>      Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled;
> preset: enabled)
>      Active: active (running) since Thu 2022-09-08 08:55:45 CEST; 1 day 1h 
> ago
> TriggeredBy: ● syslog.socket
>        Docs: man:rsyslogd(8)
>              man:rsyslog.conf(5)
>              https://www.rsyslog.com/doc/ 
>    Main PID: 624 (rsyslogd)
>       Tasks: 4 (limit: 19002)
>      Memory: 3.8M
>         CPU: 1.341s
>      CGroup: /system.slice/rsyslog.service
>              └─624 /usr/sbin/rsyslogd -n -iNONE
> 
> You'll see that syslog.service is provided by  provided by
> rsyslog.service (and the actual name of the file on the disk)
> Isn't this what you wanted? If not, I must have misunderstood what you
> are looking for.

Hi!

I'm afraid that does not help:
# systemctl status time-set.target
● time-set.target - System Time Set
     Loaded: loaded (/usr/lib/systemd/system/time-set.target; static)
     Active: active since Mon 2022-09-05 14:30:42 CEST; 3 days ago
       Docs: man:systemd.special(7)

Now what is actually providing "time-set" (if any)?
Does that mean "nothing provides time-set"?

Likewise:
# systemctl status time-sync.target
● time-sync.target - System Time Synchronized
     Loaded: loaded (/usr/lib/systemd/system/time-sync.target; static)
     Active: active since Mon 2022-09-05 14:32:00 CEST; 3 days ago
       Docs: man:systemd.special(7)

Sep 05 14:32:00 host16 systemd[1]: Reached target System Time Synchronized.

Clear now?

Regards,
Ulrich

> 
> Am Fr., 9. Sept. 2022 um 10:52 Uhr schrieb Ulrich Windl
> <Ulrich.Windl at rz.uni-regensburg.de>:
>>
>> >>> Michael Biebl <mbiebl at gmail.com> schrieb am 09.09.2022 um 10:30 in
Nachricht
>> <CAGWsdOg-_29F=rW32=FyQ+mymP=BFB8V7=Kn_GQyTO62KPKq6g at mail.gmail.com>:
>> > I'd probably just use `systemctl status`
>>
>> Can you give some details? I don't see what I'm expecting to see.
>>
>> Regards,
>> Ulrich
>>
>>
>> >
>> > Am Fr., 9. Sept. 2022 um 10:18 Uhr schrieb Ulrich Windl
>> > <Ulrich.Windl at rz.uni-regensburg.de>:
>> >>
>> >> Hi!
>> >>
>> >> I'm wondering: having some specific target, e.g. time-set.target, how
can I
>> > find out what actually "provides" that target?
>> >> I see that I can query what "requires" the given target, but how to I
get
>> > the other direction?
>> >> I mean by using a tool like systemctl, not by finding and grepping some
>> > directories for symbolic links.
>> >>
>> >> Sorry if that turns out to be a stupid question where I should have
known
>> > the answer...
>> >>
>> >> Regards,
>> >> Ulrich
>> >>
>> >>
>> >>
>>
>>
>>
>>





More information about the systemd-devel mailing list