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

Re: start-stop-daemon : questions about retry



Hi Bob,

I checked the processes with ps -efH (thanks for that command) and everythings looked okay. After looking through the script I found a tiny typo. Embarassing, I know … So thanks everyone, my script is working now!

Anyway, here the output of "ps -efH":
root@euve3638:~# ps -efH
UID        PID  PPID  C STIME TTY          TIME CMD
[…]
root     18092     1  0 Jan12 ?        00:00:00   /usr/local/sbin/cherokee -d
www-data 18390 18092  0 Jan12 ?        00:00:11     /usr/local/sbin/cherokee-worker
www-data 18393 18390  0 Jan12 ?        00:00:00       /usr/bin/rrdtool -
www-data 32698 18092  0 05:36 ?        00:01:05     php-cgi -b 127.0.0.1:47990

- Stadtpirat



Von: Bob Proulx <bob@proulx.com>
An: debian-user@lists.debian.org
Gesendet: 21:33 Freitag, 11.Januar 2013
Betreff: Re: start-stop-daemon : questions about retry

- - wrote:
> unfortunately that’s already the case. But today I have a different
> behaviour. Cherokee stops, but doesn't kill php-cgi. Very very
> wierd.

In order to understand whether this is normal or not we would need to
know how you have set up php-cgi.  It could go either way.

> # ps aux
> USER      PID %CPU %MEM    VSZ  RSS TTY      STAT START  TIME COMMAND
> www-data  1294  0.1  0.7 193960 44688 ?        S    Jan09  1:07 php-cgi -b 127.0.0.1:47990
> root      1374  0.0  0.0  24712  764 ?        Ssl  Jan09  0:00 /usr/local/sbin/cherokee -d
> www-data  1376  0.0  0.1 794328 10528 ?        Sl  Jan09  0:01 /usr/local/sbin/cherokee-worker
> www-data  1378  0.0  0.0  76372  2156 ?        S    Jan09  0:00 /usr/bin/rrdtool -

Having grown up with SysV I like seeing the parent process id PPID
too.  Then you can tell if the process parent is 1 or not.  'ps -ef'
or 'ps -efH' shows this.  I don't know the BSD ps option to show the
PPID.

> # cat /usr/local/var/run/cherokee.pid
> 1374

That matches fine.

> # start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /usr/local/var/run/cherokee.pid --name cherokee
>
> #ps aux
> USER      PID %CPU %MEM    VSZ  RSS TTY      STAT START  TIME COMMAND
> www-data  1294  0.1  0.7 193960 44688 ?        S    Jan09  1:08 php-cgi -b 127.0.0.1:47990

The start-stop-daemon stopped cherokee fine.

> Does this have something to do with the script, or with cherokee?

It certainly has nothing to do with start-stop-daemon since it did
exactly as it was told.  The behavior of start-stop-daemon seems fine.

If you think cherokee should have stopped php-cgi then you would need
to tell us more about how you have it configured.  But this is very
cherokee specific, has little to do with Debian itself, and so you
would probably get better specific knowledge about cherokee on a
cherokee specific mailing list.

Bob



Reply to: