Re: [systemd-devel] StartLimitAction Feature
Thanks Lenart. Will give it a shot. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] StartLimitAction Feature
On Sun, 02.03.14 18:00, Usman (deser...@yahoo.com) wrote: > So actually i want to listen on dbus and somehow get a message when an > application has restarted N number of times within time T and will not > be started anymore. How do I differentiate this case from normal > application Release message that I do get each time it restarts? Application "Release" message? what are you referring to? There is no such thing. To watch the state of a unit, make sure to invoke Subscribe() on the main manager object, and then simply watch standard PropertyChanged() messages on that unit, and look for the "State" property. 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] StartLimitAction Feature
So actually i want to listen on dbus and somehow get a message when an application has restarted N number of times within time T and will not be started anymore. How do I differentiate this case from normal application Release message that I do get each time it restarts? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] StartLimitAction Feature
On Fri, 28.02.14 09:15, Usman (deser...@yahoo.com) wrote: > Thanks Lennart. Just a follow up question, can we get the "result" > from the Agent Released message on the dbus somehow? Or which message > should I be listening on dbus for this? Sorry, for which message? I don't follow? Why would you listen to any message? I am missing something here? 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] StartLimitAction Feature
Thanks Lennart. Just a follow up question, can we get the "result" from the Agent Released message on the dbus somehow? Or which message should I be listening on dbus for this? On Thursday, February 27, 2014 5:14 PM, Lennart Poettering wrote: On Wed, 26.02.14 11:59, Usman (deser...@yahoo.com) wrote: > Hi Guys, > > > > I am getting started with systemd and am looking for a particular > answer. I know the config option "StartLimitAction=" will have a > pre-set option to choose from. It either restarts the box or so. But I > want to do something else as well. For example I want to execute a > script when rate limit configured and burst level is hit. Is there a > way to do that? Specifically I am looking for any message/event that I > can see on dbus etc to know that tha restart rate limit is hit and > we're restarting the box or just plainly stopping application (no more > restarts). Any way to do that? You can invoke another service with OnFailure= as soon as your service fails. Then, you can pull the failure reason out of the original service via the bus and act on it. OnFailure=failure-handler@%p.servince and then in failure-handler@.service you take %i and use your own bus client or "systemctl show -p" to query the "Result" property which will tell you the reason the unit failed. 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] StartLimitAction Feature
On Wed, 26.02.14 11:59, Usman (deser...@yahoo.com) wrote: > Hi Guys, > > > > I am getting started with systemd and am looking for a particular > answer. I know the config option "StartLimitAction=" will have a > pre-set option to choose from. It either restarts the box or so. But I > want to do something else as well. For example I want to execute a > script when rate limit configured and burst level is hit. Is there a > way to do that? Specifically I am looking for any message/event that I > can see on dbus etc to know that tha restart rate limit is hit and > we're restarting the box or just plainly stopping application (no more > restarts). Any way to do that? You can invoke another service with OnFailure= as soon as your service fails. Then, you can pull the failure reason out of the original service via the bus and act on it. OnFailure=failure-handler@%p.servince and then in failure-handler@.service you take %i and use your own bus client or "systemctl show -p" to query the "Result" property which will tell you the reason the unit failed. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] StartLimitAction Feature
Hi Guys, I am getting started with systemd and am looking for a particular answer. I know the config option "StartLimitAction=" will have a pre-set option to choose from. It either restarts the box or so. But I want to do something else as well. For example I want to execute a script when rate limit configured and burst level is hit. Is there a way to do that? Specifically I am looking for any message/event that I can see on dbus etc to know that tha restart rate limit is hit and we're restarting the box or just plainly stopping application (no more restarts). Any way to do that? Thanks.___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel