lk, slk, clk, and dlk subcommands
The lk (display lock_t lock), slk (display simple lock), clk (display complex lock) and dlk (display dist lock) subcommands can be used to display information about locks.
Note: The dlk subcommand is only available with
the 64-bit kernel.
Format
lk [ lock_address ]
slk [-q] [ lock_address ]
clk [-q] [ lock_address ]
dlk [-q] [ lock_address ]
Parameters
Item | Description |
---|---|
lock_address | Specifies the address of the lock. Symbols, hexadecimal values, and hexadecimal expressions can be used to specify the address. |
-q | Keeps instrumentation information from displaying. If instrumentation is set at boot time and the -q option is not entered, slk, clk, and dlk show instrumentation information. |
If no parameter is given, a default list of locks is displayed.
Other
No aliases.
Examples
Instrumentation is set to on by using the -L option of the bosboot command. The following is an example of how to use the lk, slk, clk and dlk subcommands with instrumentation set to on:
KDB(0)> lk //show status of default list of locks
Major Locks:
acct_lock Available
03E6B180
lock F100109E0866D280 INTERLOCK
cpu_owner............... 00000000 @ F100109E0866D280
audit_lock Available
audit_q_lock Available
audit_w_lock Available
03BC50F8 Available
bio_lock Available
bus_reg_lock Available
cio_lock Available
clist_lock Available
cons_lock Available
core_lock Available
cred_alloc_lock Available
cs_lock Available
ctrace_lock Available
devswlock
lock F100109E0802AF30
thread_owner............ 0802AF30 @ pvthread+7802A00
dil_lock Available
(0)> more (^C to quit) ? ^C //interrupt
KDB(0)> lk acct_lock //show lock_t lock acct_lock
acct_lock Available
KDB(0)> nm acct_lock //show address of acct_lock
Symbol Address : 0149CF00
TOC Address : 0149A2D0
KDB(0)> lk 0149CF00 //show acct_lock using address
acct_lock Available
KDB(0)> slk cio_lock //show simple lock cio_lock
cio_lock Available
Instrumented lock...... @ F100109E0801A0E0
................lockname: FFFFFFFF
KDB(0)> slk -q cio_lock //show cio_lock without instrumentation
cio_lock Available
KDB(0)> clk jfs_quota_lock //show complex lock jfs_quota_lock
jfs_quota_lock Available
Instrumented lock...... @ F100109E0C006EA0
................lockname: FFFFFFFF
KDB(0)> clk -q jfs_quota_lock //show jfs_quota_lock without instrumentation
jfs_quota_lock Available
KDB(0)> dlk wlm_classes_lock //show dist lock wlm_classes_lock
wlm_classes_lock
mutex............... F100109E0C000050 write owner ........ 0000000000000000
writer await........ FFFFFFFFFFFFFFFF count............... 0000000000000000
writer wait reader.. FFFFFFFFFFFFFFFF count............... 0000000000000000
reader await........ FFFFFFFFFFFFFFFF count............... 0000000000000000
readers active...... 0000000000000000 reader counter.....@ F10010F004056080
node interlace...... 0000000000000200 instrumented.......@ F100109E08017ED0
cpg shift......................... 00 cpu groups........................ 02
grp shift......................... 01 grp mask.......................... 01
Group counters:
SRAD ID: 0000
Group 00............ 0000000000000000 @ F10010F004056080
Group 01............ 0000000000000000 @ F10010F004056100
Instrumented lock...... @ F100109E08017ED0
................lockname: 00000000
KDB(0)> dlk -q wlm_classes_lock //show wlm_classes_lock without instrumentation
wlm_classes_lock
mutex............... F100109E0C000050 write owner ........ 0000000000000000
writer await........ FFFFFFFFFFFFFFFF count............... 0000000000000000
writer wait reader.. FFFFFFFFFFFFFFFF count............... 0000000000000000
reader await........ FFFFFFFFFFFFFFFF count............... 0000000000000000
readers active...... 0000000000000000 reader counter.....@ F10010F004056080
node interlace...... 0000000000000200 instrumented.......@ F100109E08017ED0
cpg shift......................... 00 cpu groups........................ 02
grp shift......................... 01 grp mask.......................... 01
Group counters:
SRAD ID: 0000
Group 00............ 0000000000000000 @ F10010F004056080
Group 01............ 0000000000000000 @ F10010F004056100