Re: Generic interrupt command?

From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.COM>
Date: Sat, 2 Feb 2019 22:31:29 +0000

Colin Booth:

> As documented here: https://www.skarnet.org/software/s6/s6-svstat.html
>
> s6-svstat -p /path/to/service | xargs kill SIGNAL
>
You can thank Jos Backus for similar functionality in the nosh toolset
since 2013, with program-readable output that one can use existing tools
to pull arbitrary fields from.

    % svshow --json /var/sv/* 2>/dev/null | jq '."/var/sv/bcron-sched".MainPID'
    1861
    % svshow --json /var/sv/* 2>/dev/null | jq '."/var/sv/bcron-sched".RunTimestamp'
    4611686019976326000
    % svshow --json /var/sv/* 2>/dev/null | jq '."/var/sv/bcron-sched".DaemontoolsEncoreState'
    "running"
    % svshow --json /var/sv/* 2>/dev/null | jq '."/var/sv/bcron-sched"."Wanted-By"'
    [
       "/etc/service-bundles/targets/server"
    ]
    %
Received on Sat Feb 02 2019 - 22:31:29 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC