Operating System - HP-UX
1834569 Members
3794 Online
110069 Solutions
New Discussion

Re: can't kill the process

 
SOLVED
Go to solution
peterchu
Super Advisor

can't kill the process

The below user (test_usr) has just login , then the network was disconnected suddenly , so that the below login was held in the system ,

root 19832 19831 0 14:37 pts/44 00:00:00 login -- test_usr
test_usr 19839 19832 0 14:37 pts/44 00:00:00 -sh
root 9864 32487 0 15:39 pts/43 00:00:00 grep test_usr

the user login again and want to kill this dead process , but can't kill it , I am wonder why it report the process owner is not test_usr , could suggest what is wrong in my system ? thx


bash: kill: (19832) - Not owner
bash: kill: (19839) - Not owner
bash: kill: (19831) - Not owner
6 REPLIES 6
Bharat Katkar
Honored Contributor
Solution

Re: can't kill the process

HI,
Login as test_usr.

$ tty

$ ps -t

You will be able to kill all process listed with this command except specific processes which ignores certain Signals.

In your case:
$ kill -9 19839
This should work.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Bharat Katkar
Honored Contributor

Re: can't kill the process

Hi,
I think you have logged in as root and then did "su test_usr" and then you are trying to kill process owned by root which is not possible.

Regards,
You need to know a lot to actually know how little you know
peterchu
Super Advisor

Re: can't kill the process

the replies , the kill -9 is OK , but I don't prefer use -9 because it may make some database crash , in normal case kill -1 / -3 can kill the user owner processes , what is wrong in my system ?
Besides , I am not use su - test_usr to login , the user login with the password .

thx in advance.
Steven E. Protter
Exalted Contributor

Re: can't kill the process

If other forms of kill do not work, kill -9 or boot is called for.

Try shutting down the database prior to issuing the kill -9.

In this circumstance you are probably better off rebooting the server.

What is bash doing on an hp-9000 server.

If you by chance changed the root shell, change it back.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
G. Vrijhoeven
Honored Contributor

Re: can't kill the process

Hi,

Only the owner ( process) or root can kill processes. The kill -9 should only be used if the normal kills fail.
If a process is owned by an other user then the user who started it the executable is suid-ed. This changes the owner of the process to the owner of the executable. Check the executable
ll /usr/bin/login
-r-sr-xr-x 1 root bin 53248 Sep 13 2002 /usr/bin/login

Regards,

Gideon

Boyner
New Member

Re: can't kill the process

I am currently facing with the following problem;

Do you have any idea?

First I try only "kill"
ps -ef|grep 12697|grep -v grep
crpadm 12697 12674 0 Mar 24 ? 52:16 dw.sapCRP_D02 pf=/usr/sap/CRP/SYS/profile/CRP_D02_bynrap2
kill 12697

But it is still active;

ps -ef|grep 12697|grep -v grep
crpadm 12697 12674 0 Mar 24 ? 52:16 dw.sapCRP_D02 pf=/usr/sap/CRP/SYS/profile/CRP_D02_bynrap2

then I try kill -9 ;

kill -9 12697

But it is still active.
I couldnt kill it .

ps -ef|grep 12697|grep -v grep
crpadm 12697 12674 0 Mar 24 ? 52:16 dw.sapCRP_D02 pf=/usr/sap/CRP/SYS/profile/CRP_D02_bynrap2