JADE / AD4J – Application Diagnostics for Java : Architecture / Installation and Configuration

AD4J – Application Diagnostics for Java
JADE – Java Application Diagnostics Expert

Application Diagnostics for Java (AD4J aka JADE – Java Application Diagnostics Expert) is lightweight application to diagnose performance issues in Java Applications (including Database Tier)

.

AD4J Architecture

1. AD4J Console : is web based console to setup/monitor performance of Java Virtual Machine (JVM) including Database.

AD4J Console listen on two ports
a)
3500 (80 for Windows) for requests from end user/Administrator
b) 3600 for requests from Agents (JVM Agent & DB Agent)

ad4j console

.

2. AD4J Repository : is database (Oracle or Postgres) to store JVM state.  Postgres is default database for Console on windows

3. Agents : two type of Agents AD4J JVM Agent and AD4J DB Agent which collects JVM or Database state and pass on to Console to store it in Repository.
You need to install/configure 1 JVM agent per JVM and 1 DB Agent per Database.

.

Things good to know about AD4J

1. Default HTTP port for client requests is 3500 (Unix) or 80 (windows)
2. Default console login credentials is admin/welcome
3. Default repository database with windows is Postgres
4.
AD4j Console is available on both Windows and Unix platform
5. For Solaris use bash or ksh shell while running configure.sh

.

Install Application Diagnostics for Java (AD4J)

1. Download and unzip software (jamserv-<os>.zip) from here

2. Configure AD4J  by running configure.sh (Unix) or by double click on jamserv-win.exe (windows)

configure.sh $JDK_LOCATION 

3. Start console by running jamserv/bin/apachectl start  (jamserv is directory created after unzipping jamserv-<os>.zip) – This step is NOT required on windows.

If you can’t access console page as given in point 4 below then start Jserv using jamserv/bin/jservctl start

For steps on installing AD4J Console on Unix click here 
For steps on installing AD4J Console on Windows click here 

4. Access console and configure repository for AD4J consoleThis step is NOT required on windows

Access console using URL http://[servername]:3500 (Unix)  orhttp://[servername] (Windows)

Setup -> click on link adminDB.properties

I created repository database user jamuser in database FUSION

SQL> create user jamuser identified by jamuser;
SQL> grant connect, resource to jamuser;

.

5. Download Agents for JVM & Database

a)Download JVM agents (available as war, ear or zip) for JVM’s you are planning to monitor  Setup -> Download Agent

b) Download Database agents (specific to O.S. of your database) for Database you are planning to monitor  Setup -> Download Agent

.

 6. Install JVM Agents –
Use Application Server specific steps to deploy Agent on JVM you wish to monitor check here

7. Install Database Agents using Setup -> Database -> Register New DB ;  more information  here

Now you are ready to monitor your Database and Application Server (JVM – Java Virtual Machine)

Next step – Run load tests using software like LoadRunner against your Key transactions and analyze

a) JVM Activity – CPU, OSR, Locks, Threads, DB wait time , Heap Usage, Garbage Collection….
b) Database Activity – Locks, top SQL, I/O wait …..

.

Refarences

Share This Post with Your Friends over Social Media!

About the Author Atul Kumar

Oracle ACE, Author, Speaker and Founder of K21 Technologies & K21 Academy : Specialising in Design, Implement, and Trainings.

follow me on:

Leave a Comment:

7 comments
Paul says September 21, 2009

Hi Atul,

I have a question which is not related to this topic. How can you find out if the listener is running or not in 806 home for 11i?

Reply
Atul Kumar says September 21, 2009

@ Paul,
To find listener status in 11i

1. Login as application tier O.S. user
2. Set environment variable
3. Identify listener name $TNS_ADMIN/listener.ora (usually APPS_$SID so for SID vis11i listener name APPS_vis11i)

4. lsnrctl status $LISTENER_NAME like

lsnrctl status APPS_vis11i

LSNRCTL for Linux: Version 8.0.6.3.0 – Production on 21-SEP-2009 22:10:59

(c) Copyright 1999 Oracle Corporation. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=focusthreaderp)(Port=1637))
STATUS of the LISTENER
————————
Alias APPS_vis11i
Version TNSLSNR for Linux: Version 8.0.6.3.0 – Production
Start Date 21-SEP-2009 19:50:25
Uptime 0 days 2 hr. 20 min. 33 sec
Trace Level off
Security OFF
SNMP OFF
Listener Log File /oracle/apps/11i/vis11i/vis11iora/8.0.6/network/admin/apps_vis11i.log
Services Summary…
FNDFS has 1 service handler(s)
FNDSM has 1 service handler(s)
The command completed successfully

—–

Above output indicates that apps listener is up and running from 2 hours 20 minutes

Reply
Rajan says September 24, 2009

Atul,

I am trying to configure AD4J for R12.

But to install JVM Agent in the Oracle Application Server of R12, how can we do that?

The link you provided suggested to login in as ias_admin. But in 10.1.3.4 ( the application server version I am using ) of R12, we don’t have ias_admin. Correct?

Do we overwrite the opmn.xml to accomadate this jamagent? Then every Autoconfig run would overwrite it unless we overwrite the templates

Any ideas would be appreciated.

Reply
Atul Kumar says September 24, 2009

@ Rajan,
As R12 is using 10gR3 so you can use application server control shipped with 10gR3 in R12 to deploy jamagent.war file into OC4J of R12

By default enterprise manager console /ascontrol is disabled in R12 so first enable it then login as oc4jadmin user

1. Change $INST_TOP/ora/10.1.3/Apache/Apache/conf/trusted.conf file and change

[Location ~ “/ascontrol”]
Order deny,allow
Deny from all
Allow from localhost
[/Location]

to

[Location ~ “/ascontrol”]
Order deny,allow
Allow from all
[/Location]

2. Restart Apache

adapcctl.sh stop

adapcctl.sh start

3. Access it via

http://server:port/ascontrol

oc4jadmin/password_4_oc4jadmin

If you are not sure about password then you can reset it .

Check these steps here http://onlineappsdba.com/index.php/2008/06/03/changereset-oc4jadmin-password/

steps mentioned in this post are for standalone 10gR3 , configuration files are same but under INST_TOP in R12 . Let me know if you need post on how to reset oc4jadmin password in r12

Reply
Paul says September 28, 2009

Atul,
Very good article. Good information. Thanks for your efforts & time. keep it up.

Reply
Vinicius says May 24, 2011

Hi Paul,

Please help me, how to purge the AD4J? what are the tables?

Rregards,

Reply
Atul Kumar says May 25, 2011

@ Vinicius,
Check table JAM_THREAD_SAMPLES

select jam_pool_samples.POOL_NAME,
min(to_char(sample_date, ‘yy-mm-dd hh24:mi:ss’)),
max(to_char(sample_date, ‘yy-mm-dd hh24:mi:ss’))
from JAM_THREAD_SAMPLES,jam_pool_samples
where JAM_THREAD_SAMPLES.SAMPLE_NO = jam_pool_samples.SAMPLE_NO
and JAM_THREAD_SAMPLES.POOL_NAME = jam_pool_samples.POOL_NAME
group by jam_pool_samples.POOL_NAME
/

select segment_name, segment_type, sum(bytes)/1048576 mb
from user_extents where segment_name like ‘JAM%’
group by segment_name, segment_type
/

select table_name, num_rows, blocks, last_analyzed
from user_tables where table_name like ‘JAM%’

Reply
Add Your Reply