JConsole Plug-in Wrapper Tab


An optional VisualVM plug-in exists that allows you to add any custom tabs that you might have created for the Java platform, Standard Edition (Java SE) monitoring and management console, JConsole, to VisualVM. Any plug-ins that you built for JConsole can easily be added to VisualVM using the optional JConsole plug-in wrapper tab.

Note: For details of how to create custom tab plug-ins for JConsole, see Creating Custom Tabs in the Java SE platform Monitoring and Management Guide. However, if you are using VisualVM without ever having created custom tabs for JConsole, you should create your custom plug-ins directly for VisualVM. See Getting Started Extending VisualVM and VisualVM API FAQs for more information about creating VisualVM plug-ins.

Adding the JConsole Plug-In Wrapper Tab

To add the JConsole plug-in wrapper tab to VisualVM, take the following steps:

  1. Select 'Tools' then 'Plugins' in the VisualVM drop-down menus. You will see the following window.

    Adding the JConsole plug-ins wrapper tab

  2. Check 'VisualVM-JConsole' and click 'Install'.
  3. Step through the on-screen instructions.
  4. Now, if you highlight a running Java application, right-click, and then select 'Open', you will see the JConsole Plugins tab in VisualVM's right-hand window. However, no JConsole plug-ins are displayed in the tab yet, as shown below.

    JConsole plug-in wrapper tab.

  5. You can now import your custom JConsole plug-ins via the Tools | Options menu.
  6. Click on 'JConsole Plugins'.
  7. Click on 'Add JAR/Folder' and navigate to your JConsole plug-in's Java archive (JAR) file. An example JConsole plug-in called JTop is provided with the Java SE 6 platform. The JTop application is a JDK demonstration that shows the CPU usage of all threads running in the application. This demo is useful for identifying threads that have high CPU consumption, and it has been updated to be used as a JConsole plug-in as well as a standalone GUI. The JAR file for the JTop plug-in is found at JDK_HOME/demo/management/JTop/JTop.jar, where JDK_HOME is the location where the JDK software is installed.

    Selecting the JConsole plug-in.

  8. In the JConsole Plugins Options panel, you can also set the polling period. This option defines the regularity with which the JConsole Plugins tab will update the information presented by the different JConsole plug-ins that have been imported into the tab.
  9. Close the Options panel by clicking OK.
  10. In VisualVM's right-hand panel, close the tab of the process being monitored.
  11. Restart the monitoring of the process by right-clicking on the process in the left-hand panel and selecting Open. A JTop tab should now be visible in the JConsole Plugins tab.

    The JConsole plugin tab, showing the JTop plug-in.

    The JTop tab has been added, showing the CPU usage of the various threads running.


Return to the VisualVM Documentation index

Terms of Use; Privacy Policy; Copyright ©2013-2014 (revision 20131025.e7cbc9d)
 
 
Close
loading
Please Confirm
Close