IBSurgeon home      print      mail        English      Russian       

IBTransaction Monitor User's Guide

What's inside?

IBTM package contains three main modules:

  • Monitor – A small Win32 service-based program to monitor and log transaction states from one or more databases.

  • Configuration Assistant For configuring settings for the Monitor and Viewer.

  • Visualizer Designed to view and analyse the information that is logged by the Monitor.

Monitor

The Monitor is a small Win32 service-based program (ibtm.exe), which works on Windows NT, 2000, XP and Windows 2003. On start-up the Monitor reads the settings (set by the Configuration Assistant) and monitors the specified database. During monitoring it connects to the database each minute (recommended default interval) and reads the state of transactions.

If InterBase or Firebird is running on Windows, the Monitor can be installed on the server where the database resides. For Linux-based servers, it can be installed on any Windows computer with network access to the InterBase or Firebird server. You can install the Monitor using the following methods:

  1. The Configuration Assistant

  2. Using the command line

Important! Before starting to install the Monitor you need to make sure that you are logged on to Windows with Administrator rights and privileges. The Monitor will be installed as a service with Automatic start under the Localsystem user account.

Since the Monitor only periodically connects to the database and writes the information gathered to a plain text log file, there is no need to apply any further rules. However, if you want to secure the Monitor configuration and database login information, you must change the Monitor's service settings and its directory (and log) access as required, via the Windows Service Control Panel.

Monitor configuration parameters will be discussed in the Configuration Assistant.

What is being logged?

The Monitor periodically checks the database header page, and then stores the database transaction information into the log, as follows:

  • Log time

  • Oldest transaction number

  • Oldest snapshot transaction number

  • Oldest Active transaction number

  • Next transaction number

  • Active transactions count (depends on server version)

This information is stored in the log file, and can then be viewed and analysed using Visualizer. Using the visual transaction state information you can understand how long your applications keep transactions open, how many simultaneous transactions are running, how long snapshot transactions are running, when is the most intensive time that applications are starting transactions, etc.

Note: The Monitor logs the transaction state information to the local log file. It does not send this or any other information across the network.

Configuration Assistant

Configuration Assistant (ibtmconfig.exe) is used to set up the configuration parameters for the Monitor and Viewer. It saves the configuration parameters in the ibtm.ini file.

Tip! IBTM does not use the Registry to store configuration parameters, so you can prepare a configuration at one computer, and then move ibtm.ini to another computer where Monitor is installed (The Monitor service needs to be restarted to read new a configuration).

The Monitor and Configuration Assistant are placed by the IBTM installer in the same directory, so that the Monitor and Configuration Assistant share the same configuration file (ibtm.ini).

Using the Configuration Assistant

The Configuration Assistant helps you to

  • Manage the Monitor service – install, uninstall, start, stop, pause and restart.

  • Specify the InterBase or Firebird servers that have databases that need to be monitored

  • Specify databases and monitoring/scheduling options for a particular database

Managing the Monitor Service

IBTM service stopped

When the Configuration Assistant starts, it determines the Monitor service state on the System.

Installing Monitor - if the Monitor service is not installed, you will see a "not installed" message in the IBTM state label in the left upper corner. To install Monitor press the Install button at the right hand side of the window. Note that the Monitor service will use the Start type (automatic or manual) checkbox value. If installing the Monitor service has succeeded, you will see the IBTM state change to "stopped" and the "Run service" button will be enabled.

You need to restart the Monitor service whenever you change any database configuration parameters.

Configuring Servers

IBTM uses the TCP/IP connection protocol to access the database(s) for monitoring. So, if you installed Monitor on the same computer on which the server is, you need to add the server as localhost or the server's host name. Once this is done, you will be able to add the databases that will be monitored on this server.

Configuring Databases

With this version of IBTM you can monitor only a single database at a time. Additional licenses are required for monitoring one or more databases simultaneously. Please contact us for details (www.ibphoenix.com).

