[systemd-devel] changed property value in signal

Lennart Poettering lennart at poettering.net
Fri Jul 3 03:05:09 PDT 2015


On Fri, 03.07.15 15:12, Pradeepa Kumar (cdpradeepa at gmail.com) wrote:

> On Fri, Jul 3, 2015 at 2:12 PM, Lennart Poettering <lennart at poettering.net>
> wrote:
> 
> > On Thu, 02.07.15 10:18, Pradeepa Kumar (cdpradeepa at gmail.com) wrote:
> >
> > > hi
> > > I am new to systemd.
> > > I am using systemd 208, libdbus-1-3_1.4.18-1ubuntu1.4_i386.deb
> > > I am to monitor unit stop/failure in my application .
> > > So I am subscribing to propertiesChanged signal and paring SubState.
> > > The propertieschanged message contains a dictionary and invalidated  list
> > > of properties.
> > > But the dictionary is empty(which is supposed to contain new value of
> > > changed properties), so i am left with querying new values of the changed
> > > property from list of invalidated properties list.
> > >
> > > - please let me know how do i get new values in the signal msg
> > >   itself
> >
> > you don't. We just invalidate the props, you have to query them
> > aftwards yourself, to determine the n value.
> 
>  Prad>>  But in online, i see some example of dbus-monitor command where
> output has a dictionary- which contains properties and new values.
> I want same output. how do i get that??

You don't... It's up to the service to decide which properties it
just invalidates and which ones it sends along.

> > We take the liberty to invalidate some props and send the full value
> > of others along. it's not considered api really which prop gets which
> > behaviour...
> 
> Prad>> I did not understand this comment
> Can you please explain

It's up to the service (in this case systemd) to choose which props it
sends PropertiesChanged signals for, and if it decides to do so,
for which it sends invalidation and for which it sends the full value
along.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list