David Haller wrote:
On Son, 10 Jun 2001, Thomas Ulrich Nockmann wrote:
kill -1 'ps -A | grep inetd | cut -f1 -d "?"'
Argl!
kill -1 `pidof inetd`
Oder auch: killall -1 inetd Aber um diese ganzen Details muß man sich eigentlich gar keine Gedanken machen, denn rcinetd reload wird's schon richtig machen[1] ;-) Eilert Footnotes: [1] mit `killproc -HUP /usr/sbin/inetd` -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eilert Brinkmann -- Universitaet Bremen -- FB 3, Informatik eilert@informatik.uni-bremen.de - eilert@tzi.org http://www.informatik.uni-bremen.de/~eilert/
Am Montag, 11. Juni 2001 11:19 schrieb Eilert Brinkmann:
David Haller wrote:
On Son, 10 Jun 2001, Thomas Ulrich Nockmann wrote:
kill -1 'ps -A | grep inetd | cut -f1 -d "?"'
Argl!
kill -1 `pidof inetd`
Warum Argl! ? Ich nehme 'mal den httpd als Beispiel und SIGKILL: Moechte 'mal sehen, was die Bash so macht. erde:~ # set -x Ich trace also. erde:~ # ps -e|grep httpd + ps -e + grep httpd 2069 ? 00:00:00 httpd 2070 ? 00:00:00 httpd 2084 ? 00:00:00 httpd erde:~ # kill -9 `pidof httpd` ++ pidof httpd + kill -9 2084 2069 Zwei Prozesse werden gekillt. erde:~ # ps -e|grep httpd + ps -e + grep httpd 2070 ? 00:00:00 httpd Was will der Luemmel denn noch hier ? erde:~ # /etc/init.d/apache start + /etc/init.d/apache start Starting httpd [ SuSEHelp PHP3 mod_perl LDAP contrib backhand ] failed <<<<----- erde:~ # ps -e|grep httpd + ps -e + grep httpd 2070 ? 00:00:00 httpd erde:~ # Ist ja ganz schoen hardnaeckig. Um httpd neu zu starten muss ich jetzt also noch'n -9 absetzen. erde:~ # kill -9 `ps -A | grep httpd | cut -f1 -d "?"` ++ ps -A ++ grep httpd ++ cut -f1 -d '?' + kill -9 2070 erde:~ # /etc/init.d/apache start + /etc/init.d/apache start Starting httpd [ SuSEHelp PHP3 mod_perl LDAP contrib backhand ] done erde:~ # ps -e|grep httpd + ps -e + grep httpd 2172 ? 00:00:00 httpd 2173 ? 00:00:00 httpd 2187 ? 00:00:00 httpd erde:~ # kill -9 `ps -A | grep httpd | cut -f1 -d "?"` ++ ps -A ++ grep httpd ++ cut -f1 -d '?' + kill -9 2172 2173 2187 erde:~ # /etc/init.d/apache start + /etc/init.d/apache start Starting httpd [ SuSEHelp PHP3 mod_perl LDAP contrib backhand ] done <<<<----- erde:~ # OK, wenn man statt 'nen SIGKILL einen SIGTERM verwendet, haut es auch mit kill -15 `pidof httpd` hin, ich denke jedoch, dann ist der SIGTERM fuer das saubere Beenden verandwortlich und nicht `pidof inetd` . Oder taeusche ich mich da ?
Aber um diese ganzen Details muß man sich eigentlich gar keine Gedanken machen, denn
Sollte man schon. Ist doch 'ne li-Nixe.
rcinetd reload
wird's schon richtig machen[1] ;-)
Oioioi, das kann im Zweifel aber teuer werden (-, Thomas -- Thomas Ulrich Nockmann · Rennbahnstrasse 109 · D-50737 Koeln Tux#208556 · ICQ#24544838 +49 221 2945682 · mailinglists@nockmann.de · http://www.nockmann.de
On Mon, 11 Jun 2001, Thomas Ulrich Nockmann wrote:
Am Montag, 11. Juni 2001 11:19 schrieb Eilert Brinkmann:
David Haller wrote:
On Son, 10 Jun 2001, Thomas Ulrich Nockmann wrote:
kill -1 'ps -A | grep inetd | cut -f1 -d "?"'
Argl!
kill -1 `pidof inetd`
Warum Argl! ?
Ich bezog mich auf das `ps -A | ... ` Denn _das_ emuliert die funktionalitaet von pidof... Fuer das was du dann anschliessend schreibst ist 'killall' dein Freund... Oder, bei daemons wie apache/inetd das jew. rc-script, also Usage: /usr/sbin/rcinetd {start|stop|status|restart|reload|probe} Usage: /usr/sbin/rcapache {start|stop|status|full-status|restart|reload} etc... -dnh -- 47: Neue Version mit deutlich mehr Funktionalität. Haben Sie schon die Speichererweiterung gekauft? (Kristian Köhntopp)
participants (3)
-
David Haller
-
Eilert Brinkmann
-
Thomas Ulrich Nockmann