You are on page 1of 5

JConsole setup for remote Oracle Application server 10.1.3.

4
JVM monitoring

A lot of performance issues are seen as far as Oracle Application server instances are
concerned with.The performance issues might be because of various factors like
database,network,JVM etc.Troubleshooting Application level performance issues has got a
lot to do with tuning the JVMs used by Oracle Application server oc4j containers.A lot of
information about the JVMs like Heap size,Garbage Collection,memory usage,CPU usage etc
can be found out using the Jconsole client provided by Sun.
The below steps explain how to setup Jconsole client on local system in order to monitor
remote Oracle Application Server JVMs.The same setup can be used in order to monitor
Weblogic server JVM too.Though a lot of document regarding the setup can be found on the
internet none of those are as clear and precise like the steps mentioned below.The setup
has been tested by me and should work flawlessly for others.
1. Install JDK 6 kit on your local system. The installer is named jdk-6u20-windows-i586 and
can be downloaded from Sun site.
2. Install JDeveloper on your local system. The version should be 10.1.3.4. The JDeveloper
comes with some library files required for JConsole to function remotely.
3. Set the $ORACLE_HOME environment variable to directory path where JDeveloper is
installed. Set the JAVA_HOME to directory path where you have installed JDK 6.
D:\Software\jdevstudio10134\jdk\bin>echo %ORACLE_HOME%
D:\Software\jdevstudio10134
D:\Software\jdevstudio10134\jdk\bin>echo %JAVA_HOME%
D:\Software\jdevstudio10134\jdk
4. Login to Solaris server where Oracle Application Server 10.1.3.4 is installed server and
edit the opmn.xml file present in $ORACLE_HOME/opmn/conf. The modification is adding up
the start parameter -Dcom.sun.management.jmxremote=true to the oc4j container you
want to monitor.eg:
ias-component id="SOA_GROUP" status="enabled"
process-type id="oc4j_soa" module-id="OC4J" status="enabled"
module-data
category id="start-parameters">
data id="java-options" value="-value="-Dcom.sun.management.jmxremote=true
-server -d64 -XX:PermSize=512m -XX:MaxPermSize=512m -XX:SurvivorRatio
=12 -Xmn3584m -Xms5120M -Xmx5120M -Dstdstream.filesize=10
-Dstdstream.filenumber=10 -Doc4j.userThreads=true
-DHTTPClient.socket.staleCheck=true -Djava.securi
ty.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -

5.Restart the oc4j container for which you modified the start parameter using opmnctl
command.
6.On your local system(Windows) open the command prompt and check if the
ORACLE_HOME and JAVA_HOME env variables are set properly using echo command.Make
sure the JDK home/bin directory path is added to PATH.
7. On the local command prompt issue the following to start the Jconsole(Diagram shown
below):
jconsole -J-Dcom.sun.management.jmxremote.ssl=false -JDcom.sun.management.jmxremote.authenticate=true -JDjmx.remote.protocol.provider.pkgs=oracle.oc4j.admin.jmx.remote -JDjava.class.path=;%JAVA_HOME%\lib\jconsole.jar;%JAVA_HOME%\lib\tools.jar;
%ORACLE_HOME%\j2ee\home\lib\adminclient.jar;%ORACLE_HOME
%\j2ee\home\oc4jclient.jar

You would get the below Jconsole login screen.

Select Remote Process radio button and enter the following URL:
service:jmx:rmi:///opmn://(HOSTNAME):(REQUEST_PORT)/(CONTAINER_NAME)

(HOSTNAME):(REQUEST_PORT): can be obtained by issuing the following command on the


server where OAS is installed: opmnctl status port
(CONTAINER_NAME) is the container name for the container which you want to monitor eg
oc4j_soa
Eg: service:jmx:rmi:///opmn://mytestserver.soumya.com:34010/oc4j_soa
8. Click on connect and you should find the below screen:

Your remote setup for Jconsole is complete. Before trying to connect to the remote oc4j JVM
make sure the rmi ports are opened. You can test this by using telnet command on your
local desktop command prompt.

Eg: telnet mytestserver.soumya.com 12042


(12042 is the RMI port for oc4j_SOA container for my setup,please check yours using
opmnctl status -l command)

Your remote setup for Jconsole is complete.Compared to the local Jconsole setup(will
publish this setup soon) the remote setup is abit slow on performance.The client takes a bit
of time before it can show you all graphs.But once data is loaded from the remote server

the performance is good enough to monitor the remote JVM. One thing you can be sure
about this setup is that it wont affect the server performance in case of production
instances.Remote Jconsole setups are reccomended for prod setups.The local Jconsole
setups are reccomended for the dev instances.
Hoping we had a great learning.Please do write to me in case of issues.
Happy Learning !!!

Now you can folow us on facebook and post your comments/views and questions for expert
advise. Check this out facebook
Find us on facebook here
Regards,
Sanjay
Oracle Fusion Middleware Admin
Share on facebookShare on linkedinShare on twitterShare on emailMore Sharing Services0
Posted by Siddharth Mishra at 11:17 PM
Email ThisBlogThis!Share to TwitterShare to Facebook

Reactions:

6 comments:
1.
AnonymousMay 31, 2011 at 1:20 PM
Puo,
Nice Article. Do you have any notes/articles on understanding/analyzing the data shown
by JConsole?
Reply
2.
oliveJuly 14, 2011 at 3:56 PM
Soumya, Thank you very much..it is working for me.
Reply
3.
oliveJuly 19, 2011 at 2:21 PM

Hi,

today

tried

this

and

Jconsole

does

not

start..I

get

this

:Usage: jconsole [ -interval=n ] [ -notile ] [ -version ] [ pid | [connection ...


]]
-interval Set the update interval to n seconds (default is
-notile Do not tile windows initially (for two or more
-version
Print
program
pid

The

process

id

of

connection
=
host:port
||
JMX
host
A
remote
host
name
port The port number for the remote connection

target
URL
or

4 seconds)
connections)
version
process

(service:jmx:://...)
IP
address

Reply
4.
AnonymousAugust 3, 2012 at 5:18 PM
Nice
Ranjit

article

Reply
5.
singhAugust 18, 2012 at 9:29 AM
hi

every

one

is jconsole really used in prodution envirment


Reply
6.
lataAugust 18, 2012 at 9:32 AM
hi
can any one tell me in soa11g what kind of daily activity we do in prod and non prod...
plz answer this to me

You might also like