However, you can set up several servers and databases and switch between them to select the database to monitor (the active database will be highlighted in bold). With additional licenses you will able to monitor several databases simultaneously.

Use the Add Server and Add Database buttons at the left hand side of the Databases list.

Each database record can be configured with the following parameters:

Get statistics method. This depends on the server version, and supports different capabilities. Each method is being described with its pros and cons:


Services API Firebird API TMP$ table
InterBase 4.x/5.x no no no
InterBase 6.0 Classic no no no
 Firebird Classic - 1.0, 1.5.0, 1.5.1, 1.5.2 no yes no
InterBase 6.x SuperServer yes no no
InterBase 7.x/2007 yes no yes
Firebird Classic and SuperServer: 1.5.3, 1.5.4 /2.0 yes yes no

Differences between Services API, Firebird API, and TMP$ tables:

 

Method

Pro

Flaws

Services API
Public API that was introduced in InterBase 6.0 SuperServer

  • Universal method, works with all versions of InterBase and Firebird

  • Does not affect Next transaction

  • Does not have the capability to find the real count of active transactions

  • May show outdated information if the server rarely saves the database header page onto disk (InterBase V7.1/V7.5)

Firebird API
Firebird from V1.0 has extended parameters for the isc_database_info call, that allows the return of transaction state information.

Allow the facility to get active transactions count information (not more than 4676 active transactions)

  • Not supported by any InterBase version

  • Internally increments the Next transaction. The Monitor will increment the Next transaction by +1 each time it connects to the database. If there is no transaction activity in the database at this time, the Oldest Active, Oldest Snapshot and Oldest transaction numbers will remain unchanged.
    If there is no any activity in the database, the Monitor itself will increment the Next transaction to +1440 in 24 hours, if it is configured to check the database each (1) minute.
    (The Firebird API itself does not have this effect. The behaviour described is specific to the isc_database_info method)

TMP$ tables
Was introduced in InterBase 7.0 to allow monitoring server state

  • Allows retrieval of the actual transaction state from InterBase V7.x/V2007, including the count of active transactions.

  • To get the transaction state information Monitor starts a transaction with read_only read_committed rec_version parameters. Such a transaction is not treated as active for transaction accounting purposes, and does not affect server or database performance.

  • Supported only by InterBase V7.0/V7.1/V7.5/V2007

  • As with the Firebird API it increments the Next transaction number, because reading data from TMP$ tables needs to be made within transaction.

  • Access time is a bit longer than using the Services API (< 0.5 seconds).

If you have chosen a statistics method that is incompatible with your server, nothing will be written in Monitor's transaction log. Check the Error log tab in Configuration Assistant to see errors that may occur whilst monitoring the database.

Check Interval. This determines how often the Monitor takes the transaction information from a database. 1 minute is the minimum interval. You can set 1, 3, 5, 10, 20, 30 minutes, or even a 1 hour interval, but the most informative interval is 1 or 3 minutes.

Using the 1-minute interval, the Monitor will check the database transaction state 1440 times every 24 hours. The size of the log file will be ~150 Kilobytes.

Start time and End Time. If this is not set, the Monitor will take statistics from the specified database the whole time it is working. If the time limit is set, the Monitor will operate for only specified period of time.

User name and Password. The User name and password for the account that will be used to monitor the database transaction state. You can use the SYSDBA login or any other user login you want. If a non-SYSDBA login is used, for Services API and Firebird API methods it is not necessary to grant any additional privileges for that user account. You can create a user like 'TM', and the Monitor will work successfully.

For Temporary System Tables (IB V7.1, V7.5, V2007) the user login must have read access rights on theTMP$TRANSACTIONS and TMP$DATABASES tables. If you use Embedded User Authentification in your InterBase V7.5/V2007 database, you need to create a login and grant those access rights for that database explicitly.

Articles
Recent news

More News