From: Gerrit Pape <pape@smarden.org>
Subject: Re: runit - access to run script's exit status for finish?
Date: Thu, 1 Sep 2005 09:13:55 +0000 [thread overview]
Message-ID: <20050901090929.21301.qmail@e93696dc08427e.315fe32.mid.smarden.org> (raw)
In-Reply-To: <df233g$a06$1@sea.gmane.org>
On Tue, Aug 30, 2005 at 11:55:23AM -0500, Charles Duffy wrote:
> Gerrit Pape wrote:
> >On Mon, Aug 29, 2005 at 05:08:16AM -0500, Charles Duffy wrote:
> >>$ sv status -e <service1> <service2> ...
> >><last run command's exit status for service1>
> >><last run command's exit status for service2>
> >>
> >>and so forth.
> >
> >This I like. Instead of command line switches to the status command, we
> >could also use specific commands, such as
> > $ sv status-pid <service1> <service2>
> > <pid-service1>
> > <pid-service2>
> > $ sv status-uptime <service1>
> > <number-of-seconds-for-service1>
> > $
> > ...
>
> Yes, that'd work too. My instinct would be to use flags if we have a
> particularly large number of items that could be queried, or subcommands
> if it's going to remain a fairly small set.
>
> Right now we've got:
> - PID
> - uptime
> - current state
> - desired state
> - last exit status
> ...anything I'm missing?
>
> Five is a small enough number to be reasonable -- I'm just a bit leery
> after GNU Arch (where one of the constant complaints from new users was
> the sheer number of subcommands).
Yes, that's what I'm worried about too. I think best is to use switches
to the command 'status' as you suggested, and also move the current
switches (-v, -w) behind the commands:
sv <command> [-v] [-w sec] <service> ...
sv status [-v] [-w sec] [-puswrf] <service> ...
-p: pid
-u: uptime
-s: state
-w: want state
-r: last rc of ./run
-f: last rc of ./finish
The switches that can also be combined, e.g.
# sv status -sp <service0>
<state> <pid>
> It's your baby, though, and if I'm going to be writing a patch, my
> intent is for it to meet your standards.
Thanks a lot for your contribution.
Regards, Gerrit.
next prev parent reply other threads:[~2005-09-01 9:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 16:26 Charles Duffy
2005-05-29 5:52 ` Gerrit Pape
2005-05-30 7:42 ` Laurent Bercot
2005-05-31 11:49 ` Gerrit Pape
2005-05-31 14:28 ` Paul Jarc
2005-05-31 19:09 ` Gerrit Pape
2005-06-01 0:05 ` Joan Picanyol i Puig
2005-08-26 20:30 ` Charles Duffy
2005-08-27 19:24 ` Gerrit Pape
2005-08-27 22:56 ` Charles Duffy
2005-08-29 8:12 ` Gerrit Pape
2005-08-29 10:08 ` Charles Duffy
2005-08-30 11:06 ` Gerrit Pape
2005-08-30 16:55 ` Charles Duffy
2005-09-01 9:13 ` Gerrit Pape [this message]
2005-09-12 15:11 ` Charles Duffy
2005-09-15 9:33 ` Gerrit Pape
2005-09-15 12:18 ` Paul Jarc
2005-09-15 14:46 ` Gerrit Pape
2005-09-15 18:10 ` Charles Duffy
2005-09-16 8:15 ` Gerrit Pape
2005-08-27 23:01 ` Charles Duffy
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050901090929.21301.qmail@e93696dc08427e.315fe32.mid.smarden.org \
--to=pape@smarden.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).