Re: Help!!!! How to kill tar process
Pass a signal to the kill command: # kill -9 1484 or # killall -9 tar Signal 9 is SIGKILL which cannot be caught by a process and therefore will end a process with no (or few) questions asked. # kill -QUIT 1484 will send the SIGQUIT signal to process 1484. If SIGQUIT is caught and handled properly by the code of the program, then the process should exit out nicely. Certain programs handle certain signals better than others. # killall -12 netscape for instance, will axe all instances of netscape when it hangs. -12 is one of the user defined signals that NS uses to save it's stuff and quit out nicely. 'man kill' for more info :) -Statux On Fri, 24 May 2002, Jianping Zhu wrote: > When I try to stop a process of backing up a files to tape drive by using > tar i always fails. > For example: > i use ps -aux . I got following process . > root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home > > when i tried to kill it by using kill 1484, but the process can not be > killed, I have to restart my redhat linux 7.1 sever. > It gives me too much trouble. > > Any suggestion will be greatly appreciated. > > Jianping Zhu > > > > Jianping Zhu > Department of Computer Science > Univerity of Georgia > Athens, GA 30602 > Tel 706 5423900 > > > > > ___ > Redhat-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/redhat-list > -- ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: Help!!!! How to kill tar process
On 17:56 24 May 2002, Jianping Zhu <[EMAIL PROTECTED]> wrote: | When I try to stop a process of backing up a files to tape drive by using | tar i always fails. | For example: | i use ps -aux . I got following process . | root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home I hate to tell you this, but this isn't backing up to tape, this is extracting from tape and writing to your disc drive. | when i tried to kill it by using kill 1484, but the process can not be | killed, I have to restart my redhat linux 7.1 sever. Others have suggested signal 9. I don't really expect it to help. Why? Because it looks like your process is stuck in D state. The signal 9 will be delivered (just as your current kill is delivered) but the process may not act on that delivery until the state is cleared. You need to know why the process is blocked in D state (which normally means a short term disc wait, but if you always get that "D" in your process listing, something's wrong). This command: ps -eo pid,tt,user,fname,tmout,f,wchan will show the WCHAN field in the last column, which will show vaguely what the process is waiting on. If it's really stopped, you can see exactly when it has open with this command: lsof -p 1484 where you should replace the "1484" with the actual process id, and you can see what it's doing like this: strace -p 1484 Again, adjust the process id number to suit. The file descriptor numbers from the lsof command's "FD" column (down the bottom, labelled "0u", "1u" etc) will tell you which files the file descriptor numbers from the strace command refer to. Most likely the strace command will show the tar blocked in a read() or write(). By looking up the file descriptor number in the lsof listing you can then find out the name of what it was accessing. Both strace and lsof are in /usr/sbin, you you may need to add that to your $PATH or just say: /usr/sbin/lsof -p pid /usr/sbin/strace -p pid outright. Cheers, -- Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/ Well, I was coming around the turn when I saw a cop car coming the other way and I thought I shouldn't be leaned over so far. - The Unknown DoD after his drop ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: Help!!!! How to kill tar process
try kill -9 1484 =) Regards, - Muhammad Faisal Rauf Danka Chief Technology Officer Gem Internet Services (Pvt) Ltd. web: www.gem.net.pk voice: 92-021-111-GEMNET Vice President Pakistan Computer Emergency Responce Team (PakCERT) web: www.pakcert.org Chief Security Analyst Applied Technology Research Center (ATRC) web: www.atrc.net.pk voice: 92-21-4980523 92-21-4974781 "Great is the Art of beginning, but Greater is the Art of ending. " --BEGIN GEEK CODE BLOCK Version: 3.1 GCS/CM/P/TW d- s: !a C++ B@ L$ S$ U+++ P+ L+++ E--- W+ N+ o+ K- w-- O- PS PE- Y- PGP+ t+ X R tv+ b++ DI+ D G e++ h! r+ y+ --END GEEK CODE BLOCK-- --- Jianping Zhu <[EMAIL PROTECTED]> wrote: >When I try to stop a process of backing up a files to tape drive by using >tar i always fails. >For example: >i use ps -aux . I got following process . >root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home > >when i tried to kill it by using kill 1484, but the process can not be >killed, I have to restart my redhat linux 7.1 sever. >It gives me too much trouble. > >Any suggestion will be greatly appreciated. > >Jianping Zhu > > > >Jianping Zhu >Department of Computer Science >Univerity of Georgia >Athens, GA 30602 >Tel 706 5423900 > > > > >___ >Redhat-list mailing list >[EMAIL PROTECTED] >https://listman.redhat.com/mailman/listinfo/redhat-list _ --- [ATTITUDEX.COM] http://www.attitudex.com/ --- _ Promote your group and strengthen ties to your members with [EMAIL PROTECTED] by Everyone.net http://www.everyone.net/?btn=tag ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: Help!!!! How to kill tar process
On Fri, 2002-05-24 at 16:56, Jianping Zhu wrote: > When I try to stop a process of backing up a files to tape drive by using > tar i always fails. > For example: > i use ps -aux . I got following process . > root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home > > when i tried to kill it by using kill 1484, but the process can not be > killed, I have to restart my redhat linux 7.1 sever. > It gives me too much trouble. try: kill -9 processid the default signal sent by kill is, I believe 15 which I have always understood that many programs see it as a sort of " Hey it would be really nice if you would kill yourself" and then ignore it. kill -9 send a KILL signal that should mean to most programs "oh this guy is serious and REALLY wants me to die" All but the rudest and impolite programs will die and some not very happily. I usually try the kill idnum first and then whip out the big -9. There is are a couple of man pages that speak of this take a look at: man 7 signal and man kill for starters HTH Bret ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: Help!!!! How to kill tar process
On Fri, 24 May 2002 17:56:50 -0400 (EDT) Jianping Zhu <[EMAIL PROTECTED]> wrote: > When I try to stop a process of backing up a files to tape drive by > using tar i always fails. > For example: > i use ps -aux . I got following process . > root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home > > when i tried to kill it by using kill 1484, but the process can not be > killed, I have to restart my redhat linux 7.1 sever. > It gives me too much trouble. > > Any suggestion will be greatly appreciated. > Try 'kill -9 ' This is equivalent to 'kill w/ extreme prejudice' ;) The downside, IIRC, is that it doesn't clean things up properly, it just kills the process cold. And there are some processes that even this won't touch, like errant NFS mount commands :( HTH, Monte -- All right, breaks over. Back on your heads!! ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Help!!!! How to kill tar process
When I try to stop a process of backing up a files to tape drive by using tar i always fails. For example: i use ps -aux . I got following process . root 1484 0.1 0.0 1788 612 tty1 D 17:07 0:01 tar xvzf /dev/sto /home when i tried to kill it by using kill 1484, but the process can not be killed, I have to restart my redhat linux 7.1 sever. It gives me too much trouble. Any suggestion will be greatly appreciated. Jianping Zhu Jianping Zhu Department of Computer Science Univerity of Georgia Athens, GA 30602 Tel 706 5423900 ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list