Using JConsole to monitor Apps 11i JVMs

Whenever you are planning to upgrade components in your E-biz 11i environment, you shouldn't forget to review the Technology Stack components as well as the Applications 11i code.


There are some compelling technology benefits justifying the upgrade of your Apps Middle Tiers to JDK version 1.5, but the best reason for me is the JConsole GUI monitoring tool, which I think is really cool


 JConsole_heap:


For a better description of JConsole and its capabilities you can review this Sun article, but in summary provides a lightweight, always-on monitoring capability for your JVMs.  Using JConsole, you can view graphically the Heap usage, Threads, classes and other statistics in real time, which gives you a great idea of activity inside the JVM process, delivered in an easily digestible form.   I can happily sit and watch my JVMs chug away for hours using JConsole, and is more fun than watching TV!


 JConsole_threads:


JConsole with Apps Release 11i

You can run JConsole either locally (from the server that you are monitoring) or remotely via a network connection.   With Apps 11i, the safest and easier option is to run locally.   


Whether running local or remote,  you need to add the following lines to your jserv.properties file.  You should make this change following "Customizing an AutoConfig Environment" (Metalink note 270519.1) to ensure AutoConfig does not drop these custom settings.

wrapper.bin.parameters=-Dcom.sun.management.jmxremote
wrapper.bin.parameters=-Dcom.sun.management.jmxremote.ssl=false
 


** NOTE - you may wish to use SSL for better security



(I have raised enhancement request 5459173 to provide these parameters out of the box for the Apps 11i AutoConfig templates)


Connecting Locally


Once you have started your JVMs using the new parameters described above, you simply launch JConsole as the same operating system user, which presents you with a list of all the JVM Processes for you to connect to and monitor.


Connecting Remotely
Running JConsole remotely is a little more complex and certainly not so secure... meaning it may introduce unacceptable risk for a production environment.    Firstly, authentication is enabled by default so you will either need to configure your username/passwords or could choose to defeat authentication entirely by using the jserv.properties value below.  The following change allows ANYONE to attach to your JVM processes so should not be used lightly ! 


wrapper.bin.parameters=-Dcom.sun.management.jmxremote.authenticate=false


