On Fri, Aug 26, 2016 at 3:12 PM, Reto Kaiser <r...@cargomedia.ch> wrote:
> Yes I was thinking to use "OnFailure". > But I want to also detect stopped units, in case a program or a person > stops a unit and forgets about it. That metric should tell me if all > my "important units" are active or not. > > I can live with iterating over the output of "list-dependencies". But > since its output is not meant to be read by machines, I thought maybe > there's a more machine-readable API. > The machine-readable API is D-Bus. See < https://www.freedesktop.org/wiki/Software/systemd/dbus/> for (slightly outdated) documentation, in particularly ListUnits(). See < https://gist.github.com/grawity/8ec1cc03e8aec46baa820bfc76121879> for an example. -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel