[systemd-devel] How to enable io.systemd.service varlink endpoint
Imanol-Mikel Barba Sabariego
imanol at ima.lol
Tue Jun 3 16:07:00 UTC 2025
On 2025-06-03 15:33, Lennart Poettering wrote:
> On Di, 03.06.25 09:51, Imanol-Mikel Barba Sabariego (imanol at ima.lol)
> wrote:
>
>> Hello everyone!
>>
>> I am trying to write an application that among other things, checks
>> the
>> status of a systemd service unit.
>>
>> I was looking into the new varlink API and was hoping to make use of
>> that
>> instead of the dbus API if I can help it, but unfortunately I don't
>> see an
>> endpoint to be able to do basic unit management.
>
> There's a good reason you don't see that, because it doesn't
> exist. While we supprot Varlink for a lot of things, basic unit
> management is not among them yet, sorry.
>
>> I see references to a `io.systemd.service` unit:
>> - here:
>> https://github.com/systemd/systemd/blob/30f6240bd24a5a81ece8f878251f0d656ada29e3/src/shared/varlink-io.systemd.service.c
>
> io.systemd.service is a generic service that any system service can
> implement for some really basic operations, such as controlling the
> log level or so. It's strictly something services implement themselves
> though, not something PID 1 implements to control other stuff.
>
>> - and here:
>> https://github.com/systemd/systemd/blob/30f6240bd24a5a81ece8f878251f0d656ada29e3/test/units/TEST-13-NSPAWN.importctl.sh#L92
>>
>> But I don't see that endpoint in my system:
>
> It's an interface, not an entrypoint socket. Also, it's a relatively
> recent addition. if you use systemd git you can do "varlinkctl
> introspect /run/systemd/io.systemd.Import" to see all interfaces a
> socket implements. since importd implements that new interfaces you
> should see io.systemd.service mong them.
>
>> ```
>> $ ls -lhatr /var/run/systemd/io.systemd.*
>
> /var/run is a long obsolete alias for /run btw.
>
>> I can see there's documentation on how to use varlink in general, but
>> is
>> there any documentation on how to enable specific systemd varlink
>> endpoints?
>
> No need to enable them. They are all enabled already, but it's all
> recent stuff, and it doesn't cover everything the D-Bus APIs supported
> so far.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
Thanks for the reply, looking forward for future advancements on the
varlink API, in the meantime I'll have to work with dbus.
Cheers
--
-- Imanol Barba
More information about the systemd-devel
mailing list