dumplock, ltest - Lock Status Display


dumplock [{-d database}|{-F lockFile}] [-v] [--out lockFile]
dumpshared [-d database] --out lockFile

ltest -d database

The programs dumplock and ltest allow one to see the current state of the locks on database. dumplock produces a single verbose snapshot, while ltest displays a screen full of information which is updated periodically.

Running dumplock will print the current locks held by various processes. The locks can be for the database given by -d (default current dir), or from a previously saved lock file given by -F. The --out option (added in version 7.07.1566400000 20190821) will also write the lock structure to the given file; this can be used to snapshot the locks for later diagnosis by tech support or via the -F option. In version 7.07.1566400000 20190821 and later, dumplock will not register with, nor (re-)create nor modify/fix the lock structure (shared memory, semaphore, file mapping, mutex etc.) while attempting access, in order to better aid tech support diagnosis of damaged/corrupt locks. Also in these versions, if the semaphore is nonexistent, or unobtainable after a certain timeout ([Monitor] Semaphore Timeout), dumplock will continue if possible, with a warning. The -v option will print more verbose lock information.

The dumpshared program is similar to dumplock, except that no output is printed, and the structure is not locked when copied to the --out file. This has the advantage of no delay waiting for the semaphore or mutex, but the disadvantage that the lock structure may be snapshotted while in flux, and thus appear to be corrupt when it is not.

The information ltest displays is explained below. On the first line is the version of Texis, the semaphore being used for this database, how many usable locks are available, and the current system time. The second line contains the number of connections to the database. Following that is a number of lines containing information about the servers connected to the database. The three columns are server id, process id and state. Ltest identifies itself in this list. Following the connection information is more detailed information for each table being locked. The more detailed information consists of the name of the table, and it's state.

The state consists of a list of letters, one for each lock associated with the table. Upper case letters signify granted locks, and lower case letters show locks that have not been granted. The meaning of each letter is as follows.

f A lock for which no type has been specified yet.
R A table read lock.
W A table write lock.
I An index read lock.
X An index write lock.

ltest will recognize the following keys, and perform the specified action.

0-9 Sets the update interval to the number of seconds specified.
+ See the next column of servers
- See the previous column of servers
Ctrl-L Refresh the screen
n Toggle showing process command lines (if possible) instead of PIDs
t Each press toggles to the next of 3 lock-time displays. The default is not to display lock times. Pressing t once displays the last table and index lock for each listed table, relative to now. Pressing t again displays those times in absolute (wall-clock) form. Pressing t again reverts to the default (no lock-time display). Added in version 4.02.1046213372 Feb 25 2003.
C Switch display to chkind mode
L Switch display to ltest mode
h Show help for keys
q Exit ltest

ltest uses one connection to the database, so this should be taken into account when looking at the information.

Copyright © Thunderstone Software     Last updated: Oct 5 2023
Copyright © 2023 Thunderstone Software LLC. All rights reserved.