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 <[email protected] > wrote: > On Thu, 26.09.13 18:28, abhishek sharma ([email protected]) > 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 [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
