Hallo List, hatte vor ein paar Tagen schon einmal nach dem at Befehl gefragt, bzw. mein Problem geschildert. Ich bin fast am verzweifeln... Kann mir bitte jemand helfen?! Selbst wenn ich ein Script mit einem einfachen echo Befehl aufrufe, steht anschliessend ein Prozess defunct: Script: #!/bin/sh echo test at - Befehl: at -f /tmp/test now In diesem Fall steht anschließend sendmail <defunct> Was ist falsch? Danke Carsten
From: "Carsten Roehling" <froelix@t-online.de> Subject: Immer noch at Befehl Hallo!
Selbst wenn ich ein Script mit einem einfachen echo Befehl aufrufe, steht anschliessend ein Prozess defunct:
Script:
#!/bin/sh echo test
at - Befehl: at -f /tmp/test now
In diesem Fall steht anschließend sendmail <defunct>
Wenn ich mich recht erinnere, generiert at automatisch eine Mail (an root) mit den Ausgaben - vermutlich ist der sendmail nicht richtig eingerichtet. Mehr dazu unter http://www.linux-magazin.de/ausgabe/1999/12/Answergirl/answergirl5.html und http://www.linux-magazin.de/ausgabe/1998/08/Cron/cron.html hat mir geholfen... ;-) MfG Wolfgang Eul
Hallo Carsten, * Carsten Roehling schrieb am 07.Jun.2002:
Selbst wenn ich ein Script mit einem einfachen echo Befehl aufrufe, steht anschliessend ein Prozess defunct:
Script:
#!/bin/sh
Gehört imho nicht dahin.
echo test
mach mal echo test > /tmp/at_test_datei Besser, es gibt keine Ausgabe. Das Problem ist immer das gleiche: Stell Dir vor, Du da steht nicht now sondern +5years oder so. Es ist nicht sehr wahrscheinlich, daß Du da noch auf diesem Bildschirm angemeldet bist. Daher gibt es keine Ausgabe auf dem Bildschirm, auf dem Du Dich befindest.
at - Befehl: at -f /tmp/test now
Bernd -- ACK = ACKnowledge = Zustimmung | NAC = No ACknowledge = keine Zustimmung DAU = Dümmster Anzunehmender User | LOL = Laughing Out Loud = Lautes Lachen IIRC = If I Remember Correctly = Falls ich mich richtig erinnere OT = Off Topic = Am Thema (der Liste) vorbei |Zufallssignatur 11
Hallo Bernd, --Am Freitag, 7. Juni 2002 16:31 +0200 schrieb Bernd Brodesser <B.Brodesser@t-online.de> :
Hallo Carsten,
* Carsten Roehling schrieb am 07.Jun.2002:
Selbst wenn ich ein Script mit einem einfachen echo Befehl aufrufe, steht anschliessend ein Prozess defunct:
Script:
# !/bin/sh
Gehört imho nicht dahin. Gut. Habe ich rausgenommen.
echo test
mach mal
echo test > /tmp/at_test_datei
Besser, es gibt keine Ausgabe. Das Problem ist immer das gleiche: Stell Dir vor, Du da steht nicht now sondern +5years oder so. Es ist nicht sehr wahrscheinlich, daß Du da noch auf diesem Bildschirm angemeldet bist. Daher gibt es keine Ausgabe auf dem Bildschirm, auf dem Du Dich befindest.
Habe ich auch probiert, doch trotzdem steht atd <defunct> da (wenn ich ps -All aufrufe). Und erst mit rcatd restart ist es wieder in Ordung. Auch wenn ich in dem Script nur echo test stehen habe, ist der Eintrag sendmail <defunct> nur durch einen Restart des atd zu beseitigen. Übrigens, das echo test, erscheint dann in der Mail, die zugestellt wird. Auch die Seiten die mir Wolfgang Eul empfohlen hat, haben mir nicht weitergeholfen. BTW ich nutze Postfix. Carsten
Hallo Carsten, * Carsten Roehling schrieb am 08.Jun.2002:
--Am Freitag, 7. Juni 2002 16:31 +0200 schrieb Bernd Brodesser
* Carsten Roehling schrieb am 07.Jun.2002:
# !/bin/sh
Gehört imho nicht dahin. Gut. Habe ich rausgenommen.
Ist aber nicht der wesentliche Punkt. Es ist nur kein Shellskript, sondern eine Auflistung der Befehle. Das ist was anderes.
echo test
mach mal
echo test > /tmp/at_test_datei
Besser, es gibt keine Ausgabe. Das Problem ist immer das gleiche: Stell Dir vor, Du da steht nicht now sondern +5years oder so. Es ist nicht sehr wahrscheinlich, daß Du da noch auf diesem Bildschirm angemeldet bist. Daher gibt es keine Ausgabe auf dem Bildschirm, auf dem Du Dich befindest.
Habe ich auch probiert, doch trotzdem steht atd <defunct> da (wenn ich ps -All aufrufe).
Das ist doch bestimmt ein Zombie. Der Prozeßstatus wird doch Z sein, oder? Zombies sind tot. Mausetot. Die stören nicht.
Und erst mit rcatd restart ist es wieder in Ordung.
Dadurch wird der Elterprozeß gekillt und damit erbt init die Mutter aller Prozesse den Zombieprozeß und der ließt die Prozeßdaten, und der Kernel nimmt ihm darauf aus der Liste. Aber das ist eigentlich nicht nötig.
Auch wenn ich in dem Script nur echo test stehen habe, ist der Eintrag sendmail <defunct> nur durch einen Restart des atd zu beseitigen. Übrigens, das echo test, erscheint dann in der Mail, die zugestellt wird.
Ja. Weil dem Prozeß kein Ausgabeterminal zugeordnet ist, kann auch keine Ausgabe gemacht werden. Daher wird jede Ausgabe als Mail verschickt. Daher sagte ich ja auch, mach keine Ausgabe, sondern lenk um. Ist denn eine Datei mit dem Eintrag entstanden? Ob da noch ein paar Zombies rumlaufen oder nicht, ist letztendlich nicht so wichtig. Bernd -- ACK = ACKnowledge = Zustimmung | NAC = No ACknowledge = keine Zustimmung DAU = Dümmster Anzunehmender User | LOL = Laughing Out Loud = Lautes Lachen IIRC = If I Remember Correctly = Falls ich mich richtig erinnere OT = Off Topic = Am Thema (der Liste) vorbei |Zufallssignatur 11
Hallo Bernd ersteinmal Danke... --Am Samstag, 8. Juni 2002 18:03 +0200 schrieb Bernd Brodesser <B.Brodesser@t-online.de> :
Ist denn eine Datei mit dem Eintrag entstanden? Ob da noch ein paar Zombies rumlaufen oder nicht, ist letztendlich nicht so wichtig.
Bernd
Ja die Datei ist entstanden, soweit haut es hin. Doch warum diese Zombies? Auch wenn sie nicht stören, warum werden diese Prozesse nicht 'richtig' beendet? Irgendwas läuft doch da nicht so wie es laufen sollte, oder? Carsten
* Carsten Roehling schrieb am 08.Jun.2002:
--Am Samstag, 8. Juni 2002 18:03 +0200 schrieb Bernd Brodesser
Ist denn eine Datei mit dem Eintrag entstanden? Ob da noch ein paar Zombies rumlaufen oder nicht, ist letztendlich nicht so wichtig.
Ja die Datei ist entstanden, soweit haut es hin. Doch warum diese Zombies? Auch wenn sie nicht stören, warum werden diese Prozesse nicht 'richtig' beendet?
Der Prozeß ist richtig beendet. Es ist nur so, wenn ein Prozeß einen andern anstöst, dann will er normalerweise darüber informiert werden, wenn der Kindprozeß stirbt. Darum macht der Elterprozeß ein wait und wartet auf die Beendigung des Kindporzesses. Dabei erhält er die Prozeßdaten des Kindes zurück. Nun kann es aber sein, daß auch der Elterprozeß noch was erledigen muß, bevor er warten kann. In der Zwichenzeit kann aber der Kindprozeß schon gestorben sein. Wenn der Elterprozeß sich dann doch noch zu einem wait entschließt, hätte er gerne die Prozeßdaten des Kindprozesses zurück. Deshalb müssen diese Prozeßdaten verwahrt werden. Der Kindprozeß wird, obwohl tot, nicht aus der Prozeßliste entfernt. Der Prozeßstatus des Kindprozesses wird Z.
Irgendwas läuft doch da nicht so wie es laufen sollte, oder?
Ja, normal ist das nicht. Der Fehler muß beim Elterporzeß liegen. Also in Deinem Fall bei /usr/sbin/atd. Schon mal in der sdb nachgesehen, ob da was dazu steht? Am Besten online, da es was neueres sein könnte. Ich habe das Problem nicht. (SuSE 7.2) Bernd -- Welches Buch ist zu empfehlen? Schon mal bei SuSE vorbeigesehen? http://www.suse.de/de/products/books/index.html oder die Empfehlungen der SuSE-Entwickler auf dem eigenen Rechner? file:///usr/share/doc/sdb/de/html/literatur.html |Zufallssignatur 5
On Sat, 08 Jun 2002 23:28:50 +0200 Carsten Roehling <froelix@t-online.de> wrote:
Hallo Bernd ersteinmal Danke... --Am Samstag, 8. Juni 2002 18:03 +0200 schrieb Bernd Brodesser
Ist denn eine Datei mit dem Eintrag entstanden? Ob da noch ein paar Zombies rumlaufen oder nicht, ist letztendlich nicht so wichtig.
Bernd
Ja die Datei ist entstanden, soweit haut es hin. Doch warum diese Zombies? Auch wenn sie nicht stören, warum werden diese Prozesse nicht 'richtig' beendet? Irgendwas läuft doch da nicht so wie es laufen sollte, oder?
Hi, steht denn in der Datei auch drin, was drinstehen sollte? Habs grad bei mir versucht: echo "date; env; >/tmp/at.erg" >/tmp/at.txt at -f /tmp/at.txt +1min nach einer Minute ist /tmp/at.erg vorhanden und die Ausgabe von date und env ist drin. Ausserdem habe ich eine Mail erhalten mit dem gleichen Inhalt. Vielleicht ist mit Mail/Sendmail was faul... Was macht echo "Mailtest" >/tmp/mailtest mail -s "at-Test" $LOGNAME </tmp/mailtest echo "Sendmailtest" >/tmp/mailtest sendmail $LOGNAME </tmp/mailtest mail Du solltest eine Mail mit dem Inhalt "Mailtest" erhalten. -- so long... bernd ------------------------------------------------------------------------
Hallo Bernd --Am Sonntag, 9. Juni 2002 12:52 +0200 schrieb Bernd Obermayr <illuminatus@t-online.de> :
Hi, steht denn in der Datei auch drin, was drinstehen sollte?
Ja, es steht drin.
Habs grad bei mir versucht:
echo "date; env; >/tmp/at.erg" >/tmp/at.txt at -f /tmp/at.txt +1min
nach einer Minute ist /tmp/at.erg vorhanden und die Ausgabe von date und env ist drin.
Und steht bei dir nach Aufruf von ps -All atd <defunct> ?
Ausserdem habe ich eine Mail erhalten mit dem gleichen Inhalt.
Vielleicht ist mit Mail/Sendmail was faul...
Was macht echo "Mailtest" >/tmp/mailtest mail -s "at-Test" $LOGNAME </tmp/mailtest echo "Sendmailtest" >/tmp/mailtest sendmail $LOGNAME </tmp/mailtest mail
Du solltest eine Mail mit dem Inhalt "Mailtest" erhalten.
Das klappt auch. Doch mich stört bzw. irritiert der Zombie. Denn das ursprüngliche Problem ist ja, dass wenn ich in einem Script folgende Befehle eingebe und dieses mit at ausführen lasse, das ganze in einer Endlosschleife endet: /usr/X11R6/bin/scanimage -d "epson:/dev/scanner" --format tiff --mode Binary --resolution 150 --quick-format A4
/tmp/kopie1.tif && /usr/bin/tiff2ps /tmp/kopie1.tif /tmp/kopie1.ps && /usr/bin/gs -q -dBATCH -dNOPAUSE -sDEVICE=stp -SModel=escp2-750 -sOutputFile=/tmp/kopie1.prn /tmp/kopie1.ps
Auch nur der /usr/bin/gs ... Befehl läuft mit at endlos. D.h. es wird gescannt, konvertiert, ghostscript läuft, gescannt, konvertiert ..... Rufe ich das ganze aber per sh auf und füge in der ersten Zeile #!/bin/sh ein, so funktioniert es. Stoppen kann es nur durch ein killproc sh. Und dabei ist mir halt aufgefallen, dass anschliessend at bzw. sendmail als Zombie erscheinen. Lasse ich den /usr/bin/gs ... Befehl weg, so wird nur einmal gescannt, konvertiert und anschliessend steht wieder der at als Zombie. Carsten
* Peter Wiersig schrieb am 09.Jun.2002:
Carsten Roehling wrote:
at - Befehl: at -f /tmp/test now
In diesem Fall steht anschließend sendmail <defunct>
Was ist falsch?
echo ist ein Shell-Builtin, nicht wahr? Was ergibt "sh -c 'echo test'"?
echo ist sowohl ein Shell-Builtin, als auch ein eigenes Programm in /bin/echo Bernd -- ROTFL = Rolling On The Floor, Laughing = Auf dem Boden wälzen, lachend. SCNR = Sorry, Could Not Resist = Sorry, Ich konte nicht wiederstehen. AFAIK = As Far As I Know = So weit ich weis|BTW = By The Way = Nebenbei bemerkt IMHO = In My Humble Opinion = meiner bescheidenen Meinung nach |Zufallssig. 9
participants (5)
-
B.Brodesser@t-online.de
-
Bernd Obermayr
-
Carsten Roehling
-
Peter Wiersig
-
Wolfgang Eul