Friday, September 24, 2010

Oracle Enterprise Manager 11g JVM Diagnostics (AD4J)

Started with name JAM (Java Activity Monitoring), renamed as JADE (Java Application Diagnostic Expert), later named as AD4J (Application Diagnostics For Java) and now it's known as JVM Diagnostics.

Oracle's JVM Diagnostics improves the availability, performance and provides in-depth diagnostics for Java applications with low overhead. This comes with Oracle Enterprise Manager Grid Control 11g. Following are the highlights of this feature:
  • Agent is easy to deploy and no application server restart is required
  • Immediate visibility into JVM and its stack. No application instrumentation required is to provide in-depth method level visibility into all active transactions happening in JVM.
  • Identifies the slowest requests, slowest methods, Database states, SQLs and the bottleneck resources such as CPU, I/O, memory, slow running or hanging threads and Database.
  • Detects memory leaks and allows administrators to perform memory leak analysis in production environment without stopping the application. Administrators can take multiple heap snapshots over a period of time and compare them to find the Java objects leaking memory.
  • It allows tracing Java requests to the associated database sessions. It highlights the slowest SQL queries and help administrators to tune SQL and the database to improve the performance application. It facilitates smooth communication between the database administrators and application administrators by isolating the problems to the database or Java code.
It can be downloaded from http://www.oracle.com/technetwork/oem/grid-control/downloads/index.html

5 comments:

Anonymous said...

highly technical blog by a great techy of oracle

Anonymous said...

Hi Neelima,
thanks for the article.
We're trying to run JVM Diagnostics on our OEM Grid Control 11g, but since we have a 64 bit JVM, it's not working. Oracle's website gives this advice:

To resolve this issue, you must change the value of the JAVA_VM variable as follows:

1.Open the /bin/startWeblogic.sh file.

2.Change value of JAVA_VM environment variable to -d32.

3.Run the jammanager.ear file again to deploy JVM Diagnostics Manager.



But our startWebLogic.sh's content is:

# START WEBLOGIC

echo "starting weblogic with Java version:"

${JAVA_HOME}/bin/java ${JAVA_VM} -version

if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi


where/who do we make the change to -d32 in this file? Or do we do it in the setDomainenv.sh file?
Any help would be appreciated.
thanks

-Steve

Neelima Bawa said...

Hi Steve,
Remember startWebLogic.sh is a common script used by all weblogic servers in weblogic domain. To pick the 32 bit jdk on 64 bit machine, you have two options:
1. if jdk supports both 32 bit as well 64 bit mode, then you can modify startWeblogic.sh script. It will require little bit scripting where you need to ensure that you set JAVA_VM parameter to "-d32" only for EMAD4JMANAGER or whatever name you have kept for ad4j manager. or
2. Second option is to download that 32 bit jdk that can run on 64 bit platform. In this case, you need to modify the JAVA_HOME to point to 32 bit jdk and set it for appropriate ad4j manager Managed Server only.

Thanks
neelima.

Anonymous said...

Hi Neelima,
thanks

which option would you recommend? Could you provide a sample of how the modified script would look like? (btw, our managed server is named EMAD4JMANAGER).
thanks

-Steve

Neelima Bawa said...

It depends on what OS and what jdk you have. If you have jdk that supports both 32 bit as well as 64 bit then you can use -d32 option. Code will look like:
----------------------
if [ "${SERVER_NAME}" = "EMAD4JMANAGER" ] ; then
JAVA_VM="${JAVA_VM} -d32 "
export JAVA_VM
fi
----------------------
But if you have some other platform then you need to download 32 bit jdk on 64 bit platform.