Re: s6 supervision

From: Colin Booth <>
Date: Fri, 29 Jan 2021 08:18:41 +0000

On Fri, Jan 29, 2021 at 11:17:00AM +0530, billa chaitanya wrote:
> Hi Team,
> Is there an API/ command in s6 code to get the information of a process and
> its pid by giving the service name that has started the process?
I might be misreading your question but s6-svstat /path/to/servicedir I
believe answers your question, at least as far as reading what
s6-supervise knows about (pid, status, time in status, a few other
details). If you're on a system with a functional procfs you can then
use the pid to query most information from /proc/$pid.
> And does s6-svscan/s6-supervise have the knowledge of service-name&
> process name & process pid so that it can be fetched to another process
> using IPC?
s6-supervise knows the process id of its primary child and as I
mentioned above you can ask it for that information via s6-svstat. It
does not know anything else about the process because it doesn't need
to. However, there are several options to s6-svstat that make output
information in easy-to-parse formats which make follow-on queries to
/proc trivial.

Colin Booth
Received on Fri Jan 29 2021 - 08:18:41 UTC

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