4.3 Monitoring Your ZENworks Server Using Visual VM

You can monitor the performance parameters such as threads, heap memory, ehCache, and database connections of the Primary Server using Java Visual VM bundled with ZENworks. VisualVM uses secured JMX connections to monitor ZENworks processes through JVM and MBeans.

From ZENworks 11.4.1 release onwards, JMX logs are located at the following:

Windows: %ZENSERVER_HOME%/logs/jmxagent

Linux: /var/opt/novell/log/zenworks/jmxagent

4.3.1 How to Launch Visual VM on a Windows Primary Server

To monitor your Windows Primary Server with Visual VM you must do the following:

  1. Create a batch script with the following command (in single line):

    "C:\Program Files (x86)\Novell\ZENworks\share\java\bin\jvisualvm.exe" -J-Djavax.net.ssl.keyStore="C:\Program Files (x86)\Novell\ZENworks\conf\security\server.keystore" -J-Djavax.net.ssl.trustStore="C:\Program Files (x86)\Novell\ZENworks\conf\security\zenCaCertStore" -J-Djavax.net.ssl.keyStorePassword=640e9e279dbaed6eae4ee783f1c0d02d -J-Djavax.net.ssl.trustStorePassword=633f59db6639664c5f172699c3a36d7f

  2. Change the jvisualvm.exe, keystore and trustStore file paths according to your zone %ZENWORKS_HOME%

  3. Change keyStorePassword as in %ZENWORKS_HOME%\conf\security\passphrase.txt

  4. Change trustStorePassword as in %ZENWORKS_HOME%\conf\security\zenCacertPassphrase.txt

  5. Save the batch script

  6. Launch the batch script.

4.3.2 How to Launch Visual VM on a Linux Primary Server

VisualVM is a GUI application that requires a terminal session attached to the X display on your Primary Server. To monitor your Linux Primary Server with Visual VM:

  1. Create a shell script with the following command (in single line):

    /opt/novell/zenworks/share/java/bin/jvisualvm -J-Djavax.net.ssl.keyStore="/etc/opt/novell/zenworks/security/server.keystore" -J-Djavax.net.ssl.trustStore="/etc/opt/novell/zenworks/security/zenCaCertStore" -J-Djavax.net.ssl.keyStorePassword=`cat /etc/opt/novell/zenworks/security/passphrase.txt` -J-Djavax.net.ssl.trustStorePassword=`cat /etc/opt/novell/zenworks/security/zenCacertPassphrase.txt`

  2. Save the shell script.

  3. Give execute permissions to the shell script.

  4. Launch the shell script.

4.3.3 How to Install the MBeans Plugin for Visual VM

To enable the monitoring of all necessary resources, you must install the MBeans plugin for Visual VM.

  1. Launch Java VisualVM.

  2. Click Tools.

  3. Click Plugins.

  4. Click the Available Plugins tab.

  5. Select VisualVM- MBeans, then click Install.

4.3.4 How to Add JMX Connections in Visual VM

To use Visual VM for monitoring the ZENworks services you need to connect Visual VM to the JMX instance.

  1. Launch Java VisualVM.

  2. Add the jmx connection using the toolbar icon.

  3. Specify the connection value as <IP Address of Primary Server>:<Port>

  4. Specify the port values:

    • 61495 for ZENServer

    • 61491 for ZENLoader

    • 61493 for CASA

4.3.5 Monitoring ehCache

ZENworks utilizes ehCache for caching commonly used information from the database into memory for faster performance and better scalability. You can use Visual VM to monitor the effectiveness of ehCache.

  1. Install the MBeans plugin for Java VisualVM.

  2. Add the JMX connection for the process for which you want to monitor the ehCache.

  3. Double click the JMX connection.

  4. Click the MBeans tab.

  5. Expand com.novell.zenworks.diagnostics.mbeans.

  6. Expand DMCache.

  7. Expand System_xxxxxxxxxx.

  8. Verify the cache HitToMissRatio, Evicts, Expires values.

  9. Back up the cache configuration xml files of Primary Servers in following locations:

    Linux: /etc/opt/novell/zenworks/datamodel/caching/default

    Windows: %ZENWORKS_HOME%\conf\datamodel\caching\default

  10. Determine the suitable values for SizePossible for all cache settings based on the HitToMissRatio, Evicts, Expires values.

  11. To update the customized values for SizePossible of all cache settings, by changing the value of maxElementsInMemory in cache xml files.

    NOTE:Changing the cache size values without proper analysis and monitoring might affect the performance of Primary Servers.

    Higher values for maxElementsInMemory might cause Out Of Memory issues.

4.3.6 Monitoring Connection Pools

You can also use Visual VM to monitor the connection pools used by the ZENworks Server processes:

  1. Install the MBeans plugin for Java VisualVM.

  2. Add the JMX connection for the process for which you want to monitor the connection pools.

  3. Double click the JMX connection.

  4. Click the MBeans tab.

  5. Expand com.mchange.v2.c3p0.

  6. Expand the connection pool IDs to identify the names.

  7. Select ZENServer.Core ,ZENServer.Audit, ZENLoader.Core, ZENLoader.Audit, or ZENLoader.Batch.

  8. Verify the MaxPoolSize, MinPoolSize, numConnections, > numBusyConnections, numIdleConnections, and numThreadsAwaitingCheckoutDefaultUser values.

  9. Determine the suitable values for MaxPoolSize, MinPoolSize, based on the connections usage and busy state.

  10. To update the customized values of MaxPoolSize, MinPoolSize for connections pools, follow the instructions in Connection Pool Tuning for the ZENworks Primary Server.

    NOTE:Changing the connection pool values without proper analysis and monitoring might affect the performance of the Primary Servers, database, and zone.