InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.21: Performing tasks with the Resource Analyzer

6.6.21: Performing tasks with the Resource Analyzer

This section describes how to start the Resource Analyzer, how to set instrumentation levels, and how to enable data reporting with the Java Virtual Machine Profiler Interface (JVMPI). It also provides step-by-step instructions for monitoring data with the Resource Analyzer. It contains the following topics:

A full listing of all counters for all resource categories is shown in Performance data.


Opening the Resource Analyzer

The Resource Analyzer is included with WebSphere Application Server 4.0. You can access the Analyzer through the following menu options:

  • In the WebSphere Advanced Administrative Console menu, click Tools --> Resource Analyzer. This method is available for all platforms.

  • On Windows systems, select Start --> Programs --> IBM WebSphere --> IBM Resource Analyzer 4.0.

If the administrative server is not running, you can start the Resource Analyzer from the command line, for example, when you want to run the Analyzer in logging mode to view data from previously logged sessions.

To start the Resource Analyzer from the command line, invoke a script provided in the bin directory where WebSphere Application Server is installed.

  • On Windows systems, the command is as follows:
    C:\WebSphere\AppServer\bin\ra.bat
    
    

  • On UNIX systems, the command is as follows:
    # /opt/websphere/appserver/bin/ra.sh
    
    

By default, the Resource Analyzer looks for the administrative server on the machine where the Analyzer is started. If the Resource Analyzer is running on a separate machine, you can start it from the command line, specifying the host and port number. For example, on Windows systems, use the following command:

C:\> WebSphere\AppServer\bin\ra.bat  [host_name [port_number]]

Due to memory requirements, it is recommended that you run the Resource Analyzer on a separate machine from the administrative server.


Setting the instrumentation level

Use the Performance Monitoring Settings dialog box to set instrumentation levels in the Resource Analyzer. The levels are set separately for each application server. You can access the Performance Monitoring Settings dialog box from within the Resource Analyzer or from the WebSphere Advanced Administrative Console. The access methods are discussed in the following topics:

In the Performance Monitoring Settings dialog box, perform the following steps to set the instrumentation level for a resource category:

  1. Click the icon labeled Performance, which is shown in the Counter Settings window, to expand all the resource performance categories.

  2. Highlight the desired resource category and choose an instrumentation level from the selections on the right (either None, Low, Medium, High, or Maximum). The dial icon associated with the chosen instrumentation level is added to the resource category under the Performance icon.

  3. Click OK to apply the chosen setting and close the Performance Monitoring Settings dialog box.

Choosing an instrumentation level causes the same level to be applied recursively to all elements below the selected resource. To ensure that an instrumentation level is applied to the desired resource, expand the node and make sure that only the desired resource is selected before setting the level. The instrumentation level for any element below a resource can be selected and individually set to a different instrumentation setting.

If the instrumentation level excludes a counter, that counter does not appear as an entry in the tables or charts in the Resource Analyzer. For example, if the instrumentation level is set to low on the Administrative Console, counters for that resource having a impact rating of medium or high are not displayed on the selection list in the Counter Selection panel of the Data Monitoring pane.

Setting the level for individual enterprise bean methods

To avoid the overhead cost of monitoring individual remote methods, individual methods in enterprise beans are not displayed in the performance panel unless the methods level is set to maximum. To display individual methods and specify their instrumentation levels, set the instrumentation level for the methods category to maximum by following the procedure described in Setting the instrumentation level. Close and reopen the Performance Monitoring Settings dialog box. Individual methods are now displayed, and you can set the method for individual methods.

Note that only methods that have been called by an application are displayed. If a remote method has not been called since the application server was started, it does not appear in the performance panel.

Setting the instrumentation level through the Resource Analyzer

The instrumentation level for a resource category is set in the Performance Monitoring Settings dialog box. To open this dialog box from the Resource Analyzer, do one of the following:

  • In the Resource Selection pane (the topology tree in the left-hand window), highlight the resource. On the menu bar, click Actions --> Monitoring Settings.

  • In the Resource Selection pane, right-click the resource. From the drop-down menu that is displayed, click Monitoring Settings.

Follow the instructions in Setting the instrumentation level to change the instrumentation levels.

Alternatively, clicking a resource with an instrumentation level of none causes the Performance Monitoring Settings dialog box to open. To use this access method, follow these steps:

  • Double-click the resource in the Resource Selection pane. If the instrumentation rating for the resource is set to none, a dialog box is displayed. (If the instrumentation level for the selected resource is set to a value other than none, the hierarchy tree for the resource expands to show its subcomponents.)

  • The dialog box reports that performance data monitoring is not enabled for the resource, and it asks whether you want to set the level now. Choose Yes to access the Performance Monitoring Settings dialog box; choose No to close the dialog box without enabling performance data monitoring for the resource; Choose do not ask again to disable future displays of this dialog box.

Setting the instrumentation level from the administrative console

The instrumentation level for a resource performance category is changed through the Performance Monitoring Settings dialog box. To access this dialog box from the WebSphere Advanced Administrative Console, perform the following steps:

  1. In the left-hand window of the Administrative Console, which shows the resource topology tree, right-click the application server instance. Choose Properties from the pop-up menu. The Application Server Properties dialog box is displayed.

  2. Click the Services tab. A Service window displays a list of all the resources that can be monitored.

  3. Select Performance Monitoring Settings and click Edit Properties. The Performance Monitoring Settings dialog box opens.

  4. Follow the instructions given in Setting the instrumentation level to change the instrumentation levels.

  5. Click Apply to make the settings persistent.

Enabling JVMPI data reporting

The Resource Analyzer leverages a Java Virtual Machine Profiler Interface (JVMPI) to enable a more comprehensive performance analysis. This profiling tool enables the collection of information, such as data about garbage collection, about the Java Virtual Machine (JVM) that runs the application server.

JVMPI is a two-way function call interface between the JVM and an in-process profiler agent. The JVM notifies the profiler agent of various events, such as heap allocations and thread starts. The profiler agent can activate or inactivate specific event notifications, based on the needs of the profiler.

JVMPI supports partial profiling by enabling the user to choose which types of profiling information is to be collected and to select certain subsets of the time during which the JVM is active. JVMPI moderately increases the performance impact.

This functionality is available on the Windows, AIX, and Solaris platforms.

To enable JVMPI reporting for each individual application server, do the following on the Administrative Console of the WebSphere Application Server:

  1. Right-click the application server in the hierarchical tree located in the left pane of the Administrative Console. A pop-up menu is displayed.

  2. Choose Properties from the menu. The Properties dialog box opens.

  3. Click the JVM Settings tab. The JVM Settings sheet is displayed.

  4. Click Advanced JVM Settings on the bottom left of the JVM Settings sheet. The Advanced JVM Settings sheet is displayed.

  5. In the Command line arguments text box, type the following case-sensitive command:
    -XrunpmiJvmpiProfiler
    

  6. Click OK to exit from the Advanced JVM Settings sheet.

  7. Start the application server, or restart the application server if it was already running.

  8. Refresh the Resource Analyzer.

Displaying current data

The following instructions describe how to display current performance data in the Data Monitoring pane.

Starting data retrieval

To start data retrieval, do the following:

  1. Click one or more resources in the Resource Selection pane. To select multiple resources, press and hold the Control key and click each resource.

  2. Click Actions --> Start. Alternatively, right-click the resource and choose Start. The resource's icon turns blue.

If a new module or instance (servlet or JSP file) is loaded by WebSphere Application Server after the Resource Analyzer is started, perform the following steps to display performance data for a newly loaded servlet or JSP file:

  • From the Resource Analyzer menu, click Actions --> Refresh.

  • In the Resource Selection pane, right-click the newly loaded resource and choose Monitoring Settings from the drop-down menu. The Performance Monitoring Settings dialog box opens.

  • In the Performance Monitoring Settings dialog box, highlight the newly loaded resource and change the instrumentation rating, which by default is set to none, to the desired level.

Only default servlets, for example, the ErrorReporter servlet in the Default application server, have a the value for the Load at startup option set to true. The option is set to false for other servlets. To change this setting, follow these steps:

  • In the WebSphere Advanced Administrative Console, right-click the resource and select Properties from the drop-down menu.

  • In the Advanced window of the servlet's Properties sheet, set the Load at startup option to true. When the application server is started, performance data will be collected for the servlet.

Stopping data retrieval

To stop data retrieval, do the following:

  1. Click one or more resources in the Resource Selection pane. To select multiple resources, press and hold the Control key and click each resource.

  2. Click Actions --> Stop. Alternatively, right-click the resource and choose Stop. The resource's icon turns red.

If you want to stop data reporting for all resources, click Actions --> Stop All.

When a running application server is stopped in the administrative console, the Resource Analyzer icon for the server turns from green to red. In addition, data reporting for this server automatically stops, and icons for the server's resources turn red.

Refreshing data

New performance data can become available in either of the following situations:

  • An administrator uses the console to change the instrumentation level for a resource (from medium to high, for example, or from none to low).

  • An administrator uses the console to add a new resource (for example, an enterprise bean or a servlet) to the run time.

In both cases, if the resource in question is already being polled by the Resource Analyzer (or the parent of the resource is being polled), the system is automatically refreshed. That is, if more counters are added for a group that the Resource Analyzer is already polling, the Resource Analyzer automatically detects this and adds the counters to the table or chart views. If the parent of the newly added resource is being polled, the new resource is detected automatically and added to the Resource Selection tree. Otherwise, the Resource Selection tree, or parts of it, can be refreshed manually by selecting the appropriate node and clicking the Refresh icon (or by right-clicking a resource and choosing Refresh).

When an application server is running, the Resource Analyzer's tree is automatically updated with the server's local structure (its containers and enterprise beans) to reflect changes on the server. However, if a stopped server is started after the Resource Analyzer starts, a manual refresh operation is required so that the server's structure is accurately reflected in the Resource Selection tree.

To query the administrative server for new resources or counters, do the following:

  1. Click one or more resources in the Resource Selection pane.

  2. Click Actions --> Refresh. Alternatively, right-click the resource and choose Refresh.

Note that the refresh operation is a local, not global, operation. It applies only to those resources that are selected. Also, the refresh operation is recursive; all subordinate (children) resources are also refreshed when a selected resource is refreshed.

Getting current data

To obtain the current values for all counters that belong to a resource:

  1. Click one or more resources in the Resource Selection pane.

  2. Click Actions --> Get Value. Alternatively, right-click the resource and choose Get Value.

The values are displayed independently of the refresh rate. The resource does not need to be running in order to get the values of the counters.

Clearing values from tables and charts

After stopping a resource, you can use the Clear Values operation to remove remaining data from a table or chart. You can then begin populating the table or chart with new data. To clear the values currently displayed, do the following:

  1. Click one or more resources in the Resource Selection pane.

  2. Click Actions --> Clear Values. Alternatively, right-click the resource and choose Clear Values.

Resetting counters to zero

To reset the start time for calculating aggregate data, do the following:

  1. Click one or more resources in the Resource Selection pane.

  2. Click Actions --> Reset to Zero. Alternatively, right-click the resource and choose Reset to Zero.

The reset operation sets the "clock" used for reporting aggregate data for counters of the selected performance category. Instead of reporting data from the time the server was started, reporting now begins from the time of the reset action. Not all counters can be reset. If you use the reset operation for a group containing counters which cannot be reset, the reset action has no effect. You can select multiple performance groups and reset them simultaneously.


Viewing and modifying chart data

The View Chart window displays a graph with time as the x axis and the performance value as the y axis.

To view data in a chart, do the following:

  1. Click a resource in the Resource Selection pane.

  2. Click the View Chart tab in the Data Monitoring pane.

The default scaling factor is 1. Negative results are displayed as zero (0). When selected counters are using measurement units that are not proportionally similar, the scaling factor can be set manually to enable a meaningful graphic display. See Scaling the chart display manually for information on manually scaling the graphic display for the View Chart window.

Scaling the chart display manually

You can manually adjust the scale for counters so that the graphic displays enable meaningful comparisons between graphs of different counters. Follow these steps:

  • In the Counter Selection panel, the bottom panel of the Data Monitoring pane, double-click the Scale column for the counter that you want to modify.

  • Type the desired value into the field for that counter's Scale value.

The View Chart display immediately reflects the change in the scaling factor.

The possible values for the Scale field range from 0 to 100 and show the following relationships:

  • A value equal to 1 indicates that the value is the actual value. This is the default setting.

  • A value greater than 1 indicates that the variable value has been amplified by the factor shown. For example, a scale setting of 1.5 means that the data points for the variable are amplified to one and one-half times their actual values.

  • Negative results are displayed as zero (0).

This value is reflected only in the View Chart window.


Storing and replaying data from a log file

The Resource Analyzer can be used to both store and view data saved in previous sessions.

Starting to record data

All data being reported by the Resource Analyzer can be saved in a log file. The data is written to the log as serialized Java objects or as an XML document. To start recording data, do the following:

  1. Click Logging --> On.

  2. In the Save dialog box, specify the name, location, and format type of the log file. The Files of type field allows an extension of *.lra (log resource analyzer) for binary files or *.xml for XML format.

  3. Click OK.

Stopping the recording of data

To stop recording data, click Logging --> Off.

Replaying a log file

Only log files saved in binary format (*.lra) can be replayed by using the Resource Analyzer.

To replay a log file, do the following:

  1. Click File --> Open Log File.

  2. In the Open dialog box, locate the name of the file to replay and double-click the file.

By default, the data is replayed at the same rate it was collected (written to the log). If data was collected every minute, it is displayed every minute. You can change the speed at which the log is replayed by clicking Options --> Play Speed. If the data was collected every minute and the speed factor is set to 60x, then data is displayed every second.

While replaying the log, you can choose different groups to view by selecting them in the Resource Selection pane. You can also view the data in either of the views available in the tabbed Data Monitoring pane.

You can stop and resume the log at any point. However, data cannot be replayed in reverse.

Changing the speed for replaying a log

The log speed is used to control how fast to replay a log file. The available speeds are 1x, 5x, 20x, and 60x. The 1x speed plays the log at the same speed at which the data was originally collected (written to the log). The 5x speed plays the log five times faster than the rate at which the data was collected, and so on. To change the log speed, do the following:

  1. Click Options --> Play Speed.

  2. Move the cursor to choose the desired speed.

Rewinding the log file

To rewind the log file, click Actions --> Rewind. Alternatively, use the Rewind icon on the toolbar.


Changing display settings

You can change several aspects of data monitoring. The following sections describe the possible changes:

Changing the View Data As setting

The View Data As setting determines whether counter values represent absolute values, changes in values, or rates of change. The meanings for these settings differ slightly depending on where you are viewing data. The choices follow:

  • Raw Value. Displays the absolute values. If the counter represents load data (for example, the average number of connections in a database pool or the average number of live bean objects), the Resource Analyzer displays the current value followed by the average--for example, 18(avg:5).

  • Change in Value. Displays the change in the current value from a previous value.

  • Rate of Change. Displays the ratio change/(T1 - T2), where change is the change in the current value from a previous value, T1 is the time when the current value was retrieved and T2 is the time when the previous value was retrieved.

Changing the refresh rate

By default, the Resource Analyzer retrieves data from the administrative server every 10 seconds. To change the rate at which data is retrieved from the server, do the following:

  1. Click Options --> Set Refresh Rate.

  2. In the Set Refresh Rate dialog box, type a positive integer representing the number of seconds. The integer must be 1 or greater.

  3. Click OK.

Changing the table size

By default, the View Data window displays 40 rows, corresponding to the values of the last 40 data points retrieved from the administrative server. To change the size of the table (number of rows displayed), do the following:

  1. Click Options --> Set Table Size.

  2. In the Set Table Size dialog box, type the number of rows to display.

  3. Click OK.
Go to previous article: Viewing transactions and forcing outcomes Go to next article: Performance data reported with the Resource Analyzer

 

 
Go to previous article: Viewing transactions and forcing outcomes Go to next article: Performance data reported with the Resource Analyzer