The onstat -k command displays information about active locks.
The following example shows output from the onstat -k command:
Locks address wtlist owner lklist type tblsnum rowid key#/bsiz a095f78 0 a4d9e68 0 HDR+S 100002 203 0
In the following output, the number 2 in the last row shows an Enterprise Replication pseudo lock:
Locks address wtlist owner lklist type tblsnum rowid key#/bsiz a197ff8 0 5c2db4a8 0 S 100002 204 0 a198050 0 5c2db4a8 a197ff8 S 100002 205 0 a198260 0 5c2f2248 0 S 100002 204 0 a198470 0 5c2e6b78 a198520 S 100002 205 0 a198520 0 5c2e6b78 0 S 100002 204 0 a1986d8 0 5c2ec6e0 a198ba8 S 100002 205 0 a198ba8 0 5c2ec6e0 0 S 100002 204 0 a1993e8 0 5c2f03d0 a19be30 S 2 1c05a 0
You can interpret output from this option as follows:
If a user thread is waiting for this lock, the address of the lock appears in the wait field of the onstat -u (users) output.
This address corresponds to the address in the address field of onstat -u (users) output.
The rowid provides the following lock information:
If this field contains 'K-' followed by a value, it is a key lock. The value identifies which index is being locked. For example, K-1 indicates a lock on the first index defined for the table.
The maximum number of locks available is specified as LOCKS in the ONCONFIG file.