Tuesday, 16 April 2013

Monitoring


Monitoring overall system health

Monitoring overall system health is fundamentally important to understanding the health of every system involved with your system. This includes Web servers, application servers, databases, back-end systems, and any other systems critical to running your Web site.

Before you begin

If any system has a problem, it might cause the servlet is slow message to appear.. WebSphere Application Server provides Performance Monitoring Infrastructure (PMI) data to help monitor the overall health of the WebSphere Application Server environment. PMI provides average statistics on WebSphere Application Server resources, application resources, and system metrics. Many statistics are available in WebSphere Application Server, and you might want to understand the ones that most directly measure your site's resources to detect problems.

About this task

Table 1. Monitoring overall system health. To monitor overall system health, monitor the following statistics at a minimum:
MetricMeaning
Average response timeInclude statistics, for example, servlet or enterprise beans response time. Response time statistics indicate how much time is spent in various parts of WebSphere Application Server and might quickly indicate where the problem is (for example, the servlet or the enterprise beans).
Number of requests (transactions)Enables you to look at how much traffic is processed by WebSphere Application Server, helping you to determine the capacity that you have to manage. As the number of transactions increase, the response time of your system might be increasing, showing the need for more system resources or the need to retune your system to handle increased traffic.
Number of live HTTP sessionsThe number of live HTTP sessions reflects the concurrent usage of your site. The more concurrent live sessions, the more memory is required. As the number of live sessions increase, you might adjust the session time-out values or the Java virtual machine (JVM) heap available.
Web server thread poolsInterpret the Web server thread pools, the Web container thread pools, and the Object Request Broker (ORB) thread pools, and the data source or connection pool size together. These thread pools might constrain performance due to their size. The thread pools setting can be too small or too large, therefore causing performance problems. Setting the thread pools too large impacts the amount of memory that is needed on a system or might cause too much work to flow downstream if downstream resources cannot handle a high influx of work. Setting thread pools too small might also cause bottlenecks if the downstream resource can handle an increase in workload.
The Web and Enterprise JavaBeans (EJB) thread pools
Database and connection pool size
Java virtual memory (JVM)Use the JVM metric to understand the JVM heap dynamics, including the frequency of garbage collection. This data can assist in setting the optimal heap size. In addition, use the metric to identify potential memory leaks.
CPUYou must observe these system resources to ensure that you have enough system resources, for example, CPU, I/O, and paging, to handle the workload capacity.
I/O
System paging

Enable Performance Monitoring Infrastructure (PMI)

  1. Procedure

    1. Open the administrative console.
    2. Click Servers > Application Servers in the console navigation tree.
    3. Click a server.
    4. Click the Configuration tab.
    5. Click Performance Monitoring Infrastructure (PMI) under Performance.
    6. Select the  check box.
    7. Optionally, select the check box Use sequential counter updates to enable precise statistic update.
    8. Optionally, choose a statistic set that needs to be monitored under Currently Monitored Statistic Set.
    9. Optionally, click on Custom to selectively enable or disable statistics. Choose a component from the left side tree and enable or disable statistics on the right side table. Go back to the main PMI configuration page by clicking the Performance Monitoring Infrastructure link.
    10. Click Apply or OK.
    11. Click Save.
    12. Restart the application server. The changes you make will not take effect until you restart the application server.


    When in the Configuration tab, settings apply after the server is restarted.


    Statistic setDescription
    NoneAll statistics are disabled.
    BasicStatistics specified in J2EE 1.4, as well as top statistics like CPU usage and live HTTP sessions are enabled. This set is enabled out-of-the-box and provides basic performance data about runtime and application components.
    ExtendedBasic set plus key statistics from various WebSphere® Application Server components like WLM, and dynamic caching are enabled. This set provides detailed performance data about various runtime and application components.
    AllAll statistics are enabled.
    CustomEnable or disable statistics selectively.

    Monitoring through Tivoli


    To monitor several of these statistics, WebSphere Application Server provides the Performance Monitoring Infrastructure to obtain the data, and provides the Tivoli® Performance Viewer (TPV) in the administrative console to view this data.
    To monitor several of these statistics, WebSphere Application Server provides the Performance Monitoring Infrastructure to obtain the data, and provides the Tivoli Performance Viewer (TPV) and the optional IBM Tivoli Composite Application Manager for WebSphere Application Server in the administrative console to view this data.

Procedure

  • Create logs.
    1. Click Monitoring and Tuning > Performance Viewer > Current Activity > server_name > Settings > Log in the console navigation tree. To see the Log link on the Tivoli Performance Viewer page, expand the Settings node of the TPV navigation tree on the left side of the page. After clicking Log, the TPV log settings are displayed on the right side of the page.
    2. Click on Start Logging when viewing summary reports or performance modules.
    3. When finished, click Stop Logging . Once started, logging stops when the logging duration expires, Stop Logging is clicked, or the file size and number limits are reached. To adjust the settings, see step 1.
    By default, the log files are stored in the profile_root/logs/tpv directory on the node on which the server is running. TPV automatically compresses the log file when it finishes writing to it to conserve space. At this point, there must only be a single log file in each .zip file and it must have the same name as the .zip file.
  • View logs.
    1. Click Monitoring and Tuning > Performance Viewer > View Logs in the console navigation tree.
    2. Select a log file to view using either of the following options:
      Explicit Path to Log File
      Choose a log file from the machine on which the browser is currently running. Use this option if you have created a log file and transferred it to your system. Click Browse to open a file browser on the local machine and select the log file to upload.
      Server File
      Specify the path of a log file on the server.In a stand-alone application server environment, type in the path to the log file. Theprofile_root\logs\tpv directory is the default on a Windows system.
    3. Click View Log. The log is displayed with log control buttons at the top of the view.
    4. Adjust the log view as needed. Buttons available for log view adjustment are described below. By default, the data replays at the Refresh Rate specified in the user settings. You can choose one of the Fast Forward modes to play data at rate faster than the refresh rate.
      RewindReturns to the beginning of the log file.
      StopStops the log at its current location.
      PlayBegins playing the log from its current location.
      Fast ForwardLoads the next data point every three (3) seconds.
      Fast Forward 2Loads ten data points every three (3) seconds.
    You can view multiple logs at a time. After a log has been loaded, return to the View Logs panel to see a list of available logs. At this point, you can load another log.TPV automatically compresses the log file when finishes writing it. The log does not need to be decompressed before viewing it, though TPV can view logs that have been decompressed.

For More:http://websphereapplicationservernotes.files.wordpress.com/2012/04/websphere-doctor-6-using-tpv.pdf

1 comment:

  1. I always enjoy seeing what is on the horizon of server monitoring and server monitoring tools. Really interesting read

    ReplyDelete