Monday, September 27, 2010

Oracle EM11g JVM Diagnostics (AD4J), associating JVM Diagnostics data with EM target

Note: These instructions are valid only for EMGC 11g release

Manual deployment of jamagent on a JVM(an app server) is very straight forward like in previous releases, user can download the jamagent.war and deploy it on target JVM or application server.

In EMGC11g, if user has a scenario where user wants to deploy jamagent on already discovered Weblogic EM target and associate JVM Diagnostics with this target but due to security restriction or any other reason user cannot use the automated deployment feature of JVM Diagnostics.

In such cases, one can execute given steps:
a. Create a JVM Pool of same name as that of WLS domain target name except that every '/' should be replaced by '__' (two underscores).
o e.g. if WLS domain Target name is "/sample_EMGC_DOMAIN/EMGC_DOMAIN"
o JVM Pool name will become " __sample_EMGC_DOMAIN__EMGC_DOMAIN"
o Select "Poll enabled" checkbox, if you want to start monitoring for this pool

b. Download jamagent.war from Targets->Middleware->JVM Diagnostics->Setup->Download Page
o In WEB-INF/web.xml of jamagent.war, value of the following 3 tags needs to be updated and then jamagent.war has to be bundled again.
o oracle.ad4j.groupidprop –The name of EM WLS target on which deployment has to be done. This is shown on Ad4j agent Deployment page under column “Target Name
o oracle.ad4j.jvmidprop - The type of EM WLS target on which deployment has to be done. This is shown on Ad4j Deployment page under column “Target Type”. Currently the supported value is always “weblogic_j2eeserver
o jampool – The name of the domain for which we are doing deployment. It can be found on the deployment page after text “List of targets under domain name”. But "/" replaced by "__" (forward slash replaced by double underscore)
Deploy re-bundled jamagent.war on Target WLS manually.

c. Goto Target-> Middleware Page, select the WebLogic Domain/WebLogic Server Target Menu->JVM Diagnostics menu items. You should be able to view JVM Diagnostics data for these targets now.


Harish Kumar said...

Thanks for sharing this informaiton, we have 20 weblogic server in a weblogic domain so would i need to rebundle jamagent.war file for each managed server after changing the web.xml such as WLS target name. Would really appreciate your advise on this. Can I add all WLS target in the web.xml rather than editing this file for each weblogic server target.

Neelima Bawa said...

That cannot be done as of now. One jamagent.war can be deployed on one target and to have the association between jvm and WLS target, entry has to be made in web.xml.

Harish Kumar said...

Thanks, I have another question wrt jamagent, I have deployed jamagent on WLS targets and from WLS console I can see that ad4j agent is active and OK but still when I navigate to JVM Diagnostic > Summary or event JVM Diagnostic > Threads > Real Time Analysis, it does not show any data. Ad4J manager is also up and running and there is a JVM pool for WLS target and monitoring is also started. Can you shed some light on this. I can see lots of useful topics on your forum and a detailed debugging to troubleshoot these sort of situation will really help your blog visitors and me of course.


Neelima Bawa said...

Most likely, in your case, JVM doesn't have much activity happening in it. Hence no data in Real Time Thread Analysis page. You can confirm that by unchecking the 'Show Active Threads only' checkbox on JVM Diagnostic > Threads > Real Time Analysis page.

kb said...

Can AD4J can be used to map a url to a package or stored procedure in the database that support url functionlity Also does it support TC server

Neelima Bawa said...

To my knowledge, ad4j does not support mapping to package or stored procedure.

ad4j works only with Oracle Database, no other database.