Re: [systemd-devel] changed property value in signal

2015-10-08 Thread Pradeepa Kumar
Thanks for reply.

I am writing a monitoring application to start, stop and monitor service
state.

I am looking for way to know when service stoppped or failed so that i can
take some action in my monitoring app.

I am listening to PropertiesChanged signal and query ActiveState. This does
not work always.
Some times, unit is unloaded before I query the ActiveState. What is the
solution for this

Do we get new values of property along with PropertiesChanged signal in new
version of systemd?
if yes in which version this feature was added ?

What is the solution to achieve my requirement ?



On Fri, Jul 3, 2015 at 3:35 PM, Lennart Poettering 
wrote:

> On Fri, 03.07.15 15:12, Pradeepa Kumar (cdprade...@gmail.com) wrote:
>
> > On Fri, Jul 3, 2015 at 2:12 PM, Lennart Poettering <
> lenn...@poettering.net>
> > wrote:
> >
> > > On Thu, 02.07.15 10:18, Pradeepa Kumar (cdprade...@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
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] changed property value in signal

2015-07-03 Thread Lennart Poettering
On Thu, 02.07.15 10:18, Pradeepa Kumar (cdprade...@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 new value.

 - is this issue fixed.? if yes in which version? which version i need to
 upgrade

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...

 - where do i see commit logs/ version history

Just check out the systemd git repository.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] changed property value in signal

2015-07-03 Thread Lennart Poettering
On Fri, 03.07.15 15:12, Pradeepa Kumar (cdprade...@gmail.com) wrote:

 On Fri, Jul 3, 2015 at 2:12 PM, Lennart Poettering lenn...@poettering.net
 wrote:
 
  On Thu, 02.07.15 10:18, Pradeepa Kumar (cdprade...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] changed property value in signal

2015-07-03 Thread Pradeepa Kumar
please see my response inline

On Fri, Jul 3, 2015 at 2:12 PM, Lennart Poettering lenn...@poettering.net
wrote:

 On Thu, 02.07.15 10:18, Pradeepa Kumar (cdprade...@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 new 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??


  - is this issue fixed.? if yes in which version? which version i need to
  upgrade

 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


  - where do i see commit logs/ version history

 Just check out the systemd git repository.

 Lennart

 --
 Lennart Poettering, Red Hat

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] changed property value in signal

2015-07-02 Thread Pradeepa Kumar
2nd try
On Jul 2, 2015 10:18 AM, Pradeepa Kumar cdprade...@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
 - is this issue fixed.? if yes in which version? which version i need to
 upgrade
 - where do i see commit logs/ version history

 Thanks
 Prad

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel