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.
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 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:
The SnapShot() function can be used to retrieve lock details. See the discussion of the SNAPSHOT.FCS file format for details.
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). |