[systemd-devel] DBus signal on unit start/stop

Lennart Poettering lennart at poettering.net
Sat Nov 30 10:30:12 PST 2013


On Sat, 30.11.13 14:18, Ragnar Thomsen (rthomsen6 at gmail.com) wrote:

> Dear systemd developers,
> 
> I am developing a KDE-based frontend for systemd. I currently have a list of 
> units retrieved via DBus through the ListUnits method. However, the list is 
> static at the moment. I want it to auto-update when units get e.g. 
> started/stopped. I can monitor when units get loaded/unloaded, when the daemon 
> gets reloaded and when unit files have changed through the relevant DBus 
> signals. Unfortunately, none of these signals get emitted when a unit gets 
> started/stopped (i.e. when the ActiveState and/or SubState change).
> 
> Is there any plan to implement such signals in systemd dbus API (or a reason 
> not to implement them)? Do you have any ideas on how to monitor units' 
> ActiveState/SubState without such signals (short of calling the ListUnits 
> method at certain time intervals and monitor for changes)?

There are standard dbus PropertiesChanged signals sent out for ActiveState
changes, which invalidate the properties when they change in released
versions of systemd, and which carry the new values along in git.

We probably should document which ones we generate this for in 

http://www.freedesktop.org/wiki/Software/systemd/dbus/

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list