IBM DB2 Performance Monitoring

Drill down into the performance of your DB2 database by getting to know bufferpool, transaction, log utilization stats and more.

Detect database outages and failures faster by monitoring DB2 database with Site24x7 plugins. Use these key indicators to ensure continuous functioning of your DB2 servers.

This document details how to configure the DB2 plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of IBM DB2 servers.

DB2 performance monitoring metrics:

Use our wide array of metrics and get notified of hazardous errors that require your attention. DB2 monitoring helps to keep track of unexpected trends through our metric graphs and troubleshoot as quickly as possible. Various out-of-the-box metrics we support are:

Number of bufferpools

The bufferpool is a part of the main memory space allocated by the database manager. The purpose of the bufferpool is to cache entries and their attributes. The number_of_bufferpools helps to efficiently optmize the memory used by the database and increase its overall performance

Total logical reads

total_logical_reads is the sum of data, index and XDA logical reads

Total physical reads

total_physical_reads is the sum of physical reads of data, index and XDA

Total hit ratio percentage

The total_hit_ratio_percent is a measure of how often a page access is satisfied without requiring an input/output operation

Data logical/physical reads

The data_logical_reads and data_physical_reads gives the sum of data logical and physical reads respectively in the DB2 server

Data hit ratio percentage

data_hit_ratio_percent is the individual hit ratio percentage specific for data bufferpool

Index logical reads and hit ratio percentage

index_logical_reads gives the index bufferpool logical reads and index_hit_ratio_percent is the index bufferpool hit ratio percentage

XDA logical reads and hit ratio percentage

xda_logical_reads gives the XDA index logical reads and xda_hit_ratio_percent is the XDA hit ratio percentage

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one.
  • Download and install the latest version of Site24x7 Linux agent
  • Install the IBM DB2 plugin
  • The agent will execute the DB2 plugin extension and push the data to the Site24x7 server

Prerequisites:

  • The DB2 plugin uses the "ibm_db" module to interact with the DB2 server.
  • Download the 'ibm_db-2.0.7.tar.gz (md5)' file from https://pypi.python.org/pypi/ibm_db/ sudo wget https://pypi.python.org/packages/54/8a/54857a841cbd485d68f9852dfc16d27b069987a65ade38bb9288471ae98b/ibm_db-2.0.7.tar.gz#md5=08d5071d18b201c7a23249c676f1b84f
  • Extract the file sudo tar -xvzf ibm_db-2.0.7.tar.gz
  • Go to the directory where the file is extracted cd ibm_db-2.0.7
  • Install the module
    sudo python setup.py build
    sudo python setup.py install

DB2 plugin installation:

  • Create a directory with the name "ibmdb2", under Site24x7 Linux agent plugin directory - /opt/site24x7/monagent/plugins/
    sudo mkdir ibmdb2
  • Download the "ibmdb2.py" from our GitHub repository and place it under the "ibmdb2" directory
    sudo wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2/ibmdb2.py
  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • Change the values of DB2_HOST, DB2_PORT, DB2_USERNAME, DB2_PASSWORD, DB2_SAMPLE_DB to match your configuration
  • The server agent will report stats on the performance of DB2 server under the Plugins tab in the Site24x7 web client. In case the plugin is not listed in the Site24x7 web client, restart the agent
    sudo /etc/init.d/site24x7monagent restart

Monitoring additional metrics:

  • To monitor additional metrics, edit the "ibmdb2.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "ibmdb2.py" to view the newly added metrics (For e.g., change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • ActiveMQ plugin - Monitor performance metrics of your Apache ActiveMQ instances
  • GlassFish plugin - Monitor performance metrics of your GlassFish servers
  • Kafka plugin - Analyze performance of your Apache Kafka server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes