Monitoring Application Server performance through monitoring tools
You can obtain various Application Server performance statistics through a pair of monitoring tools that are available at any BMC Sever Automation Console installation — the BladeLogic JConsole (a GUI) and the JMXCLI (a command line interface). These monitoring tools retrieve data from the Application Server using the Java Management Extensions (JMX) protocol, by listening to the JMX port defined for the Application Server.
You can direct the retrieved performance statistics to more advanced monitoring systems for further analysis, as performed by BMC products BMC PATROL for BMC Server Automation and BMC ProactiveNet Automation Server Monitoring, which poll the JMX port of an Application Server instance at periodic intervals. Such monitoring systems enable you to configure threshold settings for the various performance statistics, so that you can receive warnings and alerts when measured statistics fall beyond acceptable performance values for a certain length of time. (See, for example, the list of statistics monitored by BMC ProactiveNet Automation Server Monitoring.)
Before you begin
Ensure that the user that you plan to use with the BladeLogic JConsole or the JMXCLI is associated with a role that has the BL_Administration.read authorization.
Using the BladeLogic JConsole
The BladeLogic JConsole (bljconsole) is a performance monitoring tool that you can use to monitor the Java process of your BMC Server Automation Application Server. The BladeLogic JConsole is based on the JConsole tool provided by Oracle, which uses Java Management Extensions (JMX) technology to monitor performance and resource consumption of applications running on the Java platform.
To execute the BladeLogic JConsole
- Run the bljconsole.bat script found within the bin directory in the BladeLogic installation directory (typically C:\Program Files\BMC Software\BladeLogic\NSH\bin or /opt/bmc/bladeLogic/NSH/bin).
This batch script calls the bljconsoleexe.exe file from within the same directory.
- Select Connection > New Connection.
Specify the host name and port of the Application Server that you want to monitor.For a profile that uses SRP or AD/Kerberos authentication, specify the JMX port, with a default of 9838 (base + 38).
For a typical case, specify the RMI registry port, with a default of 9836 (base + 36).
For more information about the display of performance data in the JConsole, see the Oracle documentation for the JConsole tool of Java 1.5.
Using the JMXCLI utility
The JMXCLI is a command line interface that retrieves performance statistics from the BMC Server Automation Application Server and displays them through the command line as a comma delimited list. Retrieval of statistics is controlled by an associated properties file, which regulates the frequency and total length of data polling, as well as the exact statistics to be retrieved. You can save the output to various formats; for example, as a CSV file, which can then be consumed by a spreadsheet application and presented in tabular format.
To prepare the properties file
A default properties file named bl_jmx_monitor.properties is provided together with the JMXCLI utility, in the the bin directory in the BladeLogic installation directory (typically C:\Program Files\BMC Software\BladeLogic\NSH\bin or /opt/bmc/bladeLogic/NSH/bin). You can edit the contents of this file according to your needs. The properties file contains the following types of settings:
- Data polling settings — control the frequency and total length of data polling
- Default statistics — performance metrics to retrieve; each defined with 4 lines of attributes. You can comment out any statistics that you are not interested in, by inserting a pound (hash) carachter at the beginning of each line.
The following table lists the settings in the default properties file:
Length of data polling interval, in milliseconds. That is, the frequency of refreshing the data from the Application Server.
The default value is 60000 milliseconds (1 minute).
The number of intervals, that is, the total number of times to poll the Application Server for data (at the frequency specified by the previous setting).
The default value is 2000 times. Default values for these two settings result in the JMXCLI running for 2000 minutes (almost a day and a half).
|1||CurrentTime||Current time at the Application Server.|
|2||ResidentSetSize||Resident set size (RSS) of the Java process in the main memory. Total physical (non-virtual) memory used.|
|3||VirtualSize||Total memory used by the Java process (virtual + resident).|
|4||TotalJvmMemory||Total amount of memory (used + free) reserved from the operating system for the JVM.|
|5||UsedJvmMemory||Amount of memory currently used on the java heap.|
|6||FreeJvmMemory||Amount of memory available (not currently used) on the java heap.|
|7||NumberOfRunningJobs||Number of running jobs on the Application Server.|
|8||NumOfWorkItemsCached||Number of work items that were cached.|
|9||ClientConnectionPool : NumAvailableConnections||Number of available database connections created for clients.|
|10||ClientConnectionPool : NumConnections||Number of database connections currently in use by clients.|
|11||GeneralConnectionPool : NumAvailableConnections||Number of available database connections created in the general connection pool, a default pool used by various Application Server activities (not including job-related or client-related activities).|
|12||GeneralConnectionPool : NumConnections|
Number of database connections from the general connection pool that are currently in use.
|13||JobConnectionPool : NumAvailableConnections|
Number of available database connections created for jobs.
|14||JobConnectionPool : NumConnections|
Number of database connections currently in use by jobs.
|15||NumIdleClientWorkerThreads||Number of idle work item threads that are available. This represents the available capacity to do work when physical resources are free.|
|16||ActiveConnections||Number of connections that are open and are active.|
To execute the JMXCLI
- Before running the JMXCLI, use the
blcredcommand line utility to acquire a session credential. For more information about using blcred, see Using the blcred utility and Typical scenarios for using blcred.
Base your session on any profile that is authorized to connect to the Application Server and run BLCLI commands. If necessary, prepare such a profile before you acquire the session credential, as described in Setting up an authentication profile.
Run the JMXCLI from within the bin directory in the BladeLogic installation directory (typically C:\Program Files\BMC Software\BladeLogic\NSH\bin or /opt/bmc/bladeLogic/NSH/bin).
For a typical case, use the following command syntax:
jmxcli –v <profile name> -a <hostname> -d <RMI registry port> -r <role> <properties file name>
or, for a profile that uses SRP or AD/Kerberos authentication:
jmxcli –v <profile name> -a <hostname> -p <JMX port> -r <role> <properties file name>
jmxcli -v defaultProfile -a host1 -d 9836 -r JMXAdmin bl_jmx_monitor.properties
In order to connect to a system that does not run authentication services (for example, a server of type JOB), specify a default profile that authenticates you to a server of type CONFIG or ALL in the environment, and then use the RMI registry port (specified by the
-doption) for the particular instance in the environment.
For information about additional options, run JMXCLI with the
-hoption (or without any options).
The JMXCLI starts running and the output is displayed as a comma-delimited list.