[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: policy for "/etc/init.d/foo status"?



On Tue, 14 Sep 2004 02:55:33 +0200
Christian Hammers <ch@debian.org> wrote:

> Hello
> 
> (technical discussion probably belongs to debian-devel but I first want
> to ask if this has already brought to discussion here as the init scripts
> output is part of the poliy)
> 
> I user just wrote me that he uses some kind of monitoring tool and would be
> happy if every server would have his own way to see if it is really running
> (and not only present in the processlist) and if this service would be
> available through a general interface like "/etc/init.d/foo status".
> 
> Currently some servers implement "status" but there seems to be no standard
> nor recommendation what should be given back.
> 
> Letting such a check be implemented by the maintainers would at least be
> better than seeing watchdog scripts that just check for strings in the 
> process list or similar things which seem to work just as long as it's not
> needed.
> 
> One idea would be some kind of exit code list
>  100 - up and running
>  110 - up but not responding correctly
>  111 - down
>  112 - administrativly wanted to be down
> Another some kind of machine readable first line.

Why not using codes like common protocols (HTTP, SMTP), where the
first number is the general idea about the state, like 2xx for HTTP
success. /etc/init.d/foo status would return e.g.

200 Up and Running (exit code 0)

I suggest to use exit codes != 1 only if the init script itself is broken.

Bye
	Racke


-- 
Debian maintainer of Courier, Pure-FTPd, Interchange, Sympa

LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration



Reply to: