supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Colin Booth <>
Subject: Re: s6 supervision
Date: Fri, 29 Jan 2021 08:18:41 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

      reply	other threads:[~2021-01-29  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29  5:47 billa chaitanya
2021-01-29  8:18 ` Colin Booth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).