How to Set Up JMX in eiPlatform for VisualVM Profiling
This article describes how to use VisualVM to connect to a running instance of the eiPlatform in order to monitor its runtime CPU, heap, classes, and threads for profiling purposes.
Pre-requisites
- eiPlatform running as a Windows Service
- Java JDK version 8 or later
- VisualVM
Configure eiPlatform
Locate the “eiPlatform Service.vmoptions” file in the eiPlatform install directory and add the following lines:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Start the eiPlatform service, or if it is already running restart to pickup the configuration changes.
Install and Configure VisualVM
Download VisualVM from https://visualvm.github.io/download.html and follow the directions to install it.
Start the VisualVM executable (visualvm.exe)
From the File menu, select “Add JMX Connection”
Set “Connection” to “localhost:9090”
Set “Display name” to “localhost-eiPlatform:9090”
Check “Do not require SSL connection”
Click OK
Double-click to open the “localhost-eiPlatform:9090” connection
Select the Monitor tab to view CPU, heap, classes and threads
References
https://visualvm.github.io/gettingstarted.html