1 |
On Sat, 23 Dec 2006 20:50:06 +0100 |
2 |
Enrico Weigelt <weigelt@×××××.de> wrote: |
3 |
|
4 |
> > 2) A simple status call to the init script checks running daemons |
5 |
> > and returns either 0 or 1 appropriately allowing a sys admin to |
6 |
> > report on crashed services and possible take an automated action. |
7 |
> |
8 |
> Yes, of course. But that's not what I'm actually looking for. |
9 |
> Recently I had the problem that some service died, which was necessary |
10 |
> for another one. While trying to start the other one, I ran into |
11 |
> trouble since the init system didn't know about the died service. |
12 |
> |
13 |
> If the lookup would go directly to checking things like pidfiles |
14 |
> (where applicable) instead of the flag files, such problems would |
15 |
> (IMHO) be entirely fixed. |
16 |
|
17 |
OK, read the code yourself as you don't belive me. |
18 |
http://sources.gentoo.org/viewcvs.py/baselayout/trunk/sh/rc-daemon.sh?rev=2441&view=markup |
19 |
But as it's Christmas I'll tell you anyway. |
20 |
|
21 |
A status check will examine every daemon started by start-stop-daemon |
22 |
in the service and check if it's still running by the process name/exec |
23 |
file and optional that it's running on the given pid in a pidfile if |
24 |
specified. If any listed daemons have crashed then the service is |
25 |
stopped and the stopped status is returned. |
26 |
|
27 |
Of course, a non root user can query the status too, but in this case |
28 |
only the init.d/started/service flag is checks as non root users cannot |
29 |
do the above. |
30 |
|
31 |
Thanks |
32 |
|
33 |
Roy |
34 |
-- |
35 |
gentoo-dev@g.o mailing list |