5.30.1  Web NMS JVM Monitoring

 

 



 

 

JVM Monitoring

 

Monitoring of JVM parameters such as Memory Usage and Thread count is an important process using which the VM performance can be improved and problems such as VM crash could be prevented.  In earlier JDK releases, these parameters could be monitored only using profiling tools or some scripting languages which were turning out to be extra overheads to the application. JDK 1.5 provides features to monitor and manage the JVM. Web NMS uses the SNMP mode to store historic information about the Web NMS JVM parameters so that administrators can monitor the condition of the Web NMS VM memory usage at any point of time. JMX MBeans is not supported currently.

 

 

System Properties for JVM Monitoring

 

J2SE 1.5 provides system properties to enable VM monitoring of Java applications. The following table lists down the properties and their default values in the various Web NMS startup scripts.

 

 

System Property

Default Values

startnms.bat/sh

startnmsFE.bat/sh

startApplicationClient.bat/sh

com.sun.management.jmxremote.port

16000

15000

14000

com.sun.management.jmxremote.authenticate

false

false

false

com.sun.management.jmxremote.ssl

false

false

false

com.sun.management.snmp.interface

%COMPUTERNAME% (Windows)

`hostname` (Linux/Solaris)

%COMPUTERNAME% (Windows)

`hostname`
(Linux/Solaris)

%COMPUTERNAME% (Windows)

`hostname`
(Linux/Solaris)

com.sun.management.snmp.acl

false

false

false

com.sun.management.snmp.port

16500

15500

14500

 

Visit the following links for information on the purpose of these properties :

 

http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#properties

http://java.sun.com/j2se/1.5.0/docs/guide/management/SNMP.html#snmp_properties

 

 

 

Web NMS JVM Monitoring collects, stores, and display the following System and Server parameters as graphs by default:

 

The polled data of each resource will be added for performance monitoring and the Performance module handles the data collection and storage. For each type of JVM i.e., BE, FE, and Client, there is a class to add the polled data namely, WebNMSBEResourceMonitoring, WebNMSFEResourceMonitoring, and WebNMSClientResourceMonitoring.

The WebNMSJVMMonitoring.xml file is a configuration file for Web NMS JVM Monitoring. The ResourceMonitoringFilter is an event filter, which filters out events related to JVM monitoring.  For the resource of the filtered event, the filter will parse the WebNMSJVMMonitoring.xml file and invoke action specified for the resource.

 

To monitor CPU Utilization, SNMP agent should be running in the machine, in which the JVM is started.

 

 

Viewing JVM Monitoring Details

 

The collected information about the Web NMS JVM can be viewed in the following graph/table formats:

Web Client

 

The collected data will be displayed as graphs, in the Web Client. The graphs display is invoked using the procedure given below:

Java Client

 

The collected data will be displayed as graphs in Java Application/Applet/Web Start Client. The graphs display is invoked using the procedure given below:

 

 

Configuration

 

Web NMS JVM Monitoring

 

You can configure the parameters to be monitored as per your requirement, in the WebNMSJVMMonitoring.xml file available in the <Web NMS Home>/conf directory.

The file consists of the following:

You can also configure the threshold name and action to be taken, if the threshold is crossed, for each polled data.

 

 

BE Server

 

The WebNMSMgmtBEProcess process defined in NmsProcessesBE.conf file takes care of the following functions:

PROCESS com.adventnet.nms.management.WebNMSMgmtBEProcess
 

ARGUMENTS

 

Argument

Purpose

Possible Values

Default Value

MEMORY_USAGE_THRESHOLD

Indicates the threshold value of memory usage of BE Server. When the memory usage exceeds this value, actions such as email notification, thread dump generation and garbage collection are triggered

Within the Range 0.1 and 1.0

0.7

MONITOR_BE_MEMORY_USAGE

Determines whether the memory usage of the BE server is to be monitored or not

true or false

true

MONITOR_FE_JVM

Determines whether the FE server JVM is to monitored or not. If this is set to true, the BE Server starts gathering the JVM details of FE server whenever the BE is notified of a new FE connected to it

true or false

true

RUN_GARBAGE_COLLECTOR

Determines whether Java GC is to be run or not. If this argument is set to true, Java GC is automatically run when the BE JVM exceeds the configured threshold

true or false

false

 

 

When the memory usage of the BE Server exceeds 0.7, an email notification is sent according to the configurations made in the Action Name="MailNotification" parameter of WebNMSJVMMonitoring.xml file. Also, if RUN_GARBAGE_COLLECTOR is set to true, Web NMS runs the garbage collector to free up the unused objects.

