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: ZENWORKS_HOME/logs/jmxagent
Linux: /var/opt/novell/log/zenworks/jmxagent
To monitor your Windows Primary Server with Visual VM you must do the following:
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
Change the jvisualvm.exe, keystore and trustStore file paths according to your zone %ZENWORKS_HOME%
Change keyStorePassword as in %ZENWORKS_HOME%\conf\security\passphrase.txt
Change trustStorePassword as in %ZENWORKS_HOME%\conf\security\zenCacertPassphrase.txt
Save the batch script
Launch the batch script.
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:
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`
Save the shell script.
Give execute permissions to the shell script.
Launch the shell script.
To enable the monitoring of all necessary resources, you must install the MBeans plugin for Visual VM.
Launch Java VisualVM.
Click Tools.
Click Plugins.
Click the Available Plugins tab.
Select VisualVM- MBeans, then click Install.
To use Visual VM for monitoring the ZENworks services you need to connect Visual VM to the JMX instance.
Launch Java VisualVM.
Add the jmx connection using the toolbar icon.
Specify the connection value as <IP Address of Primary Server>:<Port>
Specify the port values:
61495 for ZENServer
61491 for ZENLoader
61493 for CASA
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.
Install the MBeans plugin for Java VisualVM.
Add the JMX connection for the process for which you want to monitor the ehCache.
Double click the JMX connection.
Click the MBeans tab.
Expand com.novell.zenworks.diagnostics.mbeans.
Expand DMCache.
Expand System_xxxxxxxxxx.
Verify the cache HitToMissRatio, Evicts, Expires values.
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
Determine the suitable values for SizePossible for all cache settings based on the HitToMissRatio, Evicts, Expires values.
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.
You can also use Visual VM to monitor the connection pools used by the ZENworks Server processes:
Install the MBeans plugin for Java VisualVM.
Add the JMX connection for the process for which you want to monitor the connection pools.
Double click the JMX connection.
Click the MBeans tab.
Expand com.mchange.v2.c3p0.
Expand the connection pool IDs to identify the names.
Select ZENServer.Core ,ZENServer.Audit, ZENLoader.Core, ZENLoader.Audit, or ZENLoader.Batch.
Verify the MaxPoolSize, MinPoolSize, numConnections, > numBusyConnections, numIdleConnections, and numThreadsAwaitingCheckoutDefaultUser values.
Determine the suitable values for MaxPoolSize, MinPoolSize, based on the connections usage and busy state.
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.