Zombie-Prozesse beim Start von Asterisk aus der rc.custom (ds-mod)

udosw

Aktives Mitglied
Mitglied seit
20 Mrz 2004
Beiträge
1,114
Punkte für Reaktionen
0
Punkte
36
Wenn ich Asterisk aus der rc.custom des ds_mod starte, erhalte ich massenhaft Zombie-Prozesse, die im Laufe der Zeit auch mehr werden, je nach dem was man auf der Box eingibt. Ich hatte das im ds-mod-Forum schon mal erwähnt.
Code:
/ $ ps    PID  Uid        VSZ Stat Command
      1 root       1432 S   init       
      2 root            SWN [ksoftirqd/0]
      3 root            SW< [events/0]
      4 root            SW< [khelper]
      5 root            SW< [kthread]
      6 root            SW< [kblockd/0]
     25 root            SW< [pdflush]
     26 root            SW< [pdflush]
     28 root            SW< [aio/0]
     27 root            SW  [kswapd0]
     64 root            SW  [pm_info]
     73 root            SW  [mtdblockd]
     93 root            SW  [tffsd_mtd_0]
     95 root       1432 S   init       
     96 root       1472 S   /bin/sh /etc/init.d/rc.S 
    371 root       1432 S   cat /dev/debug 
    376 root            SW< [capi_oslib]
    377 root            SW< [capi_oslib]
    378 root            SW  [ubik2_tx[8]]
    379 root            SW  [capitransp]
    405 root            Z   [basename]
    406 root            Z   [basename]
    409 root            Z   [basename]
    410 root            Z   [basename]
    423 root            Z N [ctlmgr]
    424 root       7712 S N ctlmgr 
    520 root       1448 S   httpd -p 80 -h /usr/www/all 
    528 root            Z   [basename]
    529 root            Z   [basename]
    552 root            Z   [multid]
    553 root            Z   [multid]
    559 root            Z   [multid]
    560 root            Z   [multid]
    564 root            Z   [dsld]
    565 root       4500 S   dsld -i -n -g 
    571 root            RWN [kdsld_token]
    575 root       3328 S   telefon a127.0.0.1 
    579 root            Z   [sh]
    581 root            Z   [voipd]
    582 root       7316 S < voipd 
    588 root        948 S   /bin/run_clock -c /dev/tffs -d 
    592 root       1432 S   tee /var/log/mod.log 
    617 root            Z   [crond]
    618 root       1436 S   crond -b 
    621 root            Z   [telnetd]
    622 root       1448 S   telnetd -l /sbin/ar7login 
    630 root       1448 S   httpd -p 81 -c /mod/etc/httpd.conf -h /usr/mww/ -r DS-MOD (user:admin) 
    674 root       1444 S   syslogd -L -C 
    676 root       1428 S   /sbin/klogd 
    681 root       1452 S   -sh 
    682 root       1452 S   -sh 
    683 root       1452 S   -sh 
    879 root            SW  [cifsd]
    875 root            SW  [cifsoplockd]
    876 root            SW  [cifsdnotifyd]
    883 root            Z   [basename]
    884 root            Z   [basename]
    906 root            Z   [sh]
    909 root            Z   [dnsmasq]
    910 root            Z   [dnsmasq]
    912 root            Z   [multid]
    913 root            Z   [multid]
    942 root            Z   [sh]
    966 root            Z   [pptpd]
    967 root        704 S   pptpd -c /var/flash/pptpd.conf 
   1369 root      19736 S   asterisk -vvv 
   1370 root      19736 S   asterisk -vvv 
   1372 root      19736 S   asterisk -vvv 
   1373 root      19736 S   asterisk -vvv 
   1374 root      19736 S   asterisk -vvv 
   1375 root      19736 S   asterisk -vvv 
   1376 root      19736 S   asterisk -vvv 
   1377 root      19736 S   asterisk -vvv 
   1378 root      19736 S   asterisk -vvv 
   1379 root      19736 S   asterisk -vvv 
   1380 root      19736 S   asterisk -vvv 
   1381 root      19736 S   asterisk -vvv 
   1382 root      19736 S   asterisk -vvv 
   1383 root      19736 S   asterisk -vvv 
   1384 root      19736 S   asterisk -vvv 
   1385 root      19736 S   asterisk -vvv 
   1386 root      19736 S   asterisk -vvv 
   1387 root      19736 S   asterisk -vvv 
   1388 root      19736 S   asterisk -vvv 
   1389 root      19736 S   asterisk -vvv 
   1390 root      19736 S   asterisk -vvv 
   1392 root            Z   [webcm]
   1414 root            Z N [basename]
   1415 root            Z N [basename]
   1418 root            Z N [basename]
   1419 root            Z N [basename]
   1456 root        940 S N wpa_authenticator 
   1754 root            Z   [basename]
   1755 root            Z   [basename]
   1761 root            Z   [sh]
   1777 root            Z   [dnsmasq]
   1778 root            Z   [dnsmasq]
   1783 root            Z   [multid]
   1784 root            Z   [multid]
   1788 root            Z   [sh]
   1856 root            Z   [basename]
   1857 root            Z   [basename]
   1863 root            Z   [sh]
   1866 root            Z   [webcm]
   1883 root            Z   [dnsmasq]
   1884 root        844 S   dnsmasq -p 53 --clear-on-reload 
   1889 root            Z   [multid]
   1890 root       3932 S   multid -u 
   1894 root            Z   [sh]
   1903 root       1432 R   ps 
  / $
