Home | Previous Page | Next Page   Administrative Utilities > The onstat Utility >

onstat -k

Use the -k option to display information about active locks.

Example Output

Figure 102. onstat -k Output
IBM Informix Dynamic Server Version 10.00.UC1  -- On-Line -- Up 03:55:17 -- 15360 Kbytes

Locks
address  wtlist   owner    lklist   type     tblsnum  rowid    key#/bsiz
a095f78  0        a4d9e68  0        HDR+S    100002   203         0   
 1 active, 2000 total, 2048 hash buckets, 0 lock table overflows
Output Description

You can interpret output from this option as follows:

address
Is the address of the lock in the lock table

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.

wtlist
Is the first entry in the list of user threads that is waiting for the lock, if there is one
owner
Is the shared-memory address of the thread that is holding the lock

This address corresponds to the address in the address field of onstat -u (users) output.

lklist
Is the next lock in a linked list of locks held by the owner just listed
type
Uses the following codes to indicate the type of lock:
HDR
Header
B
Bytes
S
Shared
X
Exclusive
I
Intent
U
Update
IX
Intent-exclusive
IS
Intent-shared
SIX
Shared, intent-exclusive
tblsnum
Is the tblspace number of the locked resource. If the number is less than 10000, it indicates Enterprise Replication pseudo locks.
rowid
Is the row identification number

The rowid provides the following lock information:

  • If the rowid equals zero, the lock is a table lock.
  • If the rowid ends in two zeros, the lock is a page lock.
  • If the rowid is six digits or fewer and does not end in zero, the lock is probably a row lock.
  • If the rowid is more than six digits, the lock is probably an index key-value lock.
key#/bsiz
Is the index key number, or the number of bytes locked for a VARCHAR lock

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.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]