The second issue to overcome is that each JVM needs its own TCP port to accept connections.   One possible approach is to customize the $IAS_ORACLE_HOME/Apache/Apache/bin/java.sh JVM startup script and provide a port number range from which you allocate a tcp port number.   The sample script modification below is not perfect (as it doesn't resolve port number clashes) but may give you some ideas as to how you could overcome this issue in your own environment. 


Add this modification just before the existing line

 exec $JSERVJAVA $JAVA_ADDITIONAL_ARGS $ARGV 1>> $STDOUTLOG 2>> $STDERRLOG


####  start of modification for JConsole remote monitoring
####  Not supported or recommended by Oracle Corporation
####
####  If there is a clash of port numbers calculated, then
####  the JVM will not startup.  Script therefore needs to be
####  improved to check port not already in use
####
####  Use port number range 9600 - 9650 as an illustration
if [ "$JDK_VERSION" = "1.5" ] ; then

 mJMXPORTMIN=9600
 mJXMPORTMAX=9650
 mNUMPORTS=`expr ${mJXMPORTMAX} - ${mJMXPORTMIN}`
 mRANDOM=$(((($RANDOM*${mNUMPORTS})/32767)+1))
 mJMXPORT=`expr ${mRANDOM} + ${mJMXPORTMIN}`
 JAVA_ADDITIONAL_ARGS=" -DCLIENT_PROCESSID=$$  -Dcom.sun.management.jmxremote.port=${mJMXPORT}"
fi
####  end of modification


After starting your JVMs you then need to identify the TCP port they are listening on.   You can do this using the following command:


netstat -a | grep tcp | grep 96



You can then startup JConsole from your PC (or any other machine) and using the "Remote" tab you enter the machine name and port you wish to connect to and also the username/password if appropriate.  You then get the same monitoring capabilities as if you had connected locally.


Conclusion

The real time graphical monitoring provided by JConsole, along with its ease of implementation and use, provides a useful tool to help you understand the way your JVMs are being utilised.  This knowledge can then be used to tune and troubleshoot your Apps 11i environments.


Comments:

This is nice....however are there any tools for monitoring the JVM without asking the customer to upgrade to JDK1.5? Any references will be appreciated. Thanks!

Posted by Nitin on August 14, 2006 at 04:51 PM PDT #

This is great. instanses with 2 nodes (configurator for e.g) , do we need to make changes in jserv.proepties in both the nodes.

Will this also work when multiple jvms are configured?

Thanks

Posted by Rajagopalan Raghuraman on August 15, 2006 at 12:20 AM PDT #

Steven,

Somewhere on sun site its talking about j2se 5.0 & at other's its jdk 1.5, Are these two same ?

I suppose another big thing we need to do is to configure E-Business suite to use j2se 5 using Metalink Note # 304099.1

Atul Kumar
http://teachmeoracle.com

Posted by Atul Kumar on August 15, 2006 at 02:31 AM PDT #

Atul,

I tend to use the terms J2SE 5.0 and JDK 1.5 interchangeably as they mean the same thing, although it is officially known as "J2SE 5.0". Sun explain the versioning terminology on thier site at http://java.sun.com/j2se/j2se-namechange.html

Oracle Metalink note 300482.1 "Overview of Using Java with Oracle E-Business Suite Release 11i" is the best reference document to check when upgrading Java with Apps 11i. Along with other information, this note then links to note 304099.1 "Using J2SE Version 5.0 with Oracle E-Business Suite 11i, Release 11.5.10"

Posted by Mike Shaw on August 15, 2006 at 07:34 PM PDT #

Hi Rajagopalan

Yes, if you have two seperate instances of iAs installed on one node, then you will need to change the jserv.properties for both instances

Also, the steps listed in this article do allow monitoring of multiple JVM, for example when connecting from JConsole locally, you will be presented with a list of the available JVM

Hope that clarifies things for you,

Mike

Posted by Mike Shaw on August 16, 2006 at 12:29 AM PDT #

Nitin,

I didn't talk in this article about the benefits of JDK 5.0 over previous versions, but would certainly hope all customers would seriously consider this as part of any maintenance upgrade to achieve these technical benefits, which obviously include the improved monitoring facilities offered by JConsole discussed here, but also additional benefits.

To respond to your speific question, there are tools available for JDK 1.4 but are not so as fully integrated, powerful or easy to use. You can search for tools like visualgc or jvmstat on the Sun web site which do offer some additional monitoring facilities. For example http://java.sun.com/performance/jvmstat/

Hope this helps

Posted by Mike Shaw on August 16, 2006 at 04:04 AM PDT #

Hi,
Unfortunately, THE PRINTER DIALOG BOX DOESN'T APPEAR AFTER SWITCHED TO SUN JRE 1.5.0_??

Note:-737777.1 suggested to move from 1.5.0_12 to 1.6.0_6 not for 1.5.0_13.

I would recommend to move forward the JRE & JDK 1.5.0.x to 1.6.0.6+ as per metalink note:- 401561.1

Warm Regards,
- Aru

Posted by Aru Kayaroganam on November 02, 2008 at 08:40 PM PST #

Greetings,

Is there similar document available for R12 to monitor JVM usage?

I have shared application; and not finding the configuration files in R12.

Thanks,
Ajay

Posted by Ajay Amberkar on June 03, 2009 at 04:44 AM PDT #

Hello Ajay,

The good news is that with Rel 12 (and with recent versions of R11i) there is no special steps you need to take to enable JConsole, as the configuration files are seeded with the necessary parameters to use Jconsole in local mode

i.e. in R11i or R12 you just need to :-

1. Login as eBiz operating system user ("applmgr" for example) and ensure your environment is set correctly

2. jconsole is a GUI tool so you need to make sure you have a graphical environment available and DISPLAY is pointing to the correct host/port

3. Run "jconsole"

4. Thats it ! Once jconsole has launched you will be presented with a list of local JVM to choose from. This list should correspond to however many OACore JVMs you have configured on that server (it picks up ALL OACore JVMs across multiple instances if running)

Hope this helps

Mike

Posted by Mike Shaw on June 03, 2009 at 04:18 PM PDT #

Hi,
Sorry to bump an old thread, but I just came across it :)
Just wondering, I am running ebs r12.0.4 and when i launch jconsole, as applmgr user, I do not have the local tab. I only have Remote and Advanced. Any idea why?

Thank you,
Felix

Posted by felix on November 24, 2010 at 03:06 AM PST #

Hi, Felix,

No idea, I'm afraid. You might wish to log an SR against the Sun team to get some informed assistance with this one.

Regards,
Steven

Posted by Steven Chan on November 24, 2010 at 04:10 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
4
5
6
7
8
9
10
11
12
13
14
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today