Weblogic, JVM and EAR

I am planning to do a bunch of heap using jmap jdk1.5 on a production weblog instance (10).

There are actually 3 EARs (maybe more, really don't know I don't have access) deployed in this weblog.

Someone told me that "weblogic creates a JVM for each EAR" Can someone confirm this?

With jmap, I need the jvm pid parameter as a parameter to dump the heap ... Since I have 3 EARs, I think I have 3 pids, so I am wondering how to find out which pid corresponds to that JVM EAR?

+2


a source to share


2 answers


No - every Weblogic server (or any Java process) runs its own JVM with its own PID in it. This way, all of your EARs will appear on the same heap.



If multiple instances of Weblogic server are installed on the same computer, each of them will have a separate PID and a separate process

+7


a source


As @josek reports, you will have one JVM for each WebLogic server, so if all your EARs are under the same WebLogic server, you only have one pid to reset. But you could still have multiple servers - maybe an admin server and a managed server, maybe other unrelated instances, so if you just do something like ps -ef | grep java

(I'm assuming it's on Unix?) You might see tons of messages even though you can filter it in your WebLogic JDK_HOME.

One way to determine which pid belongs to a particular server is to go to the directory <domains>/servers/<your server>/tmp

and run fuser -f <your server>.lok

. This list will list all the processes associated with this server, one of which will be the java JVM process. (Maybe others for JDBC, etc.) One way to find only the java process (and I'm sure someone will point out another, better way!) Is something like:



cd <domains>/servers/<your server>/tmp
ps -p "`fuser -f <your server>.lok 2>/dev/null`" | grep java 

      

If each EAR is on its own server, I think you'll have to look at the config.xml file to see what you need.

+4


a source







All Articles