[systemd-devel] How to enable io.systemd.service varlink endpoint

Imanol-Mikel Barba Sabariego imanol at ima.lol
Tue Jun 3 07:51:19 UTC 2025


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.

I see references to a `io.systemd.service` unit:
- here: 
https://github.com/systemd/systemd/blob/30f6240bd24a5a81ece8f878251f0d656ada29e3/src/shared/varlink-io.systemd.service.c
- 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:

```
$ ls -lhatr /var/run/systemd/io.systemd.*
srw-rw-rw- 1 root root 0 May 30 19:56 
/var/run/systemd/io.systemd.ManagedOOM
srw-rw-rw- 1 root root 0 May 30 19:56 
/var/run/systemd/io.systemd.Credentials
srw-rw-rw- 1 root root 0 May 30 19:56 /var/run/systemd/io.systemd.Import
srw------- 1 root root 0 May 30 19:56 
/var/run/systemd/io.systemd.BootControl
srw------- 1 root root 0 May 30 19:56 /var/run/systemd/io.systemd.sysext
srw-rw-rw- 1 root root 0 May 30 19:56 
/var/run/systemd/io.systemd.Hostname
srw------- 1 root root 0 Jun  2 19:59 
/var/run/systemd/io.systemd.service
```

I tried to follow the example of the second reference (the unit test):
```
$ sudo varlinkctl call --more /run/systemd/io.systemd.Import 
io.systemd.service.Ping '{}'
Method call failed: org.varlink.service.MethodNotFound
{
         "method" : "io.systemd.service.Ping"
}
```

I am running Fedora 42:
```
$ systemctl --version
systemd 257 (257.6-1.fc42)
+PAM +AUDIT +SELINUX -APPARMOR +IMA +IPE +SMACK +SECCOMP -GCRYPT +GNUTLS 
+OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD 
+LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY 
+P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +BTF 
+XKBCOMMON +UTMP +SYSVINIT +LIBARCHIVE
```

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?

Thanks!

-- 
-- Imanol Barba


More information about the systemd-devel mailing list