supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* s6 supervision
@ 2021-01-29  5:47 billa chaitanya
  2021-01-29  8:18 ` Colin Booth
  0 siblings, 1 reply; 2+ messages in thread
From: billa chaitanya @ 2021-01-29  5:47 UTC (permalink / raw)
  To: supervision

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

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?

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?


Thanks,
Chaitanya

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: s6 supervision
  2021-01-29  5:47 s6 supervision billa chaitanya
@ 2021-01-29  8:18 ` Colin Booth
  0 siblings, 0 replies; 2+ messages in thread
From: Colin Booth @ 2021-01-29  8:18 UTC (permalink / raw)
  To: supervision

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-29  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  5:47 s6 supervision billa chaitanya
2021-01-29  8:18 ` Colin Booth

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/supervision

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 supervision supervision/ http://inbox.vuxu.org/supervision \
		subscribe@list.skarnet.org
	public-inbox-index supervision

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git