kmbucket subcommand

The kmbucket subcommand prints kernel memory allocator buckets.

Format

kmbucket [-l] [-c cpu] [-i index] [effectiveaddress]

kmbucket -k effectiveaddress

kmbucket -s

Parameters

Item Description
-l Displays the bucket free list.
Restriction: You must specify the -l flag with the -c cpu or -s flags, because kmbucket -l does not show any output.
-c cpu Displays only buckets for the specified processor. Specify the cpu parameter as a decimal value.
-i index Displays only the bucket for the specified index. The index is specified as a decimal value.
effectiveaddress Specifies the effective address of the kmembucket structure to display. Use symbols, hexadecimal values, or hexadecimal expressions to specify the address.
-k Displays the kmemusage structure associated with the effectiveaddress.
-s Displays the netkmem structure.

If no arguments are specified, information is displayed for all allocator buckets for each processor.

Other

bucket

Examples

The following is an example of how to use the kmbucket subcommand:

KDB(0)> kmbucket -c 0 -i 11

displaying kmembucket for cpu 0 offset 11 size 0x00000800

address...............F10006000BD8BD48  b_next..(x)...........F100061002AD1000
b_calls..(x)..........0000000000001405  b_total..(x)..........000000000000080A
b_totalfree..(x)......0000000000000006  b_elmpercl..(x).......0000000000000002
b_highwat..(x)........00000000000007AD  b_couldfree (sic).(x).0000000000000000
b_failed..(x).........0000000000000000  b_delayed.............0000000000000000
lock............... @ F10006000BD8BD90  lock..(x).............0000000000000000
delta.................FFFFFFFFFFFFD800
KDB(0)> kmbucket F10006000BD8BD48 //address field from above

displaying kmembucket for cpu 0 offset 11 size 0x00000800

address...............F10006000BD8BD48  b_next..(x)...........F100061002ACB000
b_calls..(x)..........0000000000001407  b_total..(x)..........000000000000080A
b_totalfree..(x)......0000000000000005  b_elmpercl..(x).......0000000000000002
b_highwat..(x)........00000000000007AD  b_couldfree (sic).(x).0000000000000000
b_failed..(x).........0000000000000000  b_delayed.............0000000000000000
lock............... @ F10006000BD8BD90  lock..(x).............0000000000000000
delta.................FFFFFFFFFFFFE000

Bucket free list.....
  1 next........F100061002ACB000 prev...00000000,
    kmemusage...F10006000BE08308 [000B 0002 00000000]
  2 next........F100061002AE0800 prev...F100061002ACB000,
    kmemusage...F10006000BE08500 [000B 0001 00000000]
  3 next........F100061002AC8000 prev...F100061002AE0800,
    kmemusage...F10006000BE082C0 [000B 0002 00000000]
  4 next........F100061002AC8800 prev...F100061002AC8000,
    kmemusage...F10006000BE082C0 [000B 0002 00000000]
  5 next........F100061002ACB800 prev...F100061002AC8800,
    kmemusage...F10006000BE08308 [000B 0002 00000000]
KDB(0)> kmbucket -k F100061002ACB000  //one of the next fields from above
This address belongs to the following kmemusage structure :
  kmemusage address.....F10006000BE08308
  ku_indx.....0000000B  free/page cnt.....00000002  ku_cpu.....00000000
KDB(0)>