Operating System - HP-UX
1823198 Members
4092 Online
109648 Solutions
New Discussion юеВ

Not able to kill process JAVA.....

 
SOLVED
Go to solution
sreekanthtm
Trusted Contributor

Not able to kill process JAVA.....

My server performance is very bad.... while trouble shooting the issue I found that java process is using 366MB space, and the total memory usage of my server is crossing 97%.... I am not using any java relate apps in the server. I am trying to kill the process, but its not happening...
Does any one know how to stop/ kill the process...
12 REPLIES 12
OFC_EDM
Respected Contributor

Re: Not able to kill process JAVA.....

Which OS?
Which commands have you tried already?

Can you provide the output of ps -ef showing your process...ps -ef | grep

If you don't care about the java apps then a
kill -9 might work.

If you're having real problems with that. Find out the startup script which starts the java process. Move the script elsewhere in case you need it. Then restart the server.

But I'd be surprised if there wasn't something that relied on it. Considering it was launched.

Maybe try using "fuser" to find out who's using the process first.

Kevin
The Devil is in the detail.
Anshumali
Esteemed Contributor

Re: Not able to kill process JAVA.....

Sreekanth,

What OS you are using and what commands you have used for killing the PID, when you do a check after killing what is parent id displayed for this Java process/
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Shrikant Lavhate
Esteemed Contributor

Re: Not able to kill process JAVA.....

Hi,

>how to stop/ kill the process

#kill -9

You can get PID from ps output.

#ps -ef| grep -i

However I dont recommend to kill any process without prior knowledge of background for that process. In you case firse investigate about java process running and then only proceed to kill.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Jeeshan
Honored Contributor

Re: Not able to kill process JAVA.....

its simple

#kill
a warrior never quits
sreekanthtm
Trusted Contributor

Re: Not able to kill process JAVA.....

OS -- B.11.23 U ia64
I tried kill , then Kill -9 ....Both were not working...
Then I killed the PPID using kill -9 . Now the PPID become 1 (init).

Java is still running...
Anshumali
Esteemed Contributor

Re: Not able to kill process JAVA.....

PPID=1... prepare for restart if getting rid is mandatory for you.
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
sreekanthtm
Trusted Contributor

Re: Not able to kill process JAVA.....

OK...........
I will reboot the server... But after that How can I make sure that the java process will not start at startup...
Shrikant Lavhate
Esteemed Contributor

Re: Not able to kill process JAVA.....

Before restart as suggested by Kevin make a dig in statup scripts and make necessary moving of scripts related to java.
After reboot also make sure process is not running in ps.
Will it remain a personal, if I broadcast it here!
sreekanthtm
Trusted Contributor

Re: Not able to kill process JAVA.....

How to disable java i startup?
Which r the java related startup scripts...
OFC_EDM
Respected Contributor

Re: Not able to kill process JAVA.....

You could go at this at a different angle.

Look for the java binaries in /opt (most likely there I think). Move them elsewhere or rename them.

Then restart your server.

Look at the rc.log to see what failed at startup. From that you can look at which files in the rc.0 rc.2 etc folders need to be taken out.

Might be some argument here that it could hang your server at startup though.

An easier method would be to find out the Java executable name.

Then do a find mixed with a grep on all startup files.

find / -exec grep "java" {} /;
Modify to suit your needs.


The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: Not able to kill process JAVA.....

Or maybe uninstalling java from the system is a better option? using swremove.

Anyone know of any reasons this may be a bad idea? I can't recall if there's anything critically dependent on java.
The Devil is in the detail.
Dennis Handly
Acclaimed Contributor
Solution

Re: Not able to kill process JAVA.....

>while trouble shooting the issue I found that java process is using 366MB space

If you can't kill it with kill -9, you'll have to add more swap space or reboot. It isn't using any CPU.

Next time it happens, make sure you get the whole process tree with:
UNIX95=1 ps -Hef -x

>How can I make sure that the java process will not start at startup...

It may be very infrequent or a fluke such that you can live with it.