Retrieve lock information by file or by user.
Note: Dumping large quantities of locks in a very active system could affect performance.
Filelocks
For the -filelocks report:
Example
>ctstat -filelocks custmast.dat -u ADMIN -p ADMIN -s FAIRCOMS -i 1 1
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. Because the records used to generate the key are locked by other users, there is no guaranteed relationship between the lock and the displayed key. The following are possible scenarios:
Userlocks
For the -userlocks report:
Example
To identify all locks and associated files held by Task ID 23
>ctstat -userlocks 23 -u ADMIN -p ADMIN -s FAIRCOMS -i 1 1
./cxd01.dat
---
./cxd03.dat
---
./cxd05.dat
---
./cxd23.dat
0x0000000000004dd1 Write 25 0 ADMIN
To identify all locks and associated files held by user SALLY
>ctstat -userlocks SALLY -u ADMIN -p ADMIN -s FAIRCOMS -i 1 1
./cxd01.dat
0x00000000000055e5 Write 21 0 ADMIN
./cxd04.dat
0x0000000000004dd1 Write 25 0 ADMIN
./cxd10.dat
0x0000000000004dd1 Write 24 0 ADMIN
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.