Product Documentation

c-treeACE V10.3 Update Guide

Previous Topic

Next Topic

ctstat: List file and user lock information

Added functionality to ctstat to retrieve lock information by file or by user. The ctstat -filelocks datafile and ctstat -userlocks user reports have been added.

For the -filelocks report:

  • -filelocks file [N] lists all locks on a data file. Displays the Nth key. Keys are displayed in hexadecimal format following each lock.
  • See -filelocks Notes below.

For the -userlocks report:

  • If UserID is a number, it is interpreted as a task ID.
  • If UserID is a string, it is interpreted as a name, and information on locks held by each task ID with a matching name is returned.

Dumping large quantities of locks in a very active system could affect performance. Because the -userlocks report may generate a large number of server calls (for each task ID and file), the -userlocks report interval may be increased up to 60 seconds, depending on the number of matching users and files involved.

-filelocks Notes

The -filelocks option lists all locks on a data file and, optionally, displays the Nth key. The lock offset and the associated keys are not read at the same time. Since we are reading records locked by other users to generate the key, there is no guaranteed relationship between the lock and the displayed key. The following are possible scenarios:

  1. The displayed key is from before or after any changes made by the lock holder.
  2. The locked offset no longer holds a valid record (it has been deleted, or updated and moved).
  3. The locked offset could have been locked/modified/unlocked more than once between the time the lock offset was acquired and the time the record is read, so the offset could hold an entirely different record than what was originally locked.

TOCIndex