Product Documentation

Knowledgebase

Previous Topic

Next Topic

Monitoring FairCom DB Lock Table

FairCom DB uses a memory-resident lock table for managing locks on FairCom DB data records. The following sections discuss options for monitoring the state of the server’s lock table.

In This Section

LockDump API Options

SnapShot API Options

SystemConfiguration API Options

Previous Topic

Next Topic

LockDump API Options

The FairCom DB API function LockDump() creates a diagnostic dump of the FairCom DB internal lock table. Locks can be dumped for a particular file or user or for all files in the system.

For a FairCom DB with snapshot support enabled, the LockDump() function also logs disk I/O statistics for each file included in the lock dump. These disk I/O statistics consist of the number of read and write operations and bytes read and written for each file.

Below is sample lock dump output for the c-tree data file mark.dat:

----------------

----------------

mark.dat>>

0000-00094480x T013 write/1: W18 W19

0000-00094580x T014 write/1

0000-00094200x T010 write/1

0000-00094600x T012 write/1

cumulative lock attempts: 9462(4731) blocked: 0(0) dead-lock: 0 denied: 0

Current file lock count: 4

----------------

cumulative I/O: read ops: 76 bytes: 614528 write ops: 38 bytes: 614400

The output shows four write locks held on mark.dat. The log lists the following details for each lock currently held on a file:

  • The record offset of the locked record (0000-00094480x)
  • The ID of the thread that is holding the lock (T013)
  • The type of lock (write/1)
  • The IDs of any threads that are waiting to acquire the lock (W018 W019)

The possible lock types are shown in the following table. Note that the first 5 lock types in the table are supported only for a FairCom DB built with strict serialization support:

Lock Type

Explanation

SS open

SS (strict serializer) logical Open lock

SS commit intent

SS commit intent lock

SS commit

SS commit lock

NS commit intent

NS (nonstrict serializer) commit intent lock

NS commit

NS commit lock

read

Read lock

write/1

Exclusive write lock

write/2

Exclusive write lock (no aggregate check)

See also:

Previous Topic

Next Topic

SnapShot API Options

The SnapShot() function can be used to retrieve lock details. See the discussion of the SNAPSHOT.FCS file format for details.

Previous Topic

Next Topic

SystemConfiguration API Options

The SystemConfiguration() function can be used to display the current number of pending locks:

Array Subscript

Explanation

cfgNET_LOCKS

Current number of pending locks (system wide).

TOCIndex