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

Reply via email to