:: Re: [DNG] Init respawns - was: Be p…
Etusivu
Poista viesti
Vastaa
Lähettäjä: karl
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] Init respawns - was: Be prepared for the fall of systemd
Steve Litt:
> On Thu, 2022-08-04 at 16:01 +0200, karl@??? wrote:
> > Steve Litt:

...
> > There is no requirement of pid files in the above. The notion of pid
> > files comes from some req. that you should be able to do
> > ./some_script stop. 
>
> I do sv stop daemonname all the time.


Well, fine, I don't complain about that, just don't exspect every
one to have the same set of requirments.

> > If you don't care about scripts like thoose in
> > /etc/init.d there is no need for pid files, and if you manage the
> > startup and shutdown of single processes on your own then the ps
> > output is sufficient.
>
> What if there are two of them running, or two processes so close in text that it's
> hard to grep between them? I've done stuff like looking at the ps output or
> searching thru /proc, but I always felt a little insecure when doing so.


. minimizes the number of running processes
. when reading ps output, remove the kernel tasks from the list
try e.g. ps ax | egrep -v '\]$' | sort -n
. if it listens to a socket you can use netstat -tulp

Regards,
/Karl Hammar