How to use the Java VisualVM to monitor the resource usage of the NuGenesis LMS Server service - WKB30386
Article number: 30386
OBJECTIVE or GOAL
Use the VisualVM tool in a Java RE to monitor and analyze the memory usage of the Java process for the NuGenesis LMS Server service.
ENVIRONMENT
- NuGenesis 8 LMS
- NuGenesis 8 ELN
PROCEDURE
- There are two ways to monitor the LMS Server with VisualVM:
- Remotely, with a JMX connection
- Locally, with the VisualVM tool running on the LMS Server machine
- Locally is preferred because the VisualGC plugin is not compatible with JMX connections and this plugin provides greater insight into the memory usage of the server; however, this requires some downtime for the system.
- The VisualVM tool requires a 1.7 or 1.8 JDK (Java Development Kit). Either install a JDK on the LMS server (clear the "Public JRE" option in the installation program) or install a JDK on the client machine, if it cannot be installed on the server.
- Local connection:
- Stop the NuGenesis LMS Server service.
- Edit the file: Drive:\WatersLMSServer\jboss.6.0.0.Final\bin\run.conf.bat
-
Set the -Xmx parameter to match that of the LMS service.
- Example: set "JAVA_OPTS=-Xms128M -Xmx4096M -XX:MaxPermSize=256M"
- Save and close the file.
- Run StartElnServer.bat.
- Run the jvisualvm.exe program in the JDK: Drive:\Program Files\Java\jdk1.8.0_162\bin.
- When the LMS server is fully started, JVisualVM will see the server as a local Java process. The VisualGC tab will be available.
- Remote connection via JMX:
- Run the jvisualvm.exe program in the JDK.
- Click File menu > Add Connection.
- In the "Connection:" box, specify the LMS server's hostname and the port 1190.
- Example: lmsprod1:1190
- Click OK to create the connection.
- The VisualGC plugin does not work with JMX connections, but the Monitor, Threads, and Sample plugins work.
ADDITIONAL INFORMATION
id30386, NGLMS, NGLMSLIC, NGLMSOPT, SUPNG