1847115 Members
5932 Online
110263 Solutions
New Discussion

Re: Kill Process !

 
Ivan Azuara
Regular Advisor

Kill Process !

Hi !

I was monitoring my server, and note some process about one user, but when I tried to kill them (kill -9 pid), this processes continue in my system . The list of processes users are:

# ps -ef | grep afscmrg
afscmrg 26484 1 0 Jul 18 ? 0:00 -sh
afscmrg 9638 1 0 00:33:58 ? 0:00 -sh
afscmrg 9093 1 0 00:18:21 ? 0:00 -sh
afscmrg 18625 1 0 00:48:01 ? 0:00 -sh
afscmrg 9315 1 0 00:25:45 ? 0:00 -sh
afscmrg 1133 1 0 03:40:37 ? 0:00 -sh
afscmrg 29818 1 0 02:59:16 ? 0:00 -sh

How can I kill this processes ?, I think are zombies processes.


Thank's in advance !
"Enjoy the life .."
9 REPLIES 9
Bill McNAMARA_1
Honored Contributor

Re: Kill Process !

This is a pain in the but..

they are not zombies, they belong to init.. check out the PPID. So you can kill init!! or correctly exit the app.

you might trying to use fuser to close the open files they are using, then try to kill them. lsof from hpux.cs.utah.edu may help.

Later,
Bill

It works for me (tm)
someone_4
Honored Contributor

Re: Kill Process !

Hello,
To see your zombies use:

ps -ef | grep defunct

or

top

~ Richard
Jeff Schussele
Honored Contributor

Re: Kill Process !

Hi Ivan

Do a
ps -fu afscmrg
& see the listing. These appear to be shells & *should* be able to be killed with a
kill -4 PID
If that doesn't do it, then check out the parent PID (PPID) & kill it AFTER determining just what it is - DON'T kill PID 1
You should always only use -9 as a last resort - you can leave orphaned shared memory segments on the system that would need to be manually cleaned up.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: Kill Process !

If you don't see marked on the process then it's not a "zombie" process. In your case if you have tried with signals 15 and 9 and still couldn't kill it, it means these are hung processes or they have to be stopped in a different way since their parent process is "init".
V. V. Ravi Kumar_1
Respected Contributor

Re: Kill Process !

hi,

try this
kill -9 `ps -ef|grep afscmrg|awk '{print $2}'`

regds
Never Say No
Wodisch_1
Honored Contributor

Re: Kill Process !

Hi,

a process does only *die* (after being *kill*ed), when it gets CPU-time - but if it hangs (waiting for an I/O e.g.) then it will not "notice" that it has been killed - and hence not die :-(
That's what you are experiencing, I guess.
Try a "ps -el | grep afscmrg" and look at the column "WCHAN" (wait-channel) - do they all wait for the same wait-channel? (i.e. the same event).

HTH,
Wodisch
Eric Buckner
Regular Advisor

Re: Kill Process !

Also check the PRI column w/ the ps -el command. If these are >175 you won't be able to kill them no matter what because they are in the kernel and are protected. The only way to get rid of those is a reboot.

Eric
Time is not a test of the truth.
Ivan Azuara
Regular Advisor

Re: Kill Process !

I used the command that Wodish said. The result is :

# ps -lu afscmrg
F S UID PID PPID C PRI NI ADDR SZ WCHAN TT
Y TIME COMD
1 S 608 26484 1 0 156 20 6b991200 0 50cbed30 ?
0:00 sh
1 S 608 9638 1 0 156 20 7b2f6800 0 83a31630 ?
0:00 sh
1 S 608 9093 1 0 156 20 c7dd3700 0 52231230 ?
0:00 sh
1 S 608 18625 1 0 156 20 67f96500 0 550df130 ?
0:00 sh
1 S 608 9315 1 0 156 20 64f72700 0 8a275130 ?
0:00 sh
1 S 608 1133 1 0 156 20 4bb74900 0 d1734530 ?
0:00 sh
1 S 608 29818 1 0 156 20 51d4b700 0 62af7f30 ?
0:00 sh
1 S 608 28921 1 0 156 20 af1f0800 0 9e873430 ?
0:00 sh
i probed all suggestions that you mentioned in my case, but nothing. I think that processes disapear in the next reboot of the server.


Best Regards!
"Enjoy the life .."
A. Daniel King_1
Super Advisor

Re: Kill Process !

kill -11 PID

This tells the process to die with a core dump. This might help some. 'Orphan' processes (owned by pid 1), are often caused by people improperly exiting or terminating their sessions. Their parent dies, and, they attach themselves to init.
Command-Line Junkie