From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/864 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit - access to run script's exit status for finish? Date: Thu, 1 Sep 2005 09:13:55 +0000 Message-ID: <20050901090929.21301.qmail@e93696dc08427e.315fe32.mid.smarden.org> References: <20050531190911.25938.qmail@adf4e649eec508.315fe32.mid.smarden.org> <20050601000521.GB32490@grummit.biaix.org> <20050827192438.24239.qmail@573d30f8a31845.315fe32.mid.smarden.org> <20050829080807.24479.qmail@b57f7a37a4464e.315fe32.mid.smarden.org> <20050830110217.15995.qmail@963fcd0f0e93e1.315fe32.mid.smarden.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125565886 32405 80.91.229.2 (1 Sep 2005 09:11:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2005 09:11:26 +0000 (UTC) Original-X-From: supervision-return-1100-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Sep 01 11:11:24 2005 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1EAl4G-0004db-7W for gcsg-supervision@gmane.org; Thu, 01 Sep 2005 11:09:08 +0200 Original-Received: (qmail 2795 invoked by uid 76); 1 Sep 2005 09:09:28 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 2790 invoked from network); 1 Sep 2005 09:09:28 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:864 Archived-At: 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 ... > >> > >> > >> > >>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 > > > > > > $ sv status-uptime > > > > $ > > ... > > 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 [-v] [-w sec] ... sv status [-v] [-w sec] [-puswrf] ... -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 > 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.