Viewing Lock Statistics

From InterBase

Go Up to Database Statistics and Connection Monitoring


Note that the gds_lock_print utility is deprecated and is not included with some versions of InterBase.

Locking is a mechanism that InterBase uses to maintain the consistency of the database when it is accessed by multiple users. The lock manager is a thread in the ibserver process that coordinates locking.

The lock manager uses a lock table to coordinate resource sharing among client threads in the ibserver process connected to the database. The lock table contains information on all the locks in the system and their states. The global header information contains useful aggregate information such as the size of the lock table, the number of free locks, the number of deadlocks, and so on. There is also process information such as whether the lock has been granted or is waiting. This information is useful when trying to correct deadlock situations.

iblockpr [a,o,w] (Windows) or gds_lock_print [a,o,w] (UNIX)
iblockpr [-i{a,o,w}] [t n]

Description: iblockpr monitors performance by checking lock requests.

The first form of syntax given above retrieves a report of lock statistics at one instant in time. The second form monitors performance by collecting samples at fixed intervals.

The options display interactive information on current activity in the lock table. The utility prints out the events per second for each sampling and gives the average of the values in each column at the end.

Option Description

[none]

Same as -o

-a

Prints a static view of the contents of the lock table.

-o

Prints a static lock table summary and a list of all entities that own blocks.

-w

Prints out all the information provided by the -o flag plus wait statistics for each owner; this option helps to discover which owner’s request is blocking others in the lock table.

The following options supply interactive statistics (events/second) for the requested items, which are sampled <n> times every <t> seconds, with one line printed for each sample. The average of the sample values is printed at the end of each column. If you do not supply values for <n> and <t>, the default is <n>=1.

-i

Prints all statistics; the output is easier to read if you issue -ia, -io, and -iw separately.

-ia

Prints how many threads are trying to acquire access to the lock table per second.

-io

Prints operation statistics such lock requests, conversions, downgrades, and releases per second.

-iw

Prints number of lock acquisitions and requests waiting per second, wait percent, and retries.

t

Specifies the time in seconds between samplings.

n

Specifies the number of samples to be taken.

Example: The following statement prints “acquire” statistics (access to lock table: acquire/s, acqwait/s, %acqwait, acqrtry/s, and rtrysuc/s) every three seconds until ten samples have been taken:

gds_lock_print -ia 3 10

Advance To: