Monitoring OUD with VisualVM

Guest Author

VisualVM is a visual tool integrating several commandline JDK tools and
lightweight profiling capabilities. Designed for both production and
development time use, it further enhances the capability of monitoring
and performance analysis for the Java SE platform.

Here are the steps to use VisualVM to monitor Oracle Unified Directory: 

#1 Download the latest release of VisualVM from http://visualvm.java.net/

#2 Enable the MBeans plugin as described in  http://visualvm.java.net/mbeans_tab.html to take advantage of the statistics exposed by OUD

#3 Enable JMX on OUD

  1. Start the server.

  2. Enable the JMX Connection Handler and set the port number to be used with JMX.

    Choose a port that is not in use and to which the user that is running the server has access rights.

    $ dsconfig -h localhost -p 4444 -D "cn=directory manager" -j pwd-file -X -n \
    set-connection-handler-prop --handler-name "JMX Connection Handler" \
    --set enabled:true --set listen-port:1689
  3. Add the JMX read, write, and notify privileges to the root DN.

    $ dsconfig -h localhost -p 4444 -D "cn=directory manager" -j pwd-file -X -n \
    set-root-dn-prop \
    --add default-root-privilege-name:jmx-read \
    --add default-root-privilege-name:jmx-write \
    --add default-root-privilege-name:jmx-notify
  4. Restart the server.

#4 Connect to OUD from VisualVM

To connect VisualVMto a server instance, click on File/Add JMX Connection. The following fields are required:

  • JMX URL:


    • host is a host name, an IPv4 numeric host address, or an IPv6 numeric address enclosed in square brackets.

    • port is the decimal port number of the JMX connector.

    The default JMX URL is:


  • User Name. A valid LDAP user name.

    The default Directory Manager user name is cn=Directory Manager.

  • Password. The user's LDAP password.

#5 Browse MBeans attributes

Go to the right panel then select the MBean tab and navigate in the MBean tree. You can get access to the OUD config, monitoring information & statistics and all the convenient java metrics.

Note: You can plot those JMX numeric values in VisualVM that appear in bold. To do so, double-clicking on numeric
attribute values will display a chart that plots changes in that numeric

Join the discussion

Comments ( 1 )
  • guest Monday, November 5, 2012

    Thank you very much for posting these instructions. They worked great for me and it is great to see what is going on with OpenDS along side my application.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.