Wenn ich den Asterisk beende und erneut starte sind die Zombies weg und es entstehen auch keine neuen. Dasselbe wenn ich ihn nicht automatisch starte sondern nachträglich manuell:
Code:
$ ps
    PID  Uid        VSZ Stat Command
      1 root       1432 S   init       
      2 root            SWN [ksoftirqd/0]
      3 root            SW< [events/0]
      4 root            SW< [khelper]
      5 root            SW< [kthread]
      6 root            SW< [kblockd/0]
     25 root            SW< [pdflush]
     26 root            SW< [pdflush]
     28 root            SW< [aio/0]
     27 root            SW  [kswapd0]
     64 root            SW  [pm_info]
     73 root            SW  [mtdblockd]
     93 root            SW  [tffsd_mtd_0]
    371 root       1432 S   cat /dev/debug 
    376 root            SW< [capi_oslib]
    377 root            SW< [capi_oslib]
    378 root            SW  [ubik2_tx[8]]
    379 root            SW  [capitransp]
    424 root       7708 S N ctlmgr 
    520 root       1448 S   httpd -p 80 -h /usr/www/all 
    565 root       4500 S   dsld -i -n -g 
    571 root            RWN [kdsld_token]
    575 root       3328 S   telefon a127.0.0.1 
    582 root       7320 S < voipd 
    588 root        948 S   /bin/run_clock -c /dev/tffs -d 
    618 root       1436 S   crond -b 
    622 root       1448 S   telnetd -l /sbin/ar7login 
    630 root       1448 S   httpd -p 81 -c /mod/etc/httpd.conf -h /usr/mww/ -r DS-MOD (user:admin) 
    674 root       1444 S   syslogd -L -C 
    676 root       1428 S   /sbin/klogd 
    681 root       1452 S   -sh 
    682 root       1452 S   -sh 
    683 root       1452 S   -sh 
    879 root            SW  [cifsd]
    875 root            SW  [cifsoplockd]
    876 root            SW  [cifsdnotifyd]
    967 root        704 S   pptpd -c /var/flash/pptpd.conf 
   1456 root        940 S N wpa_authenticator 
   1884 root        844 S   dnsmasq -p 53 --clear-on-reload 
   1890 root       3932 S   multid -u 
   1925 root       1432 S   init       
   1959 root      20892 S   bin/asterisk 
   1960 root      20892 S   bin/asterisk 
   1962 root      20892 S   bin/asterisk 
   1963 root      20892 S   bin/asterisk 
   1964 root      20892 S   bin/asterisk 
   1965 root      20892 S   bin/asterisk 
   1966 root      20892 S   bin/asterisk 
   1967 root      20892 S   bin/asterisk 
   1968 root      20892 S   bin/asterisk 
   1969 root      20892 S   bin/asterisk 
   1970 root      20892 S   bin/asterisk 
   1971 root      20892 S   bin/asterisk 
   1972 root      20892 S   bin/asterisk 
   1973 root      20892 S   bin/asterisk 
   1974 root      20892 S   bin/asterisk 
   1975 root      20892 S   bin/asterisk 
   1976 root      20892 S   bin/asterisk 
   1977 root      20892 S   bin/asterisk 
   1978 root      20892 S   bin/asterisk 
   1979 root      20892 S   bin/asterisk 
   1980 root      20892 S   bin/asterisk 
   1981 root       1432 R   ps 
  /var $
Woran kann das liegen? Sollte der Asterisk von anderer Stelle aus gestartet werden?

Nachtrag: Ende der rc.custom:
Code:
cd /var
./cfg_asterisk14 start 0 d


# Ende ds-mod script
###################################

# stop internet phone led flashing
echo 14,1 > ${LED_DEVICE}

Udo
 
Ich hatte doch schon geschrieben, daß Zombie-Prozesse dann auftreten, wenn die Datei /etc/init.d/rc.S und alle davon aufgerufenen Skripte nicht beendet werden. Was passiert denn, wenn Du das von Hand aufrufst:
Code:
cd /var
./cfg_asterisk14 start 0 d
Kommt danach ein Shell Prompt oder kommt der erst wiedern, wenn Asterisk beendet ist?
 
Es kommt ein Prompt, allerdings wird auch eine Menge auf der Console ausgegeben.

Übrigens hört auch die Led auf zu blinken,
echo 14,1 > ${LED_DEVICE}
wird also ausgeführt, d.h. rc.custom läuft dann weiter.

Ich hab schon alles mögliche versucht, z.B.
./cfg_asterisk14 start 0 d > /dev(null
oder ähnliches, es hilft alles nichts.

Wir starten denn die anderen hier den * auf der Box? Bin ich etwa der einzige, der * und ds_mod zusammen einsetzt?

Udo
 
gelöst!

Cool - das ist es. Keine Zombies mehr! :bier:

Ok. ich verstehe:
> /dev/null - Leitet die Standard-Ausgabe um
2> /dev/null - Leitet die Errors um
& - schickt den Prozess in den Hintergrund (hatte ich aber schon einzeln versucht, brngt nix).

Aber was bewirkst Du damit, nochmal
< /dev/null
auf den Prozess zu leiten?

:bahnhof:

Udo
 
< /dev/null leitet die Standard-Eingabe um.
Damit sind alle Standard-Kanäle (Eingabe, Ausgabe, Fehler, Dateinummern 0, 1, 2) nicht mehr mit dem Terminal bzw. der Konsole verbunden, sondern mit /dev/null.
 

Statistik des Forums

Themen
244,695
Beiträge
2,216,692
Mitglieder
371,315
Neuestes Mitglied
jack-mack
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.