Further, thread dumps are generated when initiated from the Web Client and stored in the JVMThreadDump.txt file.

 

FE Server

 

The WebNMSMgmtFEProcess process defined in NmsProcessesFE.conf file takes care of the following functions:

PROCESS com.adventnet.nms.management.WebNMSMgmtFEProcess
 

ARGUMENTS

 

Argument

Purpose

Possible Values

Default Value

MEMORY_USAGE_THRESHOLD

Indicates the threshold value of memory usage of FE Server. When the memory usage exceeds this value, actions such as email notification, thread dump generation and garbage collection are triggered

Within the Range 0.1 and 1.0

0.7

MONITOR_FE_MEMORY_USAGE

Determines whether the memory usage of the FE server is to be monitored or not

true or false

true

MONITOR_CLIENT_JVM

Determines whether the clients connected to this FE server should be monitored or not. If this is set to true, the FE Server will start gathering JVM information of all clients that are connected to it.

true or false

true

RUN_GARBAGE_COLLECTOR

Determines whether Java GC is to be run or not. If this argument is set to true, Java GC is automatically run when the FE memory usage exceeds the configured threshold

true or false

false

 

 

If the memory usage of the FE JVM exceeds 0.7, an email notification is sent according to the configuration made in the Action Name="MailNotification" parameter of WebNMSJVMMonitoring.xml file. Also, if RUN_GARBAGE_COLLECTOR is set to true, Web NMS runs the garbage collector to free up the unreferenced objects.

Further, thread dumps are generated when initiated from the Web Client and stored in the JVMThreadDump.txt file.

 

Client

 

The Client monitors its own memory usage. If the memory usage exceeds the configured threshold limit, runs the garbage collector (if configured). Parameters for Client monitoring are available in the clientparameters.conf file and can be configured according to the requirement.

Thread dumps are generated when initiated from the Web Client and stored in the JVMThreadDump.txt file

The following table lists down the parameters and their usage:

 

 

Argument

Purpose

Possible Values

Default Value

MEMORY_USAGE_THRESHOLD

Indicates the threshold limit for the memory usage of Client. When the memory usage exceeds this value, actions such as email notification, thread dump generation and garbage collection are triggered

Within the Range 0.1 and 1.0

0.7

MONITOR_CLIENT_MEMORY_USAGE

Determines whether the memory usage of the Client server is to be monitored or not

true or false

true

RUN_GARBAGE_COLLECTOR

Determines whether Java GC is to be run or not. If this argument is set to true, Java GC is automatically run when the Client memory usage exceeds the configured threshold limit

true or false

false

 

When the memory usage of the client exceeds the configured limit, an email notification is triggered by the BE Server according to the configuration made in the Action Name="MailNotification" parameter of WebNMSJVMMonitoring.xml file.

 

Note: The Client JVM Monitoring is not supported in Java Web Start, Applet, and Web clients.

 

 

Start up Script

 

Server Configuration

 

When the server is started using script, configure JVM Monitoring using the properties highlighted in the following entry in the startnms.bat/startnms.sh file present under <Web NMS Home>/bin:

 

startnms.bat file

startnms.sh file

 

 

Application Client Configuration

 

When the Application Client is started using script, configure Client JVM Monitoring using the properties highlighted in the following entry in the startApplicationClient.bat/startApplicationClient.sh file present under <Web NMS Home>/bin:

 

startApplicationClient.bat file

startApplicationClient.sh file

 

Launcher

 

Server Configuration

 

When the server is started from the Web NMS Launcher, configure JVM Monitoring using the properties highlighted in the following entry in the Start Web NMS Server application of the launcher_conf.txt file present under <Web NMS Home>/conf:

 

 

Application Client Configuration

 

When the Application Client is started from the Web NMS Launcher, configure Client JVM Monitoring using the properties highlighted in the following entry in the Application Client application of the launcher_conf.txt file present under <Web NMS Home>/conf:

 

 

Windows Service

 

 When the server is installed as a Windows Service, configure JVM Monitoring using the following system properties in the Java Additional Parameters of the wrapper.conf file:

Note: You will not be able to start more than one application client/BE JVM/FE JVM with the JVM Monitoring process enabled. To overcome this problem, you need to configure the value of com.sun.management.jmxremote.port and com.sun.management.snmp.port arguments to some other free ports in the respective startup script/configuration file.

 

 

If you face server startup problems due to long class path in Windows, refer to the Input Line Too Long topic for a solution.

 

 


Copyright © 2013, ZOHO Corp. All Rights Reserved.