1833780 Members
2083 Online
110063 Solutions
New Discussion

Killing "?" process

 
Victor Wang
Occasional Contributor

Killing "?" process

Hi,
I did a "ps -ef|grep java" and noticed there are several java processes. I tried killing these processes but failed to do so.

May I know what processes are these that are having "?". How do I kill such processes?

This is a HP11 with dual processors.

Could anyone help me with this problem?

hp20> ps -ef|grep java
root 18302 18264 0 Feb 6 ? 0:00 /usr/bin/hp700_ux_11.00/pkgs/java/1.4.0.

root 17612 1 0 Feb 6 ? 0:00 /usr/bin/hp700_ux_11.00/pkgs/java/1.4.0.

etooi 29870 1 0 Feb 9 ? 0:00 /usr/bin/hp700_ux_11.00/pkgs/java/1.4.0.

root 21070 1 0 Feb 6 ? 0:00 /usr/bin/hp700_ux_11.00/pkgs/java/1.4.0.

Thanks
6 REPLIES 6
steven Burgess_2
Honored Contributor

Re: Killing "?" process

Hi

The ? field you are querying is valid. If the process has a controlling terminal such as a ksh (shell) process then you will see ttyp (terminal id) etc. In this case the java process does not have a controlling terminal (started in the background, or a daemon etc)

To kill the processes use the pid (process id's in the 2nd column. The parent of these processes (3rd column) is init. You don't want to kill him

ie

kill 18302

HTH

Steve
take your time and think things through
Michael Schulte zur Sur
Honored Contributor

Re: Killing "?" process

Hi,

why do you want to kill these jobs in the first place and what happens if you use:
kill -9 18302
?

Michael
Sridhar Bhaskarla
Honored Contributor

Re: Killing "?" process

Hi,

Are you having trouble killing these processes?. As mentioned already, these processes are not associated with any terminal which means they were started in the background. You can try the following to duplicate this behaviour

$nohup sleep 30&
$exit

Login again

$ps -ef |grep sleep

You should see the sleep process with "?" in it's tty column

$kill

Should kill it

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Killing "?" process

The script I'm attaching is capbable of killing question mark processes.

It won't look for root processes for obvious reasons. See attachment.

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
Laurent Menase
Honored Contributor

Re: Killing "?" process

Hi, this looks like a problem on which we are working on.
You should take a TOC of your system, and open a call to HP support.

Elmar P. Kolkman
Honored Contributor

Re: Killing "?" process

To get more information on where these processes come from, check out the parentprocesses not being 1. In this case, the first line has a parent with process ID 18264. You can check what that is with 'ps -fp 18264

This can give you some insight on where they come from, and so help you prevent them from getting started in the first place if you really don't need them, though some configuration tools on HP-UX are already in Java, like the veritas volume manager, so they could be perfectly legal. And it could also be those java processes are started by your website...
Every problem has at least one solution. Only some solutions are harder to find.