Re: [systemd-devel] Regarding the

2013-09-29 Thread abhishek sharma
Thanks for the information.

Is there any service in the existing standard distribution, where I can get
hands on these parameters ExecStartPre, ExecStart, ExecStartPost,
ExecReload, ExecStop, ExecStop, ExecMainCode, signal result and
ExecMainStatus under "Service Unit Objects".?

Unfortunately not all the services implements these parameters, I searched
many but could not find. I am currently using fedora 19 and want to get
hands on these things to have better understanding.

Thanks in advance.

Regards
Abhishek


On Fri, Sep 27, 2013 at 12:16 AM, Lennart Poettering  wrote:

> On Thu, 26.09.13 18:28, abhishek sharma (abhishek.sharm...@gmail.com)
> wrote:
>
> > Hi All,
> >
> > I am new to Systemd, Need help about understanding some of features of
> the
> > systemd.
> > I am interested in knowing the failure of a service and the exact cause
> of
> > it.
> >
> > Inside the systemd unit file there are options like SuccessExitStatus and
> > On-failure. In SuccessExitStatus we can specify the signals which when
> > received will be considered as the the successful exit. my question is
> >
> > 1. Any other signal than the ones mentioned in SuccessExitStatus would be
> > considered as the failure(on-failure)?
>
> Nope. SIGINT, SIGTERM, SIGHUP, SIGPIPE are never considerd failures, as
> they generally indicate clean or user triggered termination.
>
> > 2. How can we get the exact signal from on-failure?
>
> Use the bus API, it's all exported.
>
> http://www.freedesktop.org/wiki/Software/systemd/dbus/
>
> See the documentation for ExecStartPre, ExecStart, ExecStartPost,
> ExecReload, ExecStop, ExecStop, ExecMainCode and ExecMainStatus under
> "Service Unit Objects".
>
> > 2. Rather than Restart = on-failure, can we use something like
> > on-failure = xyz.service
>
> There's OnFailure= for this. See systemd.unit(5).
>
> > 3. Is there any Dbus interface exposed by systemd which can be used to
> get
> > the information like service with unusual exit and the corresponding
> > signal?
>
> Yes, (see above).
>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Regarding the

2013-09-26 Thread abhishek sharma
Hi All,

I am new to Systemd, Need help about understanding some of features of the
systemd.
I am interested in knowing the failure of a service and the exact cause of
it.

Inside the systemd unit file there are options like SuccessExitStatus and
On-failure. In SuccessExitStatus we can specify the signals which when
received will be considered as the the successful exit. my question is

1. Any other signal than the ones mentioned in SuccessExitStatus would be
considered as the failure(on-failure)?
2. How can we get the exact signal from on-failure?
2. Rather than Restart = on-failure, can we use something like
on-failure = xyz.service
3. Is there any Dbus interface exposed by systemd which can be used to get
the information like service with unusual exit and the corresponding signal?

Thanks in advance. Kindly forgive me if the questions are already answered.

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


[systemd-devel] Need info about the systemd dbus interface

2013-06-30 Thread abhishek sharma
Hi All,

I am trying to use the systemd dbus methods and signals in my program. I am
using d-feet for analysis. However I need some information about some of
them

1. In the Method SetUnitControlGroup and StartUnit what does the parameter
"mode" mean?
2. How to simulate the UnitRemoved signal,Is there any Command shall i use
in systemctl? I have written the code for recieving theUnitRemoved Dbus
signal and I want to test the same.
3.In the ListUnitFiles what is the second parameter along with the service
name? on introspection it says "static", "enabled", "disabled" etc.

Please forgive if the questions are already answared in the mailing list.
If so,Kindly point me to the correct place where I can look into the same.

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