KDB PDF
KDB PDF
AIX Version 6.1
Note
Before using this information and the product it supports, read the information in “Notices” on page 335.
This edition applies to AIX Version 6.1 and to all subsequent releases and modifications until otherwise indicated in
new editions.
© Copyright IBM Corporation 2004, 2015.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this document . . . . . . . . vii CPU start and stop subcommands . . . . . . . 50
Highlighting . . . . . . . . . . . . . . vii start and stop subcommands . . . . . . . 50
Case-sensitivity in AIX . . . . . . . . . . vii Basic display subcommands . . . . . . . . . 51
ISO 9000 . . . . . . . . . . . . . . . vii f subcommand . . . . . . . . . . . . 51
status subcommand . . . . . . . . . . 55
KDB kernel debugger and kdb command 1 stat subcommand . . . . . . . . . . . 55
pr subcommand . . . . . . . . . . . . 56
What's new in KDB kernel debugger and kdb
symptom subcommand . . . . . . . . . 59
command . . . . . . . . . . . . . . . 1
Memory register display and decode subcommands 60
KDB kernel debugger . . . . . . . . . . . 2
d, dw, dd, dp, dpw, and dpd subcommands . . 60
Invoking the KDB kernel debugger . . . . . . 3
dc and dpc subcommands . . . . . . . . 61
The kdb command . . . . . . . . . . . 4
di subcommand . . . . . . . . . . . . 63
The debugger prompt . . . . . . . . . . . 6
dr subcommand . . . . . . . . . . . . 63
Online help . . . . . . . . . . . . . . 6
ddvb, ddvh, ddvw, ddvd, ddpb, ddph, ddpw,
Registers. . . . . . . . . . . . . . . 7
and ddpd subcommand . . . . . . . . . 65
Expressions . . . . . . . . . . . . . . 9
Memory search and extract subcommands . . . . 67
User-defined variables . . . . . . . . . . 9
find and findp subcommands . . . . . . . 67
Command line editing. . . . . . . . . . 10
ext and extp subcommands . . . . . . . . 68
Multiprocessor systems . . . . . . . . . 11
Memory modification subcommands . . . . . . 70
Viewing and modifying global data . . . . . . 11
m, mw, md, mp, mpw, and mpd subcommands 70
Method 1: Using the symbol name. . . . . . 11
st, stc, and sth subcommands . . . . . . . 72
Method 2: Using the TOC and map file . . . . 12
mdvb, mdvh, mdvw, mdvd, mdpb, mdph,
Method 3: Using the map file . . . . . . . 14
mdpw, mdpd subcommands. . . . . . . . 73
Viewing stack traces . . . . . . . . . . . 15
mr subcommand . . . . . . . . . . . 74
Stack frame format . . . . . . . . . . . 15
Breakpoint and steps subcommands . . . . . . 75
Verbose stack output . . . . . . . . . . 17
b subcommand . . . . . . . . . . . . 76
Setting breakpoints . . . . . . . . . . . . 18
lb subcommand . . . . . . . . . . . . 77
Method 1: Using the lke subcommand . . . . 18
c, lc, and ca subcommands . . . . . . . . 78
Method 2: Using the nm subcommand . . . . 19
r and gt subcommands . . . . . . . . . 79
Method 3: Using the kmid pointer . . . . . . 20
n, s, S, and B subcommand . . . . . . . . 80
Method 4: Using the devsw subcommand . . . 20
Debugger trace points subcommands . . . . . . 82
Subcommand lists . . . . . . . . . . . . 22
bt subcommand . . . . . . . . . . . . 82
Alphabetic list . . . . . . . . . . . . 22
test subcommand . . . . . . . . . . . 84
Task category list . . . . . . . . . . . 30
cat and ct subcommands . . . . . . . . . 85
End user subcommands . . . . . . . . . . 32
Watch DABR subcommands . . . . . . . . . 86
h subcommand . . . . . . . . . . . . 32
wr, ww, wrw, cw, lwr, lww, lwrw, and lcw
set subcommand . . . . . . . . . . . 33
subcommands . . . . . . . . . . . . 86
dbgopt subcommand . . . . . . . . . . 36
Branch target subcommands . . . . . . . . . 87
varset subcommand . . . . . . . . . . 36
btac, cbtac, lbtac, lcbtac subcommands . . . . 87
varlist subcommand . . . . . . . . . . 37
Namelist and symbols subcommands. . . . . . 89
varrm subcommand . . . . . . . . . . 38
nm and ts subcommands . . . . . . . . . 89
his subcommand . . . . . . . . . . . 38
ns subcommand . . . . . . . . . . . . 89
debug subcommand . . . . . . . . . . 39
which subcommand . . . . . . . . . . 90
! subcommand . . . . . . . . . . . . 40
PCI configuration space and I/O debugging
Leaving kdb subcommands . . . . . . . . . 41
subcommands . . . . . . . . . . . . . 91
e subcommand . . . . . . . . . . . . 41
dpcib, dpcih, and dpciw subcommand . . . . 91
reboot subcommand . . . . . . . . . . 42
mpcib, mpcih, and mpciw subcommands . . . 91
halt subcommand . . . . . . . . . . . 42
buserr subcommand . . . . . . . . . . 93
Changing context subcommands . . . . . . . 43
businfo subcommand . . . . . . . . . . 95
sw subcommand . . . . . . . . . . . 43
Display kernel data structures subcommands . . . 97
cpu subcommand . . . . . . . . . . . 45
var subcommand . . . . . . . . . . . 97
ctx subcommand . . . . . . . . . . . 46
drvars subcommand . . . . . . . . . . 98
runcpu subcommand . . . . . . . . . . 48
ipl subcommand. . . . . . . . . . . . 99
Calculator and converter subcommands . . . . . 49
devsw subcommand . . . . . . . . . . 100
hcal and dcal subcommands . . . . . . . . 49
intr subcommand . . . . . . . . . . . 101
conv subcommand . . . . . . . . . . . 49
Display RBAC subcommands . . . . . . . . 102
Contents v
vi AIX Version 6.1: KDB kernel debugger and kdb command
About this document
This document describes how to use the KDB kernel debugger and the kdb command to debug an
operating system image. It describes how to examine a stopped kernel in the KDB kernel debugger, as
well as how to examine a system dump file by using the kdb command. It provides a reference for the
commands that are used to debug the kernel, device drivers, and other kernel extensions for the AIX®
operating system. Topics include setting breakpoints within the kernel or in kernel extensions, displaying
and modifying data structures and instructions, altering system registers, and performing traces. Specific
information (for example, syntax and description) is given for each subcommand.
Highlighting
The following highlighting conventions are used in this document:
Item Description
Bold Identifies commands, subroutines, keywords, files, structures, directories, and other items whose names are
predefined by the system. Also identifies graphical objects such as buttons, labels, and icons that the user
selects.
Italics Identifies parameters whose actual names or values are to be supplied by the user.
Monospace Identifies examples of specific data values, examples of text similar to what you might see displayed,
examples of portions of program code similar to what you might write as a programmer, messages from
the system, or information you should actually type.
Case-sensitivity in AIX
Everything in the AIX operating system is case-sensitive, which means that it distinguishes between
uppercase and lowercase letters. For example, you can use the ls command to list files. If you type LS, the
system responds that the command is not found. Likewise, FILEA, FiLea, and filea are three distinct file
names, even if they reside in the same directory. To avoid causing undesirable actions to be performed,
always ensure that you use the correct case.
ISO 9000
ISO 9000 registered quality systems were used in the development and manufacturing of this product.
Although they appear similar to the user, the KDB kernel debugger and the kdb command are two
separate tools:
KDB kernel debugger
The KDB kernel debugger is integrated into the kernel and allows full control of the system while
a debugging session is in progress. The KDB kernel debugger allows for traditional debugging
tasks such as setting breakpoints and single-stepping through code.
kdb command
This command is implemented as an ordinary user-space program and is typically used for
post-mortem analysis of a previously-crashed system by using a system dump file. The kdb
command includes subcommands specific to the manipulation of system dumps.
Both the KDB kernel debugger and kdb command allow the developer to display various structures
normally found in the kernel's memory space. Both do the following:
v Provide numerous subcommands to decode various data structures found throughout the kernel.
v Print the data structures in a user-friendly format.
v Perform debugging at the machine instruction level. Although this is less convenient than source level
debugging, it allows the KDB kernel debugger and the kdb command to be used in the field where
access to source code might not be possible.
v Process the debugging information found in XCOFF objects. This allows the use of symbolic names for
functions and global variables.
In this PDF file, you might see revision bars (|) in the left margin that identifies new and changed
information.
March 2015
The following information is a summary of the updates made to the KDB kernel debugger and the kdb
command topic collection:
v Added three new subcommands: proc, thread, and user
v The subcommand tpid is updated.
November 2013
The following information is a summary of the updates made to the KDB kernel debugger and the kdb
command topic collection:
v Removed references to versions of the AIX operating system that are no longer supported.
The following information is a summary of the updates made to the KDB kernel debugger and the kdb
command topic collection:
v The subcommand cdt is updated.
May 2011
The following information is a summary of the updates made to the KDB kernel debugger and the kdb
command topic collection:
v A new subcommand sctpcb is added to the list of Network subcommands.
v The command sockinfo is updated.
KDB kernel debugger is always loaded into a special region of pinned memory where the effective
address space equals the real address space. The KDB kernel debugger runs with memory translation
turned off. This allows it to function even if the VMM subsystem is not yet initialized or the critical
VMM structures are corrupted. However, the KDB kernel debugger can perform the same address
translations normally performed by the processor. This allows the user to view data by effective
addresses when the processor has its memory translation turned off.
When the KDB kernel debugger is invoked by a condition, it is the only running program. All other
processes are stopped and processor interrupts are disabled. One of the processors is designated as the
debug processor and that processor runs the KDB kernel debugger. This is usually the processor on
which an unusual activity occurred (for example, an unhandled exception).
If the KDB kernel debugger is invoked manually by the user, the debug processor is arbitrarily chosen.
The KDB kernel debugger stops all other processors in the system by sending an interprocessor interrupt
(IPI) to each processor. If any of these processors cannot be stopped, the KDB kernel debugger prints a
warning message. For example, if a processor is spinning on a lock with interrupts disabled, it cannot
process the IPI sent by the KDB kernel debugger.
The KDB kernel debugger is mostly self-contained and does not rely on other kernel components such as
the network and video drivers. The KDB kernel debugger runs with its own Machine State Save Area
(mst) and a special stack. This requires that some kernel code be duplicated within KDB kernel debugger.
Duplication allows the developer to debug from almost anywhere within the kernel code. Unless the
KDB kernel debugger is entered through a system halt, processors resume normal operation and
interrupts are re-enabled when the developer exits the KDB kernel debugger.
When it is invoked, the KDB kernel debugger takes control of either the virtual terminal (vterm) on a
logical partitioning system, or a physical RS232 serial port on a non-logical partitioning system. This
requires a Hardware Management Console (HMC) to access the vterm or another system connected to the
serial port on the system being debugged. The KDB kernel debugger requires the connection in order to
send messages to the developer.
The complete list of subcommands available for the KDB kernel debugger and kdb command are
included in “Subcommand lists” on page 22.
For information on how to invoke the kdb command, see “Invoking the kdb command” on page 5.
The KDB kernel debugger must be loaded at boot time. This requires that a boot image be created with
the debugger enabled. To enable the KDB kernel debugger, use either the -I or -D options of the bosboot
command.
Note:
1. bosboot commands build boot images using the KDB kernel debugger. The boot image is not used
until the machine is restarted.
2. External interrupts are disabled while the KDB kernel debugger is active.
3. If invoked during system initialization, the g subcommand must be issued to continue the
initialization process.
For more information on the bosboot command, see Commands Reference, Volume 1
Enter the KDB kernel debugger using one of the following procedures:
v On a tty keyboard, press the Ctrl+4 key sequence for IBM® 3151 terminals or the Ctrl+\ key sequence
for BQ 303, BQ 310C, and WYSE 50 terminals.
v On other keyboards, press the Ctrl+Alt+Numpad4 key sequence.
v Set a breakpoint using one of the “Breakpoint and steps subcommands” on page 75.
v Call the brkpoint subroutine from the C code. The syntax for calling this subroutine is the following:
brkpoint();
Note: The system enters the debugger if a system halt is caused by a fatal system error. In such a case,
the system creates a log entry in the system log and if the KDB kernel debugger is available, it is called.
A system dump might be generated when you exit from the debugger.
If the kernel debug program is not available when you type in a key sequence, you must load the kernel
debug program.
For more information about loading the kernel debug program, see “Loading and starting the KDB kernel
debugger.”
Note: If either of the previous dw subcommands returns a 0, the KDB kernel debugger is not available.
After the KDB kernel debugger is invoked, the subcommands detailed in “Subcommand lists” on page 22
are available.
Note: If you are using the HMC, KDB kernel debugger can be accessed using a virtual terminal. For
more information, see the Hardware Management Console Installation and Operations Guide (SA38 – 0590).
The KDB kernel debugger only supports display to an ASCII terminal connected to a native serial port.
Displays connected to graphics adapters are not supported. The KDB kernel debugger uses its own device
driver for handling the display terminal. It is possible to connect a serial line between two machines and
define the serial line port as the port for the console. In that case, the cu command can be used to
connect to the target machine and run the KDB kernel debugger.
Note: If a serial device, other than a terminal connected to a native serial port, is selected by the kernel
debugger, the system might appear to hang.
Note: Only the root user can use the kdb command to analyze a running system.
v A system dump file produced by a previously crashed-system.
When a system crashes, the system dump image is created with memory translation turned on. As a
result, any physical memory not mapped to the effective address space at the time of the dump cannot
be included in the dump file. Only the memory belonging to the process that was running on the
processor that created the dump image can be included in the dump file. Because all addresses within
the system dump are already effective addresses, the kdb command does not perform its internal
address translation.
A system dump contains certain critical data structures. A system dump does not contain the entire
effective address space. The kdb command might not be able to view certain memory regions. If
someone attempts to access a memory address not included in the dump, the kdb command prints a
warning message.
Note: The cdt subcommand or the -v command-line option can be used to determine exactly which
regions of the effective address space are included in the system image. For more information about
the CDT subcommand, see “cdt subcommand” on page 276. For more information about the -v
command line option, see “kdb command” on page 324.
The kdb command contains a subset of the subcommands found in the KDB kernel debugger.
Subcommands for setting breakpoints and single-stepping through code are not available in the kdb
command. Because the kdb command is implemented as an ordinary user-space program, it has no
control over the processors in a system. Similarly, any subcommands that directly access hardware (for
example, the PCI subcommands) are not available. When you work with a system dump, any
subcommands that modify memory are not valid because the system dump is merely a snapshot of the
real memory in a system.
The complete list of subcommands available for the KDB kernel debugger and kdb command are
included in “Subcommand lists” on page 22.
To analyze a running system, the kdb command is simply invoked from the UNIX shell prompt without
any command line arguments.
Note: Because the kdb command makes use of the /dev/pmem special file when analyzing a running
system, only the root user can invoke the command in this manner.
A side effect of analyzing the running system with the kdb command is that the currently running
process as displayed with the p * subcommand, often appears to be the kdb command itself. This occurs
because the kdb command can only read the /dev/pmem special file when it is the current process on one
of the processors in the system.
When you are analyzing a system dump file, the kdb command must be started with command line
arguments that specify the location of the dump files and the kernel files as shown in the following
example:
# kdb /var/adm/ras/vmcore.0 /unix
For more information about creating system dumps, see System Dump Facility in Kernel Extensions and
Device Support Programming Concepts.
For more information about invoking the KDB kernel debugger, see “Invoking the KDB kernel debugger”
on page 3.
On a uniprocessor system, the KDB kernel debugger prompt is KDB(0)> and the kdb command prompt is
(0)>. When you are debugging a multiprocessor system, the number enclosed in parentheses indicates
the processor that is being debugged. Many subcommands, such as those that display or modify
registers, apply only to the current processor.
As shown in the following example, the cpu subcommand can be used to change the current processor:
(0)> dr r1
r1 : 2FF3B338 2FF3B338
(0)> cpu 1
(1)> dr r1
r1 : 2FF3AA20 2FF3AA20
(1)>
Many subcommands can produce a large amount of output. To keep the output from scrolling off the
screen, the debugger implements a pager which displays a more (^C to quit) ? prompt after each full
screen of data. When you see the prompt, you can do one of the following:
v Press the space bar to view the next line of output.
v Press the Enter key to view the next page of output.
v Press Ctrl+C to abort the current subcommand and return to the main debugger prompt.
The pager is controlled with the set subcommand using the screen_size and scroll options. For more
information, see the “set subcommand” on page 33.
Online help
The help subcommand can be typed at any time to display a list of all available subcommands and a
one-line description of each of the subcommands.
Many subcommands also allow a -? parameter that displays a more detailed description of that
subcommand. For example, to see a list of display context subcommands, type the following at the
command prompt:
help display context
For example, to see a list of parameters for the p subcommand and a brief description of what the
parameter does, type the following at the command prompt:
p -?
For an alphabetic list of the subcommands, see “Subcommand lists” on page 22. Because the -?
parameter is available with most subcommands, this parameter is not included in the detailed
subcommand descriptions found in this book.
Registers
Register values can be referenced by the KDB kernel debugger and the kdb command.
Register values can be used in subcommands by preceding the register name with an at sign (@). This
character is also used to dereference addresses as described in “Expressions” on page 9. Registers that can
be referenced include the following:
Register Description
asr Address space register
cr Condition register
ctr Count register
dar Data address register
dec Decrementer
dsisr Data storage interrupt status register
fp0-fp31 Floating point registers 0 through 31
fpscr Floating point status and control register
iar Instruction address register
lr Link register
mq Multiply quotient
msr Machine State register
r0-r31 General Purpose Registers 0 through 31
rtcl Real Time clock (nanoseconds)
rtcu Real Time clock (seconds)
Other special purpose registers that can be referenced, if they are supported on the hardware, include the
following:
v sprg0
v sprg1
v sprg2
v sprg3
v pir
v fpecr
v ear
v pvr
v hid0
v hid1
v iabr
v dmiss
v imiss
v dcmp
v icmp
v hash1
v hash2
v rpa
v buscsr
v l2cr
v l2sr
v mmcr0
v mmcr1
v pmc1
v pmc2
v pmc3
v pmc4
v pmc5
v pmc6
v pmc7
v pmc8
v sia
Expressions
The KDB kernel debugger and kdb command can parse a limited set of expressions. Expressions can only
contain symbols, hexadecimal constants, references to register or memory locations, and operators.
The + and - operators have equal precedence. Likewise, the * / % and ^ operators have equal precedence
with each other. Multiple operators with the same precedence are always evaluated from left to right in
an expression. The following are examples:
Valid Expressions Results
dw @r1 Displays data at the location pointed to by r1.
dw @@r1 Displays data at the location pointed to by value at location pointed to by r1.
dw open Displays data at the address beginning of the open routine.
dw open+12 Displays data twelve bytes past the beginning of the open routine.
Invalid Expressions Problem
dw r1 Must include the at sign (@) to reference the contents of r1, If a symbol r1 existed, this
would be valid.
User-defined variables
Both the KDB kernel debugger and the kdb command allow for user-defined variables. These variables
can be used to provide a custom name for a memory address or an alias for a commonly used
subcommand.
Any time a user variable expansion takes place at the debugger prompt, the expanded command line is
printed between the << and >> marks.
The set subcommand can be used to select the edit mode. The edit mode determines the set of key
bindings that is currently active.
Regardless of which editing mode is used, the Ctrl+S and the Ctrl+Q key sequences are always available.
The Ctrl+S key sequence pauses the debugger's output to the screen and the Ctrl+Q key sequence causes
the output to continue to resume the screen display.
If the emacs or gmacs mode is active, the following key bindings are supported:
Key Sequence Associated Action
Ctrl+F Move the cursor one character forward.
Ctrl+B Move the cursor one character backward.
Ctrl+A Move the cursor to the beginning of the command line.
Ctrl+E Move the cursor to the end of the command line.
Ctrl+P Display the previous command in the history buffer.
Ctrl+N Display the next command in the history buffer.
Ctrl+D Delete the character at the cursor position.
Ctrl+U Delete the entire command line.
Ctrl+T In emacs mode, transpose the current and previous characters. In gmacs mode, transpose the previous
two characters.
In addition the emacs and gmacs modes, allow a repeat count to be used with several of the above key
sequences. If the Esc key is pressed followed by one or more numbers, and finally one of the above Ctrl
key sequences is pressed, then the numbers following the Esc key are interpreted as a repeat count for
the final Ctrl key sequence.
Note: Any vi subcommands that begin with a colon are not supported.
For more information about vi subcommands, see vi subcommands in Commands Reference, Volume 6.
Multiprocessor systems
On multiprocessor systems, entering the KDB kernel debugger stops all processors except the current
processor running the debug program itself.
On multiprocessor systems, the number in parentheses that is part of the prompt indicates the current
processor. For example:
v For the following prompt, KDB(0)>, the number 0 is contained in parentheses and is the current
processor.
v For the following prompt, KDB(5)>, the number 5 is contained in parentheses and is the current
processor.
In addition to the change in the prompt for multiprocessor systems, there are also subcommands that are
unique to these systems. For more information about the subcommands that can be used on
multiprocessor systems, see “Subcommand lists” on page 22. The subcommands that are unique to
multiprocessors are identified in the usage column.
Note: The demo and demokext programs are used in the examples in this section. The demokext_j
variable, which is exported is used in the examples.
Before using any of the following examples, see “Loading the kernel extension” on page 326.
Global variables within the KDB kernel debugger can be accessed directly by name. For example, the dw
subcommand can be used to display the value of the demokext_j variable. If the demokext_j variable is an
array, a specific value can be viewed by adding the appropriate offset (for example, dw demokext_j+20).
Access to individual elements of a structure is accomplished by adding the proper offset to the base
address for the variable.
To view and modify global variables using the symbol name, do the following:
1. Display a word at the address of the demokext_j variable with the following command:
dw demokext_j
Because the kernel extension was just loaded, this variable should have a value of 99 and the KDB
kernel debugger should display that value. The data displayed should be similar to the following:
demokext_j+000000: 00000063 01304040 01304754 00000000 ...c.0@@.0GT....
2. Turn off symbolic name translation by typing the following:
Before you can locate the address of global data using the address of the TOC and the map file, the
system must be stopped in the KDB kernel debugger within a routine of the kernel extension you want
to debug. To do this, set a breakpoint within the kernel extension. For more information about setting a
breakpoint, see “Setting breakpoints” on page 18.
When the KDB kernel debugger is invoked, general purpose register number 2 points to the address of
the TOC. From the map file, the offset from the start of the table of contents (TOC) to the desired TOC
entry can be calculated. Knowing this offset, and knowing the address at which the TOC starts, allows
the address of the TOC entry for the desired global variable to be calculated. Then, the address of the
TOC entry for the desired variable can be examined to determine the address of the data.
For example, assume that the KDB kernel debugger was invoked because of a breakpoint at line 67 of the
demokext routine, and that the value for general purpose register number 2 is 0x01304754.
Note: Breaking at this location ensures that the KDB kernel debugger is invoked while within the
demokext routines.
Using the map, the offset to the TOC entry for the demokext_j variable from the start of the TOC was
0x00000008. Adding this offset to the value displayed for r2 indicates that the TOC entry of interest
is at: 0x0130475C.
Note: The KDB kernel debugger can be used to perform the addition. In this case, the subcommand
to use is hcal @r2+8. For more information about the hcal subcommand, see “hcal and dcal
subcommands” on page 49.
8. Display the TOC entry for the demokext_j variable by typing the following:
dw 0130475C
This entry contains the address of the data for the demokext_j variable. The data displayed should be
similar to the following:
TOC+000008: 01304744 000BCB34 00242E94 001E0518 .0GD...4.$......
The value for the first word displayed is the address of the data for the demokext_j variable.
9. Display the data for the demokext_j variable by typing the following:
dw 01304744
The displayed data should indicate that the value for the demokext_j variable is still 0x0000064. This
was set earlier because the breakpoint set was in the demokext routine prior to incrementing the
demokext_j variable. The data displayed should be similar to the following:
demokext_j+000000: 00000064 01304040 01304754 00000000 ...d.0@@.0GT....
10. Clear all breakpoints with the following command:
ca
11. Exit the kernel debugger by typing g on the command line.
Unlike the procedure outlined in “Method 2: Using the TOC and map file” on page 12, this method can
be used at any time. This method requires the map file and the address at which the kernel extension
was loaded.
Note: Because this method depends on how a kernel extension is loaded, this method might quit
working if the procedure for loading a kernel extension is changed.
This method relies on the assumption that the address of a global variable can be found by using the
following formula:
Addr of variable = Addr of the last function before the variable in the map +
Length of the function +
Offset of the variable
The following is a part of the map file for the demokext kernel extension:
20 000005B8 000028 2 GL SD S17 <.fp_write> glink.s(/usr/lib/glink.o)
21 000005B8 GL LD S18 .fp_write
22 000005E0 000028 2 GL SD S19 <.fp_open> glink.s(/usr/lib/glink.o)
23 000005E0 GL LD S20 .fp_open
24 00000000 0000F9 3 RW SD S21 <_$STATIC> demokext.c(demokext.o)
25 E 000000FC 000004 2 RW SD S22 demokext_j demokext.c(demokext.o)
26 * 00000100 00000C 2 DS SD S23 demokext demokext.c(demokext.o)
27 0000010C 000000 2 T0 SD S24 <TOC>
28 0000010C 000004 2 TC SD S25 <_$STATIC>
29 00000110 000004 2 TC SD S26 <_system_configuration>
The last function in the .text section is at lines 22 and 23. The offset of this function from the map is
0x000005E0 (line 22, column 2). The length of the function is 0x000028 (Line 22, column 3). The offset of
the demokext_j variable is 0x000000FC (line 25, column 2). So the offset from the load point value to the
demokext_j variable is:
0x000005E0 + 0x000028 + 0x000000FC = 0x00000704
Adding this offset to the load point value of the demokext kernel extension provides the address of the
data for the demokext_j variable. Assuming a load point value of 0x01304040, this indicates that the data
for the demokext_j variable is located at:
0x01304040 + 0x00000704 = 0x01304744
Note: There are numerous ways to find this address. For other methods, see “Setting breakpoints” on
page 18.
3. Exit the KDB kernel debugger by typing g on the command line and pressing Enter. The prompt
changes to a dollar sign ($).
4. Bring the demo program to the foreground by typingfg and pressing Enter. The prompt changes to
./demo.
5. Type 0 and press Enter to unload the demokext kernel extension and exit.
Note: The examples in this topic assume that the current process is the demonstration program that
called the demokext kernel extension because there was a breakpoint set.
To learn how to view and manipulate stack frame formats, perform the following steps:
1. Load the demokext kernel extension program. For directions, see “Loading the kernel extension” on
page 326.
2. Display the stack for the current process, by typing stack and pressing Enter.
The stack trace back displays the routines called and traces back through system calls. The displayed
data should be similar to the following:
thread+001800 STACK:
[013042C0]write_log+00001C (10002040, 2FF3B258, 2FF3B2BC)
[013040B0]demokext+000070 (00000001, 2FF3B338)
[001E3BF4]config_kmod+0000F0 (??, ??, ??)
[001E3FA8]sysconfig+000140 (??, ??, ??)
[000039D8].sys_call+000000 ()
[10000570]main+000280 (??, ??)
[10000188]__start+000088 ()
3. To step forward four instructions, type s 4 and press Enter.
4. Reexamine the stack by typing stack and pressing Enter.
It should now include the strlen call and should look similar to the following:
thread+001800 STACK:
[01304500]strlen+000000 ()
[013042CC]write_log+000028 (10002040, 2FF3B258, 2FF3B2BC)
[013040B0]demokext+000070 (00000001, 2FF3B338)
[001E3BF4]config_kmod+0000F0 (??, ??, ??)
[001E3FA8]sysconfig+000140 (??, ??, ??)
[000039D8].sys_call+000000 ()
[10000570]main+000280 (??, ??)
[10000188]__start+000088 ()
5. If you do not see the strlen function call, continue stepping until it is displayed.
6. Toggle the KDB kernel debugger option to display the top 64 bytes for each stack frame by typing
set display_stack_frames and pressing Enter.
7. Display the stack again with the display_stack_frames option turned on by typing stack and
pressing Enter.
Note: The address for the stack is in general purpose register 1. The address can be obtained from the
output when the display_stack_frames option is set.
This subcommand displays 0x90 words of the stack in hexadecimal and ASCII. The output should be
similar to the following:
2FF3B1C0: 2FF3B210 2FF3B380 01304364 00000000 /.../....0Cd....
2FF3B1D0: 2FF3B230 01304754 0023AD5C 22222082 /..0.0GT.#.\"" .
2FF3B1E0: 00120000 2FF3B400 00000480 0000510C ..../.........Q.
2FF3B1F0: 2FF3B260 4A222860 001DCEC8 0000153C /..`J"(`.......<
2FF3B200: 00000000 00000000 00000000 01304648 .............0FH
2FF3B210: 2FF3B2E0 00000003 013040B4 00000000 /........0@.....
2FF3B220: 00000000 2FF3B380 10002040 2FF3B258 ..../..... @/..X
2FF3B230: 2FF3B2BC 00000000 001E5968 00000000 /.........Yh....
2FF3B240: 00000000 002783E8 00485358 007FFFFF .....’...HSX....
2FF3B250: 10002040 00000000 64656D6F 6B657874 .. @....demokext
2FF3B260: 20776173 2063616C 6C656420 666F7220 was called for
2FF3B270: 636F6E66 69677572 6174696F 6E0A0000 configuration...
2FF3B280: 00000000 00000000 00001000 2FF3B390 ............/...
2FF3B290: 2FF3B2E0 00040003 001CE9EC 314C0000 /...........1L..
2FF3B2A0: 2FF3B2E0 002783E8 2FF3B338 00000000 /....’../..8....
2FF3B2B0: 00000000 2E746578 74000000 10000100 .....text.......
2FF3B2C0: 10000100 00000710 00000100 00000000 ................
2FF3B2D0: 00000000 2FF3B380 00000000 00000000 ..../...........
2FF3B2E0: 2FF3B370 22334484 001E3BF8 00000000 /..p"3D...;.....
2FF3B2F0: 00000000 002783E8 00000001 2FF3B338 .....’....../..8
2FF3B300: E3001E30 00000020 2FF1F9F8 2FF1F9FC ...0... /.../...
2FF3B310: 80000000 00000001 2FF1F780 00003D20 ......../.....=
2FF3B320: 2FF21AE8 00000010 01304748 00000001 /........0GH....
2FF3B330: 2FF21AE8 00000010 2FF3B320 FFFFFFFF /......./.. ....
2FF3B340: 00000001 00000000 00000000 00000000 ................
2FF3B350: 00000010 00001C08 00000000 00000000 ................
2FF3B360: 00000031 82222824 00000005 2FF21AF8 ...1."($..../...
2FF3B370: 2FF3B3C0 002783E8 001E3FAC 2FF22FF8 /....’....?././.
2FF3B380: 00000002 2FF3B400 F0148912 00000FFE ..../...........
2FF3B390: 2FF3B388 0000153C 00000001 20007758 /......<.... .wX
2FF3B3A0: 00000000 000009B4 00000FFE 00000000 ................
2FF3B3B0: 00000010 E6001800 04DAE000 00000000 ................
2FF3B3C0: 2FF21AA0 0002D0B0 000039DC 22222022 /.........9."" "
2FF3B3D0: 00003E7C 00000000 20009CF8 20009D08 ..>|.... ... ...
2FF3B3E0: 2000A1D8 00000000 00000000 00000000 ...............
2FF3B3F0: 00000000 0024FA90 00000000 00000000 .....$..........
The displayed data can be interpreted using the diagram displayed in the Subroutine Linkage
Conventions section of the Assembler Language Reference book.
2. Clear all breakpoints by typing the following:
Setting breakpoints
The KDB kernel debugger creates a table of breakpoints that it maintains. When a breakpoint is set, the
debugger temporarily replaces the corresponding instruction with the trap instruction. The instruction
overlaid by the breakpoint operates when you issue any subcommand that would cause that instruction
to be initiated.
For more information about setting or clearing breakpoints, see “Breakpoint and steps subcommands” on
page 75.
Setting a breakpoint is essential for debugging kernel extensions. The general steps for setting a
breakpoint are the following:
1. Locate the assembler instruction corresponding to the C statement of the kernel system that you are
debugging.
The process of locating the assembler instruction and obtaining its offset is explained in “Viewing and
modifying global data” on page 11.
2. Get the offset of the assembler instruction from the listing.
3. Locate the address where the kernel extension is loaded.
4. Add the address of the assembler instruction to the address where kernel extension is loaded.
5. Set the breakpoint with the KDB b (break) subcommand.
Note: To continue with the demokext example, set a break at the C source line 67, which increments the
demokext_j variable. The list file indicates that this line starts at an offset of 0xE0.
To find the address of the modules for a particular extension use the KDB subcommand lke entry_number,
where entry_number is the extension number of interest. A list of Process Trace Backs that shows the
beginning addresses of routines contained in the extension is in the displayed data.
For example, the nm demokext subcommand returns the address of the demokext routine after it is
loaded. This address can then be used to set a breakpoint.
To get the address of the load point, print the kmid value during the sysconfig call from the
configuration method. For example, use the demo.c module. Then start the KDB kernel debugger and
display the value pointed to by the kmid pointer.
The devsw subcommand lists all of the function addresses for the device driver that are in the dev switch
table. Usually, the config subroutine is the load point routine. For example,
MAJ#010 OPEN CLOSE READ WRITE
0123DE04 0123DC04 0123DB20 0123DA3C
IOCTL STRATEGY TTY SELECT
0123D090 01244DF0 00000000 00059774
CONFIG PRINT DUMP MPX
0123E8C8 00059774 00059774 00059774
REVOKE DSDPTR SELPTR OPTS
00059774 00000000 00000000 00000002
Note: Because the demonstration program is not a device driver, this example uses the addresses of
the first device driver in the device switch table and is not related in any way to the demonstration
program.
2. Set a breakpoint at an offset of 0x20 from the beginning of the open routine for the first device driver
in the device switch table by typing the following:
b .syopen+20
KDB kernel debugger displays the location of the break.
3. Clear all breakpoints by typing the following:
ca
4. Turn off symbolic name translation by typing the following:
ns
5. With symbolic name translation turned off, display the device switch table for the first device driver
by typing the following:
devsw 1
The output is similar to the following:
Slot address 50006040
MAJ#001 OPEN CLOSE READ WRITE
00208858 00059750 002086D4 0020854C
IOCTL STRATEGY TTY SELECT
00208290 00059774 00000000 00208224
CONFIG PRINT DUMP MPX
6. Set a break at an offset of 0x20 from the beginning of the open routine for the first device driver in
the device switch table by typing the following:
b 00208858+20
This sets the same break that was set at the beginning of this example. KDB displays the location of
the break.
7. Toggle symbolic name translation on by typing the following:
ns
8. Clear all breaks by typing the following:
ca
9. Exit the KDB kernel debugger and let the system resume normal operations by typing the following:
g
Alphabetic list
This topic contains an alphabetized list of subcommands.
In the following table, the Usage column indicates when each subcommand can be used with the
following codes:
Code Usage
B With both the KDB kernel debugger and the kdb command
C Only with the kdb command
K Only with the KDB kernel debugger
The following table shows the KDB Kernel Debug Program subcommands in alphabetic order:
Subcommand, aliases Functions Usage Category
! Serves as a shell escape and provides a convenient C End user
way to run UNIX commands without leaving kdb
ames Display VMM address map entries B Display VMM information
apt Display VMM APT entries B Display VMM information
B Step on branch K Breakpoints and steps
b, brk Sets or lists break points K Breakpoints and steps
bdev, wlm_bdev Display wlm bio devices B WLM
bmblock, bmblk, bmb Display Enhanced Journaled File System metadata B Display Enhanced Journaled
block File System-specific file system
information
bqueue, wlm_bq Display wlm bio queues B WLM
bt Set or list trace points K Debugger trace points
btac Branch target K Branch target (IABR)
buffer, buf Display buffer B Display general file system
and Journal File System
information
buserr PCI bus error injection K PCI cfg space and I/O
debugging
businfo Display structure businfo B PCI cfg space and I/O
debugging
h subcommand
The h subcommand displays a list of all available subcommands in the debugger.
When run with a parameter, this list is restricted to only a particular category of subcommands. The list
of categories is:
v “Address translation subcommands” on page 174
v “Branch target subcommands” on page 87
v “Breakpoint and steps subcommands” on page 75
v “Changing context subcommands” on page 43
v “Calculator and converter subcommands” on page 49
v “Basic display subcommands” on page 51
v “CPU start and stop subcommands” on page 50
v “Display context information subcommands” on page 186
v “Display general and Journal File System (JFS) information subcommands” on page 229
v “Display Enhanced Journaled File System information subcommands” on page 253
v “Display memory allocation information subcommands” on page 219
v “Display kernel data structures subcommands” on page 97
v “Display NFS information subcommands” on page 266
v “Display storage subsystem information subcommands” on page 212
v “Display VMM subcommands” on page 122
v “End user subcommands”
v “Debugger trace points subcommands” on page 82
v “Leaving kdb subcommands” on page 41
v “Loader subcommands” on page 179
v “Lock subcommands” on page 287
v “Memory modification subcommands” on page 70
v “Memory register display and decode subcommands” on page 60
v “Memory search and extract subcommands” on page 67
v “Namelist and symbols subcommands” on page 89
v “Network subcommands” on page 290
v “PCI configuration space and I/O debugging subcommands” on page 91
v “System trace, dump and error log subcommands” on page 272
v “Time subcommands” on page 269
v “Watch DABR subcommands” on page 86
Format
h [topic]
Parameters
Item Description
topic Specifies the name, or partial name, of a particular help category. If more than one category name matches
the topic, only the first matching category and its subcommands are displayed.
Other
?, help
Examples
The following is an example of how to use the help alias for the h subcommand:
KDB(0)> help user
CMD ALIAS ALIAS FUNCTION ARG
set subcommand
The set subcommand lists and sets kdb toggles.
Format
Parameters
Item Description
toggle Identifies the option to be toggled or set by decimal number or name.
value Indicates the decimal number or expression to be set for an option.
Note: Some toggles allow the value to be omitted. In that case, the set subcommand cycles the toggle
through all of its possible settings.
The values that are valid for the KDB Kernel Debugger and the kdb command are the following:
For example, to turn on vi-style command line editing, type the following at the kdb
prompt:
set edit vi
default_xmalloc_heap Specifies the default heap for the xmalloc subcommand. If this option is 0, the xmalloc
subcommand uses the kernel heap.
The values that apply only to the kdb command are the following:
Item Description
logfile Enables or disables logging for a specified log file name. If logfile is invoked without a
parameter specifying a file name, logging is disabled.
loglevel Allows you to choose the granularity level of logging. Valid choices are the following:
0 off
The options that apply only to the KDB kernel debugger are the following:
Note: This toggle must be accessed using the option number. It cannot be toggled by name.
kdb_stop_all_cpu Toggles to select whether all processors or a single processor stops when the KDB kernel
debugger is invoked.
tweq_r1_r1 Causes the KDB kernel debugger to break on the tweq r1, r1 instruction. This is the trap
instruction reserved for entering LLDB.
kext_IF_active Toggles to disable and enable subcommands added to the KDB kernel debugger through
kernel extensions. By default, all subcommands registered by kernel extensions are active.
IPI_enable Toggles to control how the KDB kernel debugger notifies other processors to stop when the
KDB stops all processors value is true. If the IPI_enable value is true, the KDB kernel debugger
uses inter-processor interrupts. If IPI_enable is false, the decrementer interrupt is used.
no_brkpt_warning Controls whether the KDB kernel debugger prints warning messages when it ignores certain
breakpoints, for example, a context mismatch. If the no_brkpt_warning value is set to true, the
KDB kernel debugger does not print warning messages when it ignores certain breakpoints.
If the no_brkpt_warning value is set to false, the KDB kernel debugger prints warning
messages when it ignores certain breakpoints.
Other
setup
Examples
1 no_symbol false
2 mst_wanted true
3 screen_size 24
4 power_pc_syntax true
5 origin 00000000
6 unix_symbols_start_from 00001000
7 hexadecimal_wanted true
8 screen_previous false
9 display_stack_frames false
10 display_stacked_regs false
11 64_bit true
12 ldr_segs_wanted false
13 emacs_window false
14 local_breakpoint_attach thread
15 kdb_stop_all_cpu true
17 kext_IF_active true
18 trace_back_lookup false
19 IPI_enable true
20 scroll false
21 edit noedit
24 no_brkpt_warning false
25 default_xmalloc_heap 00000000
KDB(0)> dc waitproc 5
.waitproc+000000 mflr r0
.waitproc+000004 mfcr r12
.waitproc+000008 std r31,FFFFFFF8(stkp)
.waitproc+00000C std r30,FFFFFFF0(stkp)
.waitproc+000010 std r29,FFFFFFE8(stkp)
KDB(0)> set origin 100
dbgopt subcommand
The dbgopt subcommand toggles low-level tracing options within the kernel.
Format
dbgopt
Parameters
The dbgopt subcommand presents a menu that allows the user to enable rc.boot tracing and tracing of
exec calls. The tracing enabled by this subcommand is performed using the kernel printf function and is
unrelated to the system trace facility.
Other
No aliases.
Examples
Enter option: 2
Debug options:
--------------
1. Toggle rc.boot tracing - currently DISABLED
2. Toggle tracing of exec calls - currently ENABLED
q. Exit
Enter option: q
KDB(0)>
varset subcommand
The varset subcommand creates a new user-defined variable.
Note: In the KDB kernel debugger, user variables are persistent across invocations of the debugger but
not across system reboots. In the kdb command, user variables are not persistent across invocations.
Parameters
Item Description
name Specifies the name of a user variable. If it does not already exist, the variable is created. Otherwise, the
value of the existing variable is changed. Variable names are case sensitive and can consist of letters,
numbers, and the underscore (_) character.
value Is a string assigned verbatim to the user variable specified by name. If omitted, the user variable is
assigned an empty string. The value can contain spaces.
After a variable is created, any occurrence of the variable name in a subcommand is replaced with the
value assigned to that variable.
If any variable substitutions occur, the resulting subcommand is printed between two less than and two
greater than signs before it is run. For example, <<dw kdb_avail 1>>.
All variable substitutions are done before any additional parsing of the subcommand, and the
substitutions are done on a textual basis. This allows a single variable to expand into multiple
subcommand parameters.
Other
No aliases.
Examples
varlist subcommand
The varlist subcommand displays all user-defined variables previously created with the varset
subcommand.
Format
varlist
Parameters
No parameters.
Other
No aliases.
varrm subcommand
The varrm subcommand removes user-defined variables previously created with the varset subcommand.
Format
varrm name
Parameters
Item Description
name Specifies the user variable to remove. Variable names are case sensitive and consist of letters, numbers, and
the underscore (_) character.
Other
No aliases.
Examples
his subcommand
The his subcommand prints a history of user input. A parameter can be used to specify the number of
historical entries to display.
Format
his [value]
Parameters
Each historical entry can be recalled and edited for use with the usual control characters (as in emacs).
Other
hi, hist
Examples
No example.
debug subcommand
The debug subcommand prints additional information while the KDB kernel debugger is running to help
ensure that the debugger is functioning properly.
Format
debug [options]
Parameters
Item Description
options Specifies the debug option to be turned on or off. View possible values by specifying the ? flag.
If the debug subcommand is invoked with no parameters, the currently-active debug options are
displayed.
Other
No aliases.
Examples
! subcommand
The ! subcommand serves as a shell escape and provides a way to run UNIX commands without leaving
the kdb command. This subcommand is only available in the kdb command.
Note: If output logging is enabled through the logfile and loglevel kdb command options, the output
produced by the ! subcommand is not included in the log file.
Format
! [command]
Parameters
Item Description
command Passes a command verbatim to a newly spawned UNIX shell for running.
Other
No aliases.
Examples
The following is an example of how to use the ! subcommand:
(0)> ! ls
... .dtprofile bin lib sbin
.: .mozilla dev lost+found tftpboot
.TTauthority .sh_history dfs lpp tmp
.Xauthority .wmrc etc mnt unix
.bash_history : gsa opt usr
.dbxhist TT_DB home proc var
.dt audit krb5 project
(0)>
e subcommand
The e subcommand exits the kdb command and KDB kernel debugger.
Format
e [dump]
Parameters
Item Description
dump Indicates that a system dump will be created when you exit the KDB kernel debugger. The optional dump
parameter is only applicable to the KDB kernel debugger. The dump argument can be specified to force an
operating system dump. The method used to force a dump depends on how the KDB kernel debugger was
invoked.
halt_display
If the KDB kernel debugger was invoked by a halt display (C20 on the LED), type q and press
Enter.
When the dump is complete, the LEDs show 888 102 700 0c0.
soft_reset
If the debugger was invoked by a soft reset (that is, pressing the reset button once), complete the
following:
1. Move the key on the server.
If the key was in the SERVICE position at boot time, move it to the NORMAL position.
Otherwise, move the key to the SERVICE position.
Note: Forcing a dump using this method requires that you know what the key position was
at boot time.
2. Type quit and press Enter.
Do this once for each CPU.
break in
You cannot create a dump if the debugger was invoked with the break method (^\).
When the dump is in progress, _0c9 displays on the LEDs while the dump is copied to disk hd7 or disk
hd6.
The e subcommand allows you to exit the KDB kernel debugger session and return to the system with all
breakpoints installed in memory. To leave KDB kernel debugger without breakpoints, use the ca
subcommand.
Other
q, g
No example.
reboot subcommand
The reboot subcommand reboots the machine. This subcommand issues a prompt for confirmation that a
reboot is desired before beginning the reboot.
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
reboot
Parameters
No parameters.
Other
No aliases.
Examples
halt subcommand
The halt subcommand shuts down the machine.
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
halt
Parameters
No parameters.
Other
No aliases.
Examples
sw subcommand
The sw subcommand allows a selected thread to be considered the current thread.
Format
sw [ {th_slot | th_Address} | {u | k} ]
Parameters
Item Description
u Switches to user address space for the current thread.
k Switches to kernel address space for the current thread.
th_slot Specifies a thread slot number. This parameter must be a decimal value.
th_Address Specifies the address of a thread slot. Symbols, hexadecimal values, or hexadecimal expressions can be used
to specify the address.
The u and k flags can be used to switch between the user and kernel address space for the current
thread.
By default, KDB shows the virtual space for the current thread. Threads can be specified by slot number
or address. The current thread can be reset to its initial context by entering the sw subcommand with no
parameters. For the KDB kernel debugger, the initial context is also restored whenever you exit the KDB
kernel debugger.
Other
switch
Examples
The following is an example of how to use the sw subcommand:
KDB(0)> sw 12 //switch to thread slot 12
Switch to thread: <thread+000900>
KDB(0)> f //print stack trace
thread+000900 STACK:
[000215FC]e_block_thread+000250 ()
[00021C48]e_sleep_thread+000070 (??, ??, ??)
[000200F4]errread+00009C (??, ??)
[001C89B4]rdevread+000120 (??, ??, ??, ??)
[0023A61C]cdev_rdwr+00009C (??, ??, ??, ??, ??, ??, ??)
[00216324]spec_rdwr+00008C (??, ??, ??, ??, ??, ??, ??, ??)
[001CEA3C]vnop_rdwr+000070 (??, ??, ??, ??, ??, ??, ??, ??)
[001BDB0C]rwuio+0000CC (??, ??, ??, ??, ??, ??, ??, ??)
[001BDF40]rdwr+000184 (??, ??, ??, ??, ??, ??)
[001BDD68]kreadv+000064 (??, ??, ??, ??)
[000037D8].sys_call+000000 ()
[D0046B68]read+000028 (??, ??, ??)
[1000167C]child+000120 ()
[10001A84]main+0000E4 (??, ??)
[1000014C].__start+00004C ()
KDB(0)> dr sr //display segment registers
s0 : 00000000 s1 : 007FFFFF s2 : 00000AB7 s3 : 007FFFFF s4 : 007FFFFF
s5 : 007FFFFF s6 : 007FFFFF s7 : 007FFFFF s8 : 007FFFFF s9 : 007FFFFF
s10 : 007FFFFF s11 : 007FFFFF s12 : 007FFFFF s13 : 6000058B s14 : 00000204
The following example shows some of the differences between kernel and user mode for 64-bit process:
(0)> sw k //kernel mode
(0)> dr msr //kernel machine status register
msr : 000010B0 bit set: ME IR DR
(0)> dr r1 //kernel stack pointer
r1 : 2FF3B2A0 2FF3B2A0
(0)> f //stack frame (kernel MST)
thread+002A98 STACK:
[00031960]e_block_thread+000224 ()
[00041738]nsleep+000124 (??, ??)
[01CFF0F4]nsleep64_+000058 (0FFFFFFF, F0000001, 00000001, 10003730, 1FFFFEF0, 1FFFFEF8)
[000038B4].sys_call+000000 ()
[80000010000867C]080000010000867C (??, ??, ??, ??)
[80000010001137C]nsleep+000094 (??, ??)
[800000100058204]sleep+000030 (??)
[100000478]main+0000CC (0000000100000001, 00000000200FEB78)
[10000023C]__start+000044 ()
(0)> sw u //user mode
(0)> dr msr //user machine status register
cpu subcommand
The cpu subcommand allows you to switch from the current processor to the specified processor.
Format
Parameters
Item Description
cpu number Specifies the CPU number. This value must be a decimal value.
any Unblocks switched processors.
For the kdb command, the processor status displays the address of the Per Processor Data Area (PPDA)
for the processor, the current thread for the processor, and the Current Save state Address (CSA).
For the KDB kernel debugger, the processor status indicates the current state of the processor (for
example, stopped, switched, debug, and so forth). A switched processor is blocked until the next start or
cpu subcommand. Switching between processors does not change the processor state.
Note: If a selected processor cannot be reached, you can go back to the previous processor by typing ^\\
twice.
Other
No aliases.
Examples
ctx subcommand
The ctx subcommand is used to switch between cpu contexts when viewing a system memory dump.
Note: This subcommand is only available within the kdb command. It cannot be used with the KDB
kernel debugger.
Format
Parameters
Item Description
cpu number decimal value or expression indicating a CPU number. If the CPU number is not given as an parameter, the
initial context is restored.
Note: You can select KDB context to see more information through the stack trace subcommand. For
example, you could see a complete stack of a kernel panic. However, KDB context is available only if the
running kernel is booted with KDB kernel debugger.
Other
context
Examples
PFT:
id....................0007
raddr.....0000000001000000 eaddr.....0000000001000000
size..............00800000 align.............00800000
valid..1 ros....0 holes..0 io.....0 seg....1 wimg...2
PVT:
id....................0008
raddr.....00000000004B8000 eaddr.....00000000004B8000
size..............000FFD60 align.............00001000
valid..1 ros....0 holes..0 io.....0 seg....1 wimg...2
runcpu subcommand
The runcpu subcommand allows you to run any other kdb subcommand to for every processor in the
system. It is intended for use with subcommands such as the f subcommand for which the output
depends on the current processor in the KDB kernel debugger.
Format
runcpu cmd
Parameters
Item Description
cmd Specifies the kdb subcommand that is to be run for every processor in the system.
The specified command only runs on processors that the KDB kernel debugger has stopped. If errors
occur when the command is run on a particular processor, the runcpu subcommand continues and runs
the command on the next processor. The runcpu subcommand can be stopped by pressing Ctrl+C.
Other
No aliases.
Examples
Format
hcal HexadecimalExpression
dcal DecimalExpression
Parameters
Item Description
HexadecimalExpression Specifies the hexadecimal expression to be evaluated.
DecimalExpression Specifies the decimal expression to be evaluated.
Other
hcal – cal
Examples
The following is an example of how to use the dcal subcommand and the hcal subcommand:
KDB(0)> hcal 0x10000 //convert a single value
Value hexa: 00010000 Value decimal: 65536
KDB(0)> dcal 1024*1024 //convert an expression
Value decimal: 1048576 Value hexa: 00100000
KDB(0)> set 11 //64 bits printing
64_bit is true
KDB(0)> hcal 0-1 //convert -1
Value hexa: FFFFFFFFFFFFFFFF Value decimal: -1 Unsigned: 18446744073709551615
KDB(0)> set 11 //32 bits printing
64_bit is false
KDB(0)> hcal 0-1 //convert -1
Value hexa: FFFFFFFF Value decimal: -1 Unsigned: 4294967295
conv subcommand
The conv subcommand converts an arbitrary base number to a decimal, binary, octal, or hexadecimal
number.
Parameters
Item Description
-b Specifies that the number to convert specified by the value parameter is a binary number.
-d Specifies that the number to convert specified by the value parameter is a decimal number.
-o Specifies that the number to convert specified by the value parameter is an octal number.
-x Specifies that the number to convert specified by the value parameter is a hexadecimal number.
-a base Specifies that the number to convert specified by the value parameter is a number with the arbitrary base of
base. The number must be between 2 and 36 inclusive.
-s Extends the left-most, one-bit sign of the number to convert specified by the value parameter.
value Specifies the number to convert.
Other
No aliases.
Examples
Note: These subcommands are only available within the KDB kernel debugger. They are not included in
the kdb command.
cpu_number | all
cpu_number | all
Parameters
Item Description
cpu_number Specifies the CPU number to start or stop. This parameter must be a decimal value.
all Indicates that all processors are to be started or stopped.
When a processor is stopped, it is looping inside the KDB kernel debugger and the processor does not go
back to the operating system.
Other
No aliases.
Examples
The following is an example of how to use the start subcommand and the stop subcommand:
KDB(1)> stop 0 //stop processor 0
KDB(1)> cpu //display processors status
cpu 0 status VALID STOPPED action STOP
cpu 1 status VALID DEBUG
KDB(1)> start 0 //start processor 0
KDB(1)> cpu //display processors status
cpu 0 status VALID action START
cpu 1 status VALID DEBUG
KDB(1)> b sy_decint //set break point
KDB(1)> e //exit the debugger
Breakpoint
.sy_decint+000000 mflr r0 <.dec_flih+000014>
KDB(0)> cpu //display processors status
cpu 0 status VALID DEBUG action RESUME
cpu 1 status VALID DEBUGWAITING
KDB(0)> cpu 1 //switch to processor 1
Breakpoint
.sy_decint+000000 mflr r0 <.dec_flih+000014>
KDB(1)> cpu //display processors status
cpu 0 status VALID SWITCHED action SWITCH
cpu 1 status VALID DEBUG
KDB(1)> cpu 0 //switch to processor 0
KDB(0)> cpu //display processors status
cpu 0 status VALID DEBUG
cpu 1 status VALID SWITCHED action SWITCH
KDB(0)> q //exit the debugger
f subcommand
The f subcommand displays all of the stack frames from the current instruction as deep as possible.
Interrupts and system calls are crossed and the user stack is displayed.
Parameters
Item Description
+x Includes hexadecimal addresses as well as symbolic names for calls on the stack. This option remains set
for future invocations of the stack subcommand until it is changed using the -x flag.
-x Suppresses the display of hexadecimal addresses for functions on the stack. This option remains in effect
for future invocations of the stack subcommand until it is changed using the +x flag.
slot Indicates the thread slot number. It is a decimal value.
Address Indicates the effective address for a thread slot. It is a hexadecimal address, hexadecimal expression, or
symbol.
In the user space, trace back allows the display of symbolic names, but the KDB kernel debugger cannot
directly access these symbols. Use the +x toggle to have hexadecimal addresses displayed (for example, to
put a break point on one of these addresses). If invoked with no parameter, the stack for the current
thread is displayed. The stack for a particular thread can be displayed by specifying its slot number or
address.
Note: The amount of data displayed can be controlled through the mst_wanted and
display_stack_wanted options of the set subcommand. For more information, see “set subcommand” on
page 33.
For some compilation options, specifically -O, routine parameters are not saved in the stack. KDB warns
about this by displaying [??] at the end of the line. In this case, the displayed routine parameters might
be wrong.
Other
stack, where
Examples
The following is an example of how to use the f subcommand. In the following example, a break point is
set on v_gettlock and when the break point is encountered, the stack is displayed. The first parameter of
the open() syscall is displayed and saved by copen() in register R31. Register R31 is saved in the stack by
openpath(). The first parameter is found by looking at the memory pointed to by register R31.
KDB(2)> f //show the stack
thread+012540 STACK:
[0004AC84]v_gettlock+000000 (00012049, C0011E80, 00000080, 00000000 [??]) <-- Optimized code, note [??]
[00085C18]v_pregettlock+0000B4 (??, ??, ??, ??)
[000132E8]isync_vcs1+0000D8 (??, ??)
____ Exception (2FF3B400) ____
[000131FC].backt+000000 (00012049, C0011E80 [??]) <-- Optimized code, note [??]
[0004B220]vm_gettlock+000020 (??, ??)
[0019A64C]iwrite+00013C (??)
[0019D194]finicom+0000A0 (??, ??)
[0019D4F0]comlist+0001CC (??, ??)
[0019D5BC]_commit+000030 (00000000, 00000001, 09C6E9E8, 399028AA,
0000A46F, 0000E2AA, 2D3A4EAA, 2FF3A730)
[001E1B18]jfs_setattr+000258 (??, ??, ??, ??, ??, ??)
[001A5ED4]vnop_setattr+000018 (??, ??, ??, ??, ??, ??)
[001E9008]spec_setattr+00017C (??, ??, ??, ??, ??, ??)
[001A5ED4]vnop_setattr+000018 (??, ??, ??, ??, ??, ??)
[01B655C8]pty_vsetattr+00002C (??, ??, ??, ??, ??, ??)
[01B6584C]pty_setname+000084 (??, ??, ??, ??, ??, ??)
In the following example, you must find what the lsfs subcommand is waiting for. The answer is given
with getfssize parameters, which are saved in the stack.
# ps -ef|grep lsfs
root 63046 39258 0 Apr 01 pts/1 0:00 lsfs
# kdb
Preserving 587377 bytes of symbol table
First symbol sys_resource
PFT:
id....................0007
raddr.............01000000 eaddr.............B0000000
size..............01000000 align.............01000000
valid..1 ros....0 holes..0 io.....0 seg....0 wimg...2
PVT:
status subcommand
The status subcommand displays information about what is currently running on each processor.
Format
status [cpu]
Parameters
Item Description
cpu Specifies the CPU number.
Other
No aliases.
Examples
stat subcommand
The stat subcommand displays system statistics that include the last kernel printf() messages still in
memory.
Format
stat
Parameters
No parameters.
For the KDB kernel debugger, this subcommand also displays the reason why the debugger was entered.
There is one reason per processor.
Other
No aliases.
Examples
SYSTEM STATUS:
sysname... AIX
nodename.. robot02
release... 1
version... 7
build date Sep 28 2011
build time 11:45:36
label..... 1139A_71D
machine... 00C3AB174C00
nid....... C3AB174C
time of crash: Tue Jan 8 20:20:39 2013
age of system: 35 day, 3 min., 24 sec.
xmalloc debug: enabled
FRRs active... 0
FRRs started.. 0
CRASH INFORMATION:
CPU 2 CSA F00000003074F600 at time of crash, error code for LEDs: 30000000
pvthread+017C00 STACK:
[000C9524]remove_e_list+000024 (F1000A0400C71800, F1000A04003F4618 [??])
[000E18C0]e_block_thread+000500 ()
[006AA318]rtipc_tsleep_block+000198 (??, ??, ??)
[006ACFA8]rtsem_tsleep_thread+000228 (??, ??, ??, ??, ??, ??)
[006ADC18]semsleep+0000B8 (??, ??, ??, ??, ??, ??)
[006AE1EC]atomic+00044C (??, ??, ??, ??, ??, ??, ??)
[006AEF98]rsemop+0003D8 (2230008022300080, 0A0000001E7E8440,
0000000000000001, 0000000000000000, 0000000000000000, 0000000000000000)
[006B0B8C]__semop+00006C (2230008022300080, 0A0000001E7E8440,
0000000000000001)
[0000386C]ovlya_addr_sc_flih_main+00014C ()
[kdb_get_virtual_memory] no real storage @ A0000001E7E8300
[90000000026120C]090000000026120C ()
[kdb_read_mem] no real storage @ FFFFFFFFFFF66D0
(2)>
pr subcommand
The pr subcommand displays memory as if it were of a specified type (c data structure).
Format
pr [type] address
pr -p pattern
Parameters
Item Description
-l Displays data following a linked list. The pr subcommand follows the linked list until the value in the
linked list pointer equals the ending value. The ending value is zero, unless it is changed with the -e
parameter.
-e Changes the ending value used when you are displaying a linked list.
-a Displays the data as if it were an array whose elements are of the specified type.
-d Sets the default type.
default_type Indicates the type (c data structure) for which you want to display information. After you set the default
type by using the –d parameter, it is the only type for which information is displayed.
-p Displays the defined symbols that match a specified pattern.
type Specifies the type used to display the data.
address Specifies the effective address of the data to be displayed.
offset Specifies the offset of the linked list pointer in the data structure.
name Specifies the name of the linked list pointer in the data structure.
end_val Specifies the new ending value.
count Specifies the number of elements to display.
pattern Specifies the pattern.
Before a type can be used, it must be loaded into the kernel with the bosdebug -l command. The
bosdebug command must be issued outside of kdb as the root user. It is not necessary to reboot the
machine after running the bosdebug command.
Other
Examples
//Run the following as ’root’ to load the symbols in intr.h into the kernel
# echo "#include <sys/intr.h>" >sym.c //symbol file to load into kernel
# echo "main() { }" >>sym.c
# cc -g -o sym sym.c -qdbxextra //for 32-bit kernel
# cc -g -q64 -o sym sym.c -qdbxextra //for 64-bit kernel
# bosdebug -l sym (load symbols into kernel)
Symbol table initialized. Loaded 297 symbols.
symptom subcommand
The symptom subcommand displays the symptom string for a dump.
symptom [-e]
Parameters
Item Description
-e Writes the symptom string and the stack trace to the system errlog. The symptom string is displayed on the
standard output.
If no parameters are used, the symptom subcommand displays the symptom string on the standard
output.
The symptom subcommand is not valid on a running system. The optional -e flag creates an error log
entry that contains the symptom string. This flag is normally only used by the system and not entered
manually. The symptom string can be used to identify duplicate problems.
Other
No aliases.
Examples
v The following example demonstrates the symptom command running on a dump:
<0> symptom
PIDS/5765C3403 LVLS/430 PCSS/SPI1 MS/300 FLDS/uiocopyin VALU/7ce621ae
FLDS/uiomove VALU/13c
v The following example demonstrates the symptom subcommand with the -e flag running on a dump:
<0> symptom -e
PIDS/5765C3403 LVLS/430 PCSS/SPI1 MS/300 FLDS/uiocopyin VALU/7ce621ae
FLDS/uiomove VALU/13c
v The corresponding system errlog entry is similar to the following:
LABEL: SYSDUMP_SYMP
....
Detail Data
DUMP STATUS
LED:300
csa:2ff3b400
uiocopyin_ppc 1c4
uiomove 13c
....
Format
Parameters
Item Description
EffectiveAddress Specifies the virtual (effective) address of the area to be dumped when the d, dw, or dd subcommands are
used. Symbols, hexadecimal values, or hexadecimal expressions can be used in specification of the address.
PhysicalAddress Specifies the physical address of the area to be dumped when the dp, dpw or dpd subcommands are used.
Symbols, hexadecimal values, or hexadecimal expressions can be used in specification of the address.
count Specifies the number of bytes, words, or double words to display. This is a hexadecimal value. The number
of bytes are displayed if the d subcommand or the dp subcommand are used. The number of words are
displayed if the dw or dpw subcommand are used. The number of double words is displayed if the dd
subcommand or the dpd subcommand are used. If no count is specified, 16 bytes of data are displayed.
Any of the display subcommands can be continued from the last address displayed by using the Enter
key.
Other
d – dump
Examples
The following is an example of how to use the d, dw, dd, dp, dpw, and dpd subcommands:
KDB(0)> d utsname //display data at utsname
utsname+000000: 4149 5800 0000 0000 0000 0000 0000 0000 AIX.............
KDB(0)> d utsname 8 //display 8 bytes of data at utsname
utsname+000000: 4149 5800 0000 0000 AIX.....
KDB(0)> //’enter key’ to display the next 8 bytes of data
utsname+000008: 0000 0000 0000 0000 ........
KDB(0)> dw utsname 8 //display 8 words of data at utsname
utsname+000000: 41495800 00000000 00000000 00000000 AIX.............
utsname+000010: 00000000 00000000 00000000 00000000 ................
KDB(0)> dd utsname 8 //display 8 double-words of data at utsname
utsname+000000: 4149580000000000 0000000000000000 AIX.............
utsname+000010: 0000000000000000 0000000000000000 ................
utsname+000020: 3030303030303030 4130303000000000 00000000A000....
utsname+000030: 0000000000000000 0000000000000000 ................
KDB(0)> tr utsname //find physical address of utsname
Physical Address = 00000000003D2860
KDB(0)> dp 3D2860 //display data using physical address
003D2860: 4149 5800 0000 0000 0000 0000 0000 0000 AIX.............
KDB(0)> dpw 3D2860 //display data as words using physical address
003D2860: 41495800 00000000 00000000 00000000 AIX.............
KDB(0)> dpd 3D2860 //display data as double-words using physical address
003D2860: 4149580000000000 0000000000000000 AIX.............
KDB(0)>
dc effectiveaddress [count]
Parameters
Item Description
effectiveaddress Specifies the effective or virtual address of the code to disassemble. Symbols, hexadecimal values, or
hexadecimal expressions can be used in specification of the address.
physicaladdress Specifies the physical or real address of the code to disassemble. Symbols, hexadecimal values, or
hexadecimal expressions can be used in specification of the address.
count Indicates the number of instructions to be disassembled. The value specified must be a decimal value or
decimal expression.
Other
Examples
The following is an example of how to use the dc and the dpc subcommands:
KDB(0)> set 4
power_pc_syntax is true
KDB(0)> dc resume_pc 10 //prints 10 instructions
.resume_pc+000000 lbz r0,3454(0) 3454=Trconflag
.resume_pc+000004 mfsprg r15,0
.resume_pc+000008 cmpi cr0,r0,0
.resume_pc+00000C lwz toc,4208(0) toc=TOC,4208=g_toc
.resume_pc+000010 lwz r30,4C(r15)
.resume_pc+000014 lwz r14,40(r15)
.resume_pc+000018 lwz r31,8(r30)
.resume_pc+00001C bne- cr0.eq,<.resume_pc+0001BC>
.resume_pc+000020 lha r28,2(r30)
.resume_pc+000024 lwz r29,0(r14)
KDB(0)> dc mttb 5 //prints mttb function
.mttb+000000 li r0,0
.mttb+000004 mttbl X r0 //X shows that these instructions
.mttb+000008 mttbu X r3 //are not supported by the current architecture
.mttb+00000C mttbl X r4 //POWER PC 601 processor
.mttb+000010 blr
KDB(0)> set 4 //set toggle for POWER family RS syntax
power_pc_syntax is false
KDB(0)> dc resume_pc 10 //prints 10 instructions
.resume_pc+000000 lbz r0,3454(0) 3454=Trconflag
.resume_pc+000004 mfspr r15,110
.resume_pc+000008 cmpi cr0,r0,0
.resume_pc+00000C l toc,4208(0) toc=TOC,4208=g_toc
.resume_pc+000010 l r30,4C(r15)
.resume_pc+000014 l r14,40(r15)
.resume_pc+000018 l r31,8(r30)
.resume_pc+00001C bne cr0.eq,<.resume_pc+0001BC>
.resume_pc+000020 lha r28,2(r30)
.resume_pc+000024 l r29,0(r14)
KDB(4)> dc scdisk_pm_handler
.scdisk_pm_handler+000000 stmw r26,FFFFFFE8(stkp)
KDB(4)> tr scdisk_pm_handler
Physical Address = 1D7CA1C0
KDB(4)> dpc 1D7CA1C0
1D7CA1C0 stmw r26,FFFFFFE8(stkp)
Format
di hexadecimal_instruction
Parameters
Item Description
hexadecimal_instruction Specifies the hexadecimal instruction word to be decoded.
The hexadecimal instruction word displays the actual instruction, with the operations code and the
operands, of the given hexadecimal instruction. The di subcommand accepts a user input hexadecimal
instruction word and decodes it into the actual instruction word in the form of the operations code and
the operands.
Other
decode
Examples
dr subcommand
The dr subcommand displays general purpose, segment, special, or floating point registers.
Format
Parameters
Item Description
gp Displays general purpose registers.
sr Displays segment registers.
sp Displays special purpose registers.
fp Displays floating point registers.
vmx Displays the current contents of vector registers. This is not the contents of the currently running thread's
vector register state unless the thread is the current owner of the vector unit.
reg_name Displays a specific register by name.
The current thread context is used to locate the values to display. The sw subcommand can be used to
change the context to other threads.
For BAT registers, the dbat and ibat subcommands must be used.
No aliases.
Examples
1. The following is an example of how to use the dr subcommand:
KDB(0)> dr ?
Usage: dr [sp|sr|gp|fp|hmt|vmx|<reg.name>]
Usage: mr [sp|sr|gp|fp|<reg.name>]
sp reg. name: iar msr cr lr ctr xer mq asr
............. dsisr dar dec sdr0 sdr1 srr0 srr1 dabr
............. dabrx rtcu rtcl tbu tbl sprg0 sprg1 sprg2
............. sprg3 pir pvr ear fpecr ctrl hid0 hid1
............. hid4 hid5 iabr dmiss imiss dcmp icmp hash1
............. hash2 rpa buscsr l2cr l2sr imc sia sda
............. imru imrl mmcra mmcr0 mmcr1 pmc1 pmc2 pmc3
............. pmc4 pmc5 pmc6 pmc7 pmc8
sr reg. name: s0 s1 s2 s3 s4 s5 s6 s7
............. s8 s9 s10 s11 s12 s13 s14 s15
gp reg. name: r0 r1 r2 r3 r4 r5 r6 r7
............. r8 r9 r10 r11 r12 r13 r14 r15
............. r16 r17 r18 r19 r20 r21 r22 r23
............. r24 r25 r26 r27 r28 r29 r30 r31
fp reg. name: f0 f1 f2 f3 f4 f5 f6 f7
............. f8 f9 f10 f11 f12 f13 f14 f15
............. f16 f17 f18 f19 f20 f21 f22 f23
............. f24 f25 f26 f27 f28 f29 f30 f31
............. fpscr
vmx reg. name: vr0 vr1 vr2 vr3 vr4 vr5 vr6 vr7
.............. vr8 vr9 vr10 vr11 vr12 vr13 vr14 vr15
.............. vr16 vr17 vr18 vr19 vr20 vr21 vr22 vr23
.............. vr24 vr25 vr26 vr27 vr28 vr29 vr30 vr31
.............. vscr vrsave
hmt reg. name: rctrl thctl thto dormiar dormmsr
KDB(0)> dr //print general purpose registers
r0 : 00003730 r1 : 2FEDFF88 r2 : 00211B6C r3 : 00000000 r4 : 00000003
r5 : 007FFFFF r6 : 0002F930 r7 : 2FEAFFFC r8 : 00000009 r9 : 20019CC8
r10 : 00000008 r11 : 00040B40 r12 : 0009B700 r13 : 2003FC60 r14 : DEADBEEF
r15 : 00000000 r16 : DEADBEEF r17 : 2003FD28 r18 : 00000000 r19 : 20009168
r20 : 2003FD38 r21 : 2FEAFF3C r22 : 00000001 r23 : 2003F700 r24 : 2FEE02E0
r25 : 2FEE0000 r26 : D0005454 r27 : 2A820846 r28 : E3000E00 r29 : E60008C0
r30 : 00353A6C r31 : 00000511
KDB(0)> dr sp //print special registers
iar : 10001C48 msr : 0000F030 cr : 28202884 lr : 100DAF18
ctr : 100DA1D4 xer : 00000003 mq : 00000DF4
dsisr : 42000000 dar : 394A8000 dec : 007DDC00
sdr1 : 00380007 srr0 : 10001C48 srr1 : 0000F030
dabr : 00000000 rtcu : 2DC05E64 rtcl : 2E993E00
sprg0 : 000A5740 sprg1 : 00000000 sprg2 : 00000000 sprg3 : 00000000
pid : 00000000 fpecr : 00000000 ear : 00000000 pvr : 00010001
hid0 : 8101FBC1 hid1 : 00004000 iabr : 00000000
KDB(0)> dr sr //print segment registers
s0 : 60000000 s1 : 60001377 s2 : 60001BDE s3 : 60001B7D s4 : 6000143D
s5 : 60001F3D s6 : 600005C9 s7 : 007FFFFF s8 : 007FFFFF s9 : 007FFFFF
s10 : 007FFFFF s11 : 007FFFFF s12 : 007FFFFF s13 : 60000A0A s14 : 007FFFFF
s15 : 600011D2
KDB(0)> dr fp //print floating point registers
f0 : C027C28F5C28F5C3 f1 : 000333335999999A f2 : 3FE3333333333333
f3 : 3FC9999999999999 f4 : 7FF0000000000000 f5 : 00100000C0000000
f6 : 4000000000000000 f7 : 000000009A068000 f8 : 7FF8000000000000
f9 : 00000000BA411000 f10 : 0000000000000000 f11 : 0000000000000000
f12 : 0000000000000000 f13 : 0000000000000000 f14 : 0000000000000000
f15 : 0000000000000000 f16 : 0000000000000000 f17 : 0000000000000000
f18 : 0000000000000000 f19 : 0000000000000000 f20 : 0000000000000000
f21 : 0000000000000000 f22 : 0000000000000000 f23 : 0000000000000000
ddvb, ddvh, ddvw, ddvd, ddpb, ddph, ddpw, and ddpd subcommand
The ddvb, ddvh, ddvw and ddvd subcommands can be used to access memory in translated mode, using
an effective address already mapped. On a 64-bit machine, double words correctly aligned are accessed in
a single load (ld) instruction with the ddvd subcommand. The ddpb, ddph, ddpw and ddpd
subcommands can be used to access memory in translated mode, using a physical address that will be
mapped. On a 64-bit machine, double words correctly aligned are accessed in a single load (ld)
instruction with the ddpd subcommand. The DBAT interface is used to translate this address in
cache-inhibited mode.
Format
Parameters
Item Description
EffectiveAddress Specifies the effective or virtual address of the starting memory area to display. Symbols, hexadecimal
values, or hexadecimal expressions can be used to specify the address.
PhysicalAddress Specifies the physical or real address of the starting memory area to display. Symbols, hexadecimal values,
or hexadecimal expressions can be used to specify the address.
count Specifies the number of bytes for ddvb and ddpb to display, specifies the number of half words for ddvh
and ddph to display, specifies the number of words for ddvw and ddpw to display and specifies the
number of double words for ddvd and ddpd to display. The count argument is a hexadecimal value.
I/O space memory (Direct Store Segment (T=1)) cannot be accessed when translation is disabled. The
areas mapped by the bat command areas must also be accessed with translation enabled. Otherwise,
cache controls are ignored.
Note: The subcommands that use effective addresses assume that mapping to real addresses is currently
valid. No check is done by the KDB kernel debugger. The subcommands that use real addresses can be
used to let KDB kernel debugger perform the mapping (attach and detach).
Other
Format
findp [-sstring]
Parameters
Item Description
-s Indicates the pattern to be searched for is an ASCII string.
EffectiveAddress Specifies the effective or virtual address. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify the address.
PhysicalAddress Specifies the physical or real address. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify the address.
string Specifies the ASCII string to search for if the -s option is specified. The period (.) is used to match any
character.
pattern Specifies the hexadecimal value of the pattern to search for. The pattern is limited to one word in length.
mask If a pattern is specified, a mask can be specified to eliminate bits from consideration for matching purposes.
This parameter is a one-word hexadecimal value.
delta Specifies the increment to move forward after an unsuccessful match. This parameter is a one-word
hexadecimal value.
The pattern that is searched for can either be an ASCII string, if the -s option is used, or a one word
hexadecimal value. If the search is for an ASCII string, the period (.) can be used to match any character.
A mask parameter can be used if the search is for a hexadecimal value. The mask is used to eliminate bits
from consideration. When it is checking for matches, the value from memory is ended with the mask and
then compared to the specified pattern for matching. For example, a mask of 7fffffff indicates that the
high bit is not to be considered. If the specified pattern was 0000000d and the mask was 7fffffff, the
values 0000000d and 8000000d are both considered matches.
A parameter can also be specified to indicate the delta that is applied to determine the next address to
check for a match. This ensures that the matching pattern occurs on specific boundaries. For example, if
you want to find the 0f0000ff pattern aligned on a 64-byte boundary, the following subcommand could
be used:
find 0f0000ff ffffffff 40
If the find or findp subcommands find the specified pattern, the data and address are displayed.
Continue the search from that point by pressing the Enter key.
Other
No aliases.
Examples
The following is an example of how to use the find and the findp subcommands:
KDB(0)> tpid //print current thread
SLOT NAME STATE TID PRI CPUID CPU FLAGS WCHAN
Parameters
Item Description
-p Indicates that the delta argument is the offset to a pointer to the next area.
EffectiveAddress Specifies the effective or virtual address at which to begin displaying values. Symbols, hexadecimal values,
or hexadecimal expressions can be used to specify the address.
PhysicalAddress Specifies the physical or real address at which to begin displaying values. Symbols, hexadecimal values, or
hexadecimal expressions can be used to specify the address.
delta Specifies the offset to the next area to be displayed or the offset from the beginning of the current area to a
pointer to the next area. This argument is a hexadecimal value.
size Specifies the hexadecimal value that indicates the number of words to display.
count Specifies the hexadecimal value that indicates the number of entries to traverse.
If the -p flag is not specified, these subcommands display the number of words indicated in the size
argument. They then increment the address by the delta and display the data at that location. This
procedure is repeated for the number of times indicated in the count parameter.
If the -p flag is specified, these subcommands display the number of words indicated by the size
parameter. The next address from which data is to be displayed is then determined by using the value at
the current address plus the offset indicated in the delta parameter (for example, *(addr+delta)). This
procedure is repeated for the number of times indicated in the count parameter.
If an array exists, it can be traversed displaying the specified area for each entry of the array. These
subcommands can also be used to traverse a linked list displaying the specified area for each entry.
Other
No aliases.
Examples
The following is an example of how to use the exp and the expt subcommands:
KDB(0)> ppda
KDB(0)>
These subcommands are only available within the KDB kernel debugger. They are not included in the
kdb command.
Format
m effectiveaddress
mw effectiveaddress
md effectiveaddress
mp physicaladdress
mpd physicaladdress
Parameters
Item Description
effectiveaddress Specifies the effective or virtual address of the starting memory area to modify. Symbols, hexadecimal
values, or hexadecimal expressions can be used to specify the address.
physicaladdress Specifies the physical or real address of the starting memory area to modify. Symbols, hexadecimal values,
or hexadecimal expressions can be used to specify the address.
These subcommands are interactive. Each modification is entered one-by-one. The first unexpected input
stops modification. For example, a period (.) can be used to indicate the end of the data. If a break point
is set at the same address, use the mw subcommand to maintain break point coherency.
Other
No aliases.
Examples
Format
st EffectiveAddress Value
Parameters
Item Description
EffectiveAddress Specifies the effective address to which the data will be stored. Hexadecimal values or hexadecimal
expressions can be used in specification of the address.
Value Specifies the data value to be stored. The value stored is:
v One word if you use the st subcommand
v One character if you use the stc subcommand
v One half-word if you use the sth subcommand
Other
No aliases.
Examples
The following is an example of how to use the st, the stc and the sth subcommands:
KDB(0)> dw 20
00000020: 00000000 00000000 00000000 00000000 ................
KDB(0)> st 20 11111111
KDB(0)> dw 20
00000020: 11111111 00000000 00000000 00000000 ................
KDB(0)> st 20 2
KDB(0)> dw 20
00000020: 00000002 00000000 00000000 00000000 ................
KDB(0)> st 20 0
KDB(0)> dw 20
00000020: 00000000 00000000 00000000 00000000 ................
KDB(0)> stc 20 33
KDB(0)> dw 20
00000020: 33000000 00000000 00000000 00000000 3...............
KDB(0)> st 20 0
KDB(0)> dw 20
00000020: 00000000 00000000 00000000 00000000 ................
KDB(0)> sth 20 4444
KDB(0)> dw 20
00000020: 44440000 00000000 00000000 00000000 DD..............
KDB(0)> st 20 0
KDB(0)> dw 20
00000020: 00000000 00000000 00000000 00000000 ................
Note: These subcommands are only available within the KDB kernel debugger. They are not included in
the kdb command.
Format
mdvb effectiveaddress
mdvh effectiveaddress
mdvw effectiveaddress
mdvd effectiveaddress
mdpb physicaladdress
mdph physicaladdress
mdpw physicaladdress
mdpd physicaladdress
Parameters
Item Description
effectiveaddress Specifies the virtual (effective) address of the memory to modify. It can be symbols, hexadecimal values, or
hexadecimal expressions.
physicaladdress Specifies the real (physical) address of the memory to modify. It can be symbols, hexadecimal values, or
hexadecimal expressions.
To avoid bad effects, memory is not read before, only the specified write is performed with translation
enabled. Access can be in bytes, half words, words or double words.
Note: The subcommands using effective addresses assume that mapping to real addresses is currently
valid. No check is done by KDB kernel debugger. The subcommands using real addresses allow KDB
kernel debugger to do the mapping (attach and detach).
Other
Examples
mr subcommand
The mr subcommand modifies general purpose, segment, special, or floating point registers.
Format
mr [gp | sr | sp | fp | reg_name]
Parameters
Item Description
gp Modifies general purpose registers.
sr Modifies segment registers.
sp Modifies special purpose registers.
fp Modifies floating point registers.
reg_name Modifies a specific register by name.
Individual registers can also be selected for modification by register name. The current thread context is
used to locate the register values to be modified. Use the sw subcommand to change the context to other
threads. When the register being modified is in the mst subcommand context, the KDB kernel debugger
alters the Machine Save State Area. When the register being modified is a special register, the register is
altered immediately. Symbolic expressions are allowed as input.
If the gp, sr, sp, or fp options are used, modification of all of the registers in the group is allowed. The
current value for a single register is shown and modification is allowed. Then, the value for the next
register is displayed for modification. Entry of an invalid character, such as a period (.), ends
modification of the registers. If the value for a register is to be left unmodified, press Enter to continue to
the next register for modification.
Other
No aliases.
Note: The vr0 register modifies the current vector register contents. The vector register state of the
current thread is not modified unless the thread is the current owner of the vector unit. The 16-byte
vector input is entered as 8 bytes followed by a carriage return and then followed by 8 bytes.
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
Parameters
Item Description
-p Indicates that the breakpoint address is a physical or real address.
-v Indicates that the breakpoint address is a effective or virtual address.
address Specifies the address of the breakpoint. This may either be a physical address or a virtual address. Symbols,
hexadecimal values, or hexadecimal expressions can be used to specify the address.
If an invalid instruction is detected, a warning message is displayed. If the warning message is displayed,
the breakpoint should be removed; otherwise, memory can be corrupted.
Other
brk
Examples
lb subcommand
The lb subcommand sets a permanent local breakpoint in the code for a specific context.
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
Parameters
Item Description
-p Indicates that the breakpoint address is a physical or real address.
-v Indicates that the breakpoint address is an effective or virtual address.
address Specifies the address of the breakpoint. This can be either an effective or physical address. Symbols,
hexadecimal values, or hexadecimal expressions can be used to specify the address.
The context can either be CPU-based or thread-based. Either context is controllable through a “set
subcommand” on page 33 option. Each lb subcommand associates one context with the local breakpoint
and up to eight different contexts can be set for each local breakpoint. The context is the effective address
of the current thread entry in the thread table or the current processor number.
If the lb subcommand is used with no parameters, all current trace and breakpoints are displayed.
If an address is specified, the break is set with the context of the current thread or CPU. To set a break
using a context other than the current thread or CPU, change the current context using the “sw
subcommand” on page 43 and the “cpu subcommand” on page 45.
If a local breakpoint is hit with a context that was not specified, a message is displayed, but a break does
not occur.
By default, KDB kernel debugger chooses the current state of the machine. If the subcommand is entered
before VMM initialization, the address is the physical address or real address. If the subcommand is
entered after VMM initialization, the address is the effective or virtual address. After VMM is setup, the
-p parameter must be used to set a breakpoint in real-mode for code that is not mapped V=R. Otherwise,
the KDB kernel debugger expects a virtual address and translates the address.
Other
lbrk
Examples
csa......................2FEE0000 mstack...................0037CDB0
fpowner..................00000000 curthread................E60008C0
...
KDB(0)> lb kexit //set local break point on kexit()
.kexit+000000 (sid:00000000) permanent & local < ctx: thread+0008C0 >
KDB(0)> b //display current active break points
0: .execve+000000 (sid:00000000) permanent & global
1: .kexit+000000 (sid:00000000) permanent & local < ctx: thread+0008C0 >
KDB(0)> e //exit debugger
...
Warning, breakpoint ignored (context mismatched):
.kexit+000000 mflr r0 <._exit+000020>
Breakpoint
.kexit+000000 mflr r0 <._exit+000020>
KDB(0)> ppda //print current processor data area
csa......................2FEE0000 mstack...................0037CDB0
fpowner..................00000000 curthread................E60008C0
...
KDB(0)> lc 1 thread+0008C0 //remove local break point slot 1
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
ca
Parameters
Item Description
-p Indicates that the breakpoint address is a physical or real address.
-v Indicates that the breakpoint address is an effective or virtual address.
slot Specifies the slot number of the breakpoint. This parameter must be a decimal value.
Address Specifies the address of the breakpoint. This may either be a physical or virtual address. Symbols,
hexadecimal values, or hexadecimal expressions can be used to specify the address.
ctx Specifies the context to be cleared for a local break. The context may either be a CPU or thread
specification.
The ca subcommand erases all breakpoints. The c and lc subcommands erase only the specified
breakpoint. The c subcommand clears all contexts for a specified breakpoint. The lc subcommand can be
used to clear a single context for a breakpoint. If a specific context is not specified, the current context is
used to determine which local breakpoint context to remove.
Note: Slot numbers are not fixed. To clear slot 1 and slot 2 type c 2; c 1 or type c 1; c 1. Do not enter
c 1; c 2.
Other
c – cl
lc – lcl
Examples
r and gt subcommands
The r and gt subcommands set non-permanent breakpoints. Non-permanent breakpoints are local
breakpoints that are cleared after they are used.
Note: This subcommand is only available within the KDB kernel debugger. It is not included in the kdb
command.
Format
Parameters
Item Description
-p Indicates that the breakpoint address is a physical or real address.
-v Indicates that the breakpoint address is an effective or virtual address.
address Specifies the address of the breakpoint. This may either be a physical or real address. Symbols, hexadecimal
values, or hexadecimal expressions may be used in specification of the address.
The r subcommand sets a breakpoint on the address found in the lr register. In the SMP environment, it
is possible to reach this breakpoint on another processor. For this reason, it is important to use the thread
or process local break point.
By default, the KDB kernel debugger chooses the current state of the machine. If the subcommand is
entered before VMM initialization, the address is physical. If the subcommand is entered after VMM
initialization, the address is virtual (effective address). After VMM is initialized, the -p flag must be used
to set a breakpoint in real-mode code that is not mapped V=R, otherwise KDB kernel debugger expects a
virtual address and translates the address.
Other
r – return
gt has no aliases.
Examples
n, s, S, and B subcommand
The n, s, S and B subcommands provide step functions.
Note: These subcommands are only available within the KDB kernel debugger. They are not included in
the kdb command.
n [count]
s [count]
S [count]
B [count]
Parameters
Item Description
count Specifies the number of times the subcommand runs.
n Runs the number of instructions specified by count, but it treats subroutine calls as a single instruction. If
specified without a number, it runs one instruction.
s Runs the number of instructions specified by the count parameter.
S Runs instructions until it encounters a bl or br branch instruction. If the count parameter is used, the
number specifies how many bl and br instructions are reached before the KDB Kernel Debugger stops.
B Runs instructions until it encounters any branch instruction. If the count parameter is used, the number
specifies how many branch instructions are reached before the KDB Kernel Debugger stops.
On POWER processor-based machines, steps are implemented with the SE bit of the msr status register
of the processor. This bit is automatically associated with the thread or process context. The thread or
process context can migrate from one processor to another.
You can interrupt any of these subcommands by pressing the Del key. Every time the KDB kernel
debugger takes a step, it checks to see whether the Del key was pressed. This allows you to break into
the KDB kernel debugger if the call is taking an inordinate amount of time.
If no intervening subcommands are run, any of the step commands can be repeated by pressing the Enter
key.
Be aware that when you use these subcommands, an exception to the processor is made for each of the
debugged program's instruction. One side-effect of exceptions is that it breaks reservations. The stcwx
instruction cannot succeed if any breakpoint occurred after the last larwx instruction. The net effect is
that you cannot use these subcommands with lock and atomic routines. If you do, you loop in the lock
routine.
Some instructions are broken by exceptions. For example, rfi moves to and from srr0 srr1. The KDB
kernel debugger tries to prevent this by printing a warning message.
When you want to take control of a sleeping thread, switch to the sleeping thread with the sw
subcommand and type the s subcommand. The step is set inside the thread context, and when the thread
runs again, the step breakpoint occurs.
Other
Note: Debugger trace points subcommands are specific to the KDB kernel debugger. They are not
available in the kdb command.
bt subcommand
The bt subcommand traces each a specified address each time it is run.
Format
Parameters
Item Description
-p Indicates that the trace address is a physical or real address.
-v Indicates that the trace address is an effective or virtual address.
address Specifies the address of the trace point. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify an address.
script Lists subcommands to be run each time the indicated trace point is run. The script is delimited by quote (")
characters and commands within the script are delimited by semicolons (;).
Each time a trace point is encountered, a message is displayed indicating that the trace point was
encountered. The displayed message indicates the first entry from the stack. However, this can be
changed by using the script parameter.
If the bt subcommand is invoked with no parameters, the current list of break and trace points is
displayed. The number of combined active trace and break points is limited to 32.
It is possible to specify whether the trace address is a physical or a virtual address with the -p and -v
options respectively. By default, the KDB kernel debugger chooses the current state of the machine. If the
subcommand is entered before VMM initialization, the address is the physical or real address. If the
subcommand is entered after VMM initialization, the address is the effective or virtual address.
The segment id (sid) is always used to identify a trace point because effective or virtual addresses can
have multiple translations in several virtual spaces. When debugging is resumed after a trace point is
encountered, kdb must reinstall the correct instruction. During this time (one step if no interrupt is
encountered), it is possible to miss the trace on other processors.
The script parameter allows a set of kdb subcommands to run when a trace point is reached. The set of
subcommands comprising the script must be delimited by double quote characters ("). Individual
subcommands within the script must be ended by a semicolon (;). One of the most useful subcommands
that can be used in a script is the “test subcommand” on page 84. If this subcommand is included in the
script, each time the trace point is reached the condition of the test subcommand is checked by the KDB
kernel debugger. If the condition is true, a break occurs.
Other
No aliases.
Examples
Open routine is traced with a script to display iar and lr registers and to show what is pointed to by the
first parameter (r3).
KDB(0)> bt open "dr iar; dr lr; d @r3" //enable trace on open()
KDB(0)> bt //display current active traces
0: .open+000000 (sid:00000000) trace {hit: 0} {script: dr iar; dr lr;d @r3}
KDB(0)> e //exit debugger
iar : 001C5BA0
.open+000000 mflr r0 <.svc_flih+00011C>
lr : 00003B34
.svc_flih+00011C lwz toc,4108(0) toc=TOC,4108=g_toc
2FF7FF3F: 7362 696E 0074 6D70 0074 6F74 6F00 7500 sbin.tmp.toto.u.
KDB(0)> bt //display current active traces
0: .open+000000 (sid:00000000) trace {hit: 1} {script: dr iar; dr lr;d @r3}
KDB(0)> ct open //clear trace on open
KDB(0)>
This example shows how to trace and stop when a condition is true. For example, when global data is
greater than the specified value, and 923 hits were necessary to reach this condition.
KDB(0)> bt sys_timer "[ @time >= 2b8c8c00 ] " //enable trace on sys_timer()
KDB(0)> e //exit debugger
...
Enter kdb [ @time >= 2b8c8c00 ]
KDB(0) bt //display current active traces
0: .sys_timer+000000 (sid:00000000) trace {hit: 923} {script: [ @time >= 2b8c8c00 ] }
KDB(0)> cat //clear all traces
test subcommand
The test subcommand can be used in conjunction with the bt subcommand to break at a specified
address when a condition becomes true.
Format
test cond
Parameters
Item Description
cond Specifies the conditional expression that evaluates to a value of either true or false.
The conditional test requires two operands and a single operator. Operands include symbols, hexadecimal
values, and hexadecimal expressions. Comparison operators that are supported include: ==, !=, >=, <=, >,
and <. Additionally, the bitwise operators ^ (exclusive OR), & (AND), and | (OR) are supported. When
bitwise operators are used, any non-zero result is considered to be true.
The syntax for the test subcommand requires that the operands and operator be delimited by spaces. This
is very important to remember if the left square bracket ( [ ) alias is used. For example, the subcommand
test kernel_heap != 0 can be written as [ kernel_heap != 0 . However, this subcommand is not valid if
kernel_heap, !=, and 0 were not preceded by and followed by spaces.
Examples
The following is an example of how to use the [ alias for the test subcommand:
KDB(0)> bt open "[ @sysinfo >= 3d ]" //stop on open() if condition true
KDB(0)> e //exit debugger
...
Enter kdb [ @sysinfo >= 3d ]
KDB(1)> bt //display current active trace break points
0: .open+000000 (sid:00000000) trace {hit: 1} {script: [ @sysinfo >= 3d ]}
KDB(1)> dw sysinfo 1 //print sysinfo value
sysinfo+000000: 0000004A
Format
cat
Parameters
Item Description
slot Identifies the slot number for a trace point. This parameter must be a decimal value.
-p Indicates the trace address is a physical or real address.
-v Indicate the trace address is an effective or virtual address.
Address Identifies the address of the trace point. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify an address.
You can specify the trace point cleared by the ct subcommand by a slot number or by an address. By
default, KDB kernel debugger chooses the current state of the machine. If the subcommand is entered
before VMM initialization, the address is the physical or real address. If the subcommand is entered after
VMM initialization, the address is the effective or virtual address.
Note: Slot numbers are not fixed. To clear slot 1 and slot 2 type ct 2; ct 1 or typect 1; ct 1. Do not
type ct 1; ct 2.
Other
No aliases.
Examples
The following is an example of how to use the cat and the ct subcommands:
KDB(0)> bt open //enable trace on open()
KDB(0)> bt close //enable trace on close()
KDB(0)> bt readlink //enable trace on readlink()
KDB(0)> bt //display current active traces
0: .open+000000 (sid:00000000) trace {hit: 0}
1: .close+000000 (sid:00000000) trace {hit: 0}
2: .readlink+000000 (sid:00000000) trace {hit: 0}
wr, ww, wrw, cw, lwr, lww, lwrw, and lcw subcommands
The wr subcommand stops on a load instruction. The ww subcommand stops on a store instruction. The
wrw subcommand stops either on a load or a store instruction. The cw subcommand clears the last watch
subcommand. The lwr, lww, lwrw, and lcw subcommands allow you to establish a watchpoint for a
specific processor.
Note: These subcommands are only available within the KDB kernel debugger. They are not included in
the kdb command.
Format
cw
lcw
Parameters
Item Description
-e Indicates that the address parameter is an effective or virtual address.
-p Indicates that the address parameter is a physical or real address.
-v Indicates that the address parameter is a virtual or effective address.
address Specifies the address to watch. Symbols, hexadecimal values, or hexadecimal expressions can be used to
specify the address. If the address type is not specified, it is assumed to be an effective address.
size Indicates the number of bytes to watch. This parameter is a decimal value.
A watch register can be used on the Data Address Breakpoint Register (DABR) or HID5 on PowerPC 601
RISC Microprocessor to enter KDB kernel debugger when a specified effective address is accessed. The
register holds a double-word effective address and bits to specify load and store operations.
With no parameter, the wr, ww and wrw subcommands print the current active watch subcommand.
Other
wr – stop-r
ww – stop-w
wrw – stop-rw
cw – stop-cl
lwr – lstop-r
lww – lstop-w
lwrw – lstop-rw
lcw – lstop-cl
Examples
The following is an example of how to use the ww, the wr and the cw subcommands:
KDB(0)> ww -p emulate_count //set a data break point (physical address, write mode)
KDB(0)> ww //print current data break points
CPU 0: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
CPU 1: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
KDB(0)> e //exit the debugger
...
Watch trap: 00238360 <emulate_count+000000>
power_asm_emulate+00013C stw r28,0(r30) r28=0000003A,0(r30)=emulate_count
KDB(0)> ww //print current data break points
CPU 0: emulate_count+000000 paddr=00238360 size=8 hit=1 mode=W
CPU 1: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
KDB(0)> wr sysinfo //set a data break point (read mode)
KDB(0)> wr //print current data break points
CPU 0: sysinfo+000000 eaddr=003BA9D0 vsid=00000000 size=8 hit=0 mode=R
CPU 1: sysinfo+000000 eaddr=003BA9D0 vsid=00000000 size=8 hit=0 mode=R
KDB(0)> e //exit the debugger
...
Watch trap: 003BA9D4 <sysinfo+000004>
.fetch_and_add+000008 lwarx r3,0,r6 r3=sysinfo+000004,r6=sysinfo+000004
KDB(0)> cw //clear data break points
Note: These subcommands are only available in the KDB kernel debugger. They are not included in the
kdb command.
Format
cbtac
lcbtac
Parameters
Item Description
-p Indicates that the address parameter is considered to be a physical or real address.
-v Indicates that the address parameter is considered to be a virtual or effective address.
-e Indicates that the address parameter is considered to be an effective or virtual address.
address Specifies the address of the branch target. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify the address.
Other
No aliases.
Examples
The following is an example of how to use the btac, the lbtac and the cbtac subcommands:
KDB(7)> btac open //set BRAT on open function
KDB(7)> btac //display current BRAT status
CPU 0: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 1: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 2: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 3: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 4: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 5: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 6: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 7: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
KDB(7)> e //exit the debugger
...
Branch trap: 001B5354 <.open+000000>
.sys_call+000000 bcctrl <.open>
KDB(5)> btac //display current BRAT status
CPU 0: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 1: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 2: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 3: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 4: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 5: .open+000000 eaddr=001B5354 vsid=00000000 hit=1
CPU 6: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
CPU 7: .open+000000 eaddr=001B5354 vsid=00000000 hit=0
KDB(5)> lbtac close //set local BRAT on close function
nm and ts subcommands
The nm subcommand translates symbols to addresses. The ts subcommand translates addresses to
symbolic representations.
Format
nm symbol
ts effectiveaddress
Parameters
Item Description
symbol Specifies the symbol name.
effectiveaddress Specifies the effective address to be translated. This parameter can be a hexadecimal value or an expression.
Other
No aliases.
Examples
ns subcommand
The ns subcommand toggles symbolic name translation on and off.
ns
Parameters
No parameters.
Other
No aliases.
Examples
The following is an example of how to use the ns subcommand:
KDB(0)> dc d000 5 //display code at address D000
___memcmp+000000 cmpw cr1,r3,r4
___memcmp+000004 srwi. r12,r5,2
___memcmp+000008 clrlwi r11,r5,1E
___memcmp+00000C li r7,0
___memcmp+000010 beq- cr1.eq,<__memcmp+000050>
KDB(0)> ns //disable symbol printing
Symbolic name translation off
KDB(0)> dc d000 5 //display code at address D000
0000D000 cmpw cr1,r3,r4
0000D004 srwi. r12,r5,2
0000D008 clrlwi r11,r5,1E
0000D00C li r7,0
0000D010 beq- cr1.eq,<0000D050>
KDB(0)> ns //enable symbol printing
Symbolic name translation on
KDB(0)>
which subcommand
The which subcommand displays the name of the kernel source file that contains the address.
Format
which | address
Parameters
Item Description
address Locates the kernel source file that contains the symbol at the specified address and displays the following:
v The symbol corresponding to the address
v The start address of the symbol
v The kernel source file name containing the symbol
Other
wf
Examples
Format
Parameters
Item Description
Bid Identifies the Bus Identifier of the PCI bus.
PCIslot Combines the device number on the PCI bus and the function number on that PCI slot. The combination
uses the following formula:
PCIslot = (device_num * 8) + function
RegOffset Identifies a zero-based byte offset of the register to read in a PCI Configuration Space.
Other
No aliases.
Examples
The following is an example of how to use the dpcib, the dpcih, and dpciw subcommands:
KDB(0)> businfo //get PCI bus id
********** PCI BUSES ***********
ADDRESS BID BUS_NUM PHB_UNIT_ID REGIONS
30043400 900000C0 00000000 00000000FEF00000 00000004
30043500 900000C1 00000040 00000000FEE00000 00000002
********** OTHER BUSES ***********
ADDRESS BID BUS_NUM PHB_UNIT_ID REGIONS
00459AE0 90000040 00000000 0000000000000000 00000001
00459F60 90000100 00000000 0000000000000000 00000002
0045AB60 90000300 00000000 0000000000000000 00000001
KDB(0)> dpcib 900000c0 01 4 //display byte of data
00000104: 46
KDB(0)> dpcih 900000c0 01 4 //display halfword of data
00000104: 4600
KDB(0)> dpciw 900000c0 01 4 //display word of data
00000104: 46008022
Parameters
Item Description
Bid Identifies the Bus Identifier of the PCI bus.
PCIslot Combines the device number on the PCI bus and the function number on that PCI slot. The combinations
uses the following formula:
PCIslot = (device_num * 8) + function
RegOffset Identifies a zero-based byte offset of the register to read in a PCI Configuration Space.
These commands are interactive and each modification is entered one-by-one. The first unexpected input
stops modification. A period (.), for example, can be used to indicate the end of the data.
Other
No aliases.
Examples
The following is an example of how to use the mpcib, the mpcih, and the mpciw subcommands:
KDB(0)> businfo //get PCI bus id
********** PCI BUSES ***********
ADDRESS BID BUS_NUM PHB_UNIT_ID REGIONS
30043400 900000C0 00000000 00000000FEF00000 00000004
30043500 900000C1 00000040 00000000FEE00000 00000002
********** OTHER BUSES ***********
ADDRESS BID BUS_NUM PHB_UNIT_ID REGIONS
00459AE0 90000040 00000000 0000000000000000 00000001
00459F60 90000100 00000000 0000000000000000 00000002
0045AB60 90000300 00000000 0000000000000000 00000001
KDB(0)> dpciw 900000c0 80 10 //display word of data
00008010: 01F0FF00
KDB(0)> mpciw 900000c0 80 10 //modify word
00008010: 01F0FF00 = ffffffff
00008014: 00A010C0 = .
KDB(0)> dpciw 900000c0 80 10 //display new word of data
00008010: E1FFFFFF
KDB(0)> mpciw 900000c0 80 10 (reset word)
00008010: E1FFFFFF = 01F0FF00
00008014: 00A010C0 = .
KDB(0)> dpciw 900000c0 80 10 //display reset word
00008010: 01F0FF00
KDB(0)> mpcib 900000c0 80 10 //modify specifying bytes
00008010: 01 = ff
00008011: F0 = ff
00008012: FF = ff
00008013: 00 = ff
00008014: 00 = .
KDB(0)> dpciw 900000c0 80 10 //display new word of data
00008010: E1FFFFFF
KDB(0)> mpciw 900000c0 80 10 //reset word
00008010: E1FFFFFF = 01F0FF00
00008014: 00A010C0 = .
buserr subcommand
The buserr subcommand allows PCI bus error injection and manual exercise of EEH capabilities on a PCI
slot.
Format
Parameters
Item Description
bid Specifies the bus id. It must be a hexadecimal value.
slot Specifies the slot number. It must be a hexadecimal value.
operation Specifies the operation code. Accepted values are:
v 1 - Query slot capabilities and slot state. Displays the state of a slot and information about whether EEH
is supported by the slot.
v 2 - Set slot state. Allows enabling or disabling EEH on a slot or enabling load, store or DMA operation.
v 3 - Inject a bus error. Performs error injection on a specified bus and slot at a given bus address. The
errors can be injected in either memory, I/O or configuration address spaces of a PCI bus. Also, the
errors can be on a load or store operation.
v 4 - Reset slot. This is a way to recover from an EEH event. This operation code can be used to assert and
deassert the reset signal on the bus. The reset signal should be asserted for at least 100 milliseconds
before deasserting it.
v 5 - Configure PCI bridge on the adapter. Allows the bridge on an adapter to be configured following a
slot reset. This is a required step in complete error recovery for the bridged-adapters such as Ethernet
cards.
Other
No aliases.
Examples
Reset Slot
----------
Success
Reset Slot
----------
Success
businfo subcommand
The businfo subcommand displays information about all registered buses or about a specified bus.
Format
Parameters
Other
No aliases.
Examples
var subcommand
The var subcommand prints the var structure and the system configuration of the machine.
Format
var
Parameters
No parameters.
Other
No aliases.
Examples
_SYSTEM_CONFIGURATION:
drvars subcommand
The drvars subcommand displays the global state of Dynamic Reconfiguration (DR) from the drvars
structure, and displays state about any current DR operation from the drparms and drvars structures.
Format
drvars
Parameters
No parameters.
Other
No aliases.
Examples
drp_operation..... 00000000
drp_op_idx........ FFFFFFFF
drp_phase......... FFFFFFFF
drp_errno......... 00000000
drp_secs.......... 00000000
drp_flags......... 00000000
drp_pid........... FFFFFFFF
drp_trb........... @ F10010F003FFC280 KERN_heap+3FFC280
DRvars:
drbits............ 00000000
flags............. 00000000
lmb_addr.......... 0000000270000000
lmb_size.......... 0000000010000000
RMO_size.......... 0000000040000000
sys_lmbsize....... 0000000010000000
max_num_lmbs...... 00000024
actual_num_lmbs... 00000024
fixed_nfr......... 0000000000000000
dead_nfrs......... 00000000
lrudr_running..... 00
gencount.......... 0000000000000006
l_cpuX............ 00000000
l_cpuX_halted..... 00000000
l_cpuY............ 00000000
n_mpcs............ 00000000
gserver........... 00000000
server............ 00000000
trace............. 00000000
ipl subcommand
The ipl subcommand displays information about IPL control blocks.
Format
Parameters
Item Description
* Displays summary information for all CPUs.
cpu Specifies the CPU number for the IPL control block to be displayed. The CPU is specified as a decimal
value.
index Displays the specified index.
Other
iplcb
Examples
num_of_structs.........00000008 index..................00000004
struct_size............000000C8 per_buc_info_offset....0001D5D0
proc_int_area..........FF100200 proc_int_area_size.....00000010
processor_present......00000001 test_run...............0000006A
test_stat..............00000000 link...................00000000
link_address...........00000000 phys_id................00000004
architecture...........00000002 implementation.........00000008
version................00010005 width..................00000020
cache_attrib...........00000003 coherency_size.........00000020
resv_size..............00000020 icache_block...........00000020
dcache_block...........00000020 icache_size............00008000
dcache_size............00008000 icache_line............00000040
dcache_line............00000040 icache_asc.............00000008
dcache_asc.............00000008 L2_cache_size..........00100000
L2_cache_asc...........00000001 tlb_attrib.............00000003
itlb_size..............00000100 dtlb_size..............00000100
itlb_asc...............00000002 dtlb_asc...............00000002
slb_attrib.............00000000 islb_size..............00000000
dslb_size..............00000000 islb_asc...............00000000
(4)> more (^C to quit) ? //continue
dslb_asc...............00000000 priv_lck_cnt...........00000000
prob_lck_cnt...........00000000 rtc_type...............00000001
rtcXint................00000000 rtcXfrac...............00000000
busCfreq_HZ............00000000 tbCfreq_HZ.............00000000
devsw subcommand
The devsw subcommand displays device switch table entries.
Format
Parameters
100 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
major Indicates the specific device switch table entry to be displayed by the major number. This is a hexadecimal
value.
address Specifies the effective address of a driver. The device switch table entry with the driver closest to the
indicated address is displayed. The specific driver is indicated. Symbols, hexadecimal values, or
hexadecimal expressions can be used to specify the address.
Other
dev
Examples
The following is an example of how to use the dev alias for the devsw subcommand:
KDB(0)> dev
Slot address 054F5040
MAJ#001 OPEN CLOSE READ WRITE
.syopen .nulldev .syread .sywrite
IOCTL STRATEGY TTY SELECT
.syioctl .nodev 00000000 .syselect
CONFIG PRINT DUMP MPX
.nodev .nodev .nodev .nodev
REVOKE DSDPTR SELPTR OPTS
.nodev 00000000 00000000 00000002
intr subcommand
The intr subcommand prints a summary for entries in the interrupt handler table if no parameter or a
slot number is entered.
Format
Parameters
If no parameter is entered, the summary contains information for all entries. If a slot number is specified,
only the selected entries are displayed. If an address parameter is entered, detailed information is
displayed for the specified interrupt handler.
Other
No aliases.
Examples
102 AIX Version 6.1: KDB kernel debugger and kdb command
dpriv subcommand
The dpriv subcommand displays mapping for privilege by names for a given slot.
Format
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Item Description
-eff Displays effective privileges
-max Displays maximum privileges
-inh Displays inheritable privileges
-lim Displays limiting privileges
-used Displays used privileges
th-slot/eaddr Specifies the slot number
Other
dpr
Example
The following is an example of how to use the dpr alias for the dpriv subcommand:
KDB(0)> dpr -eff
====================
Effective Privileges
====================
PV_AU_ PV_AU_ADD
PV_AU_ADMIN PV_AU_READ
PV_AU_WRITE PV_AU_PROC
PV_RESERVED_71 PV_RESERVED_72
PV_AZ_ADMIN PV_AZ_READ
PV_AZ_CHECK PV_RESERVED_77
PV_RESERVED_78 PV_PROBEVUE_RASE
PV_DAC_ PV_DAC_R
PV_DAC_W PV_DAC_X
PV_DAC_O PV_DAC_UID
PV_DAC_GID PV_DAC_RID
PV_RESERVED_88 PV_PROBEVUE_
PV_PROBEVUE_TRC_USER PV_PROBEVUE_TRC_USER_SELF
PV_PROBEVUE_TRC_SYSCALL PV_PROBEVUE_TRC_SYSCALL_SELF
PV_PROBEVUE_TRC_KERNEL PV_PROBEVUE_MANAGE
PV_FS_ PV_FS_MOUNT
PV_FS_MKNOD PV_FS_CHOWN
PV_FS_QUOTA PV_FS_LINKDIR
PV_FS_CNTL PV_FS_RESIZE
(0)> more (^C to quit) ?
PV_FS_CHROOT PV_FS_PDMODE
PV_FS_DMAPI PV_RESERVED_107
PV_PROC_ PV_PROC_PRIO
PV_PROC_CORE PV_PROC_RAC
PV_PROC_RSET PV_PROC_ENV
PV_PROC_CKPT PV_PROC_CRED
PV_PROC_SIG PV_PROC_PRIV
PV_PROC_TIMER PV_PROC_RTCLK
PV_PROC_VARS PV_PROC_PDMODE
KDB(0)>
====================
Used Privileges
====================
PV_PROC_PRIO PV_PROC_PRIV
PV_KER_ACCT PV_KER_CONF
KDB(0)>
kernauth subcommand
The kernauth subcommand provides options to display the kernel authorization table for a WPAR ID
and global system.
104 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Item Description
-user Displays user authorizations
-system Displays system authorizations
-ALL Displays both user and system authorizations
cid Specifies the WPAR ID
Other
kat
Examples
The following is an example of how to use kat which is alias for the kernauth subcommand:
KDB(0)> kat -user
user authorizations
--------------------------------------------
nauths....11
name......Backup
flags.....0
aid.......10001
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......Diagnostics
flags.....0
aid.......10002
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......DiskQuotaAdmin
flags.....0
aid.......10003
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......GroupAdmin
flags.....0
aid.......10004
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......ListAuditClasses
flags.....0
aid.......10005
(0)> more (^C to quit) ?
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......PasswdAdmin
flags.....0
aid.......10006
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......PasswdManage
flags.....0
aid.......10007
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......UserAdmin
flags.....0
aid.......10008
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......UserAudit
flags.....0
aid.......10009
106 AIX Version 6.1: KDB kernel debugger and kdb command
nauths....266
name......aix
flags.....0
aid.......10
parent....(0, 0, 0, 0, 0, 0, 0, 0)
name......aix.device
flags.....0
aid.......500
parent....(10, 0, 0, 0, 0, 0, 0, 0)
name......aix.device.config
flags.....0
aid.......520
parent....(10, 500, 0, 0, 0, 0, 0, 0)
name......aix.device.config.path
flags.....0
aid.......525
parent....(10, 500, 520, 0, 0, 0, 0, 0)
name......aix.device.config.printer
flags.....0
aid.......530
(0)> more (^C to quit) ?
parent....(10, 500, 520, 0, 0, 0, 0, 0)
name......aix.device.config.random
flags.....0
aid.......535
parent....(10, 500, 520, 0, 0, 0, 0, 0)
name......aix.device.config.tty
flags.....0
aid.......540
parent....(10, 500, 520, 0, 0, 0, 0, 0)
name......aix.device.manage
flags.....0
aid.......550
parent....(10, 500, 0, 0, 0, 0, 0, 0)
name......aix.device.manage.change
flags.....0
aid.......555
parent....(10, 500, 550, 0, 0, 0, 0, 0)
name......aix.device.manage.create
flags.....0
aid.......560
parent....(10, 500, 550, 0, 0, 0, 0, 0)
name......aix.device.manage.list
(0)> more (^C to quit) ?
flags.....0
aid.......565
parent....(10, 500, 550, 0, 0, 0, 0, 0)
name......aix.device.manage.remove
flags.....0
aid.......570
parent....(10, 500, 550, 0, 0, 0, 0, 0)
name......aix.device.monitor
flags.....0
aid.......580
parent....(10, 500, 0, 0, 0, 0, 0, 0)
name......aix.device.monitor.tty
flags.....0
aid.......585
parent....(10, 500, 580, 0, 0, 0, 0, 0)
name......aix.device.stat
flags.....0
aid.......650
parent....(10, 500, 0, 0, 0, 0, 0, 0)
name......aix.device.stat.printer
flags.....0
aid.......655
(0)> more (^C to quit) ?
108 AIX Version 6.1: KDB kernel debugger and kdb command
name......aix.fs.manage.snapshot
0)> more (^C to quit) ?
flags.....0
aid.......1090
parent....(10, 1000, 1020, 0, 0, 0, 0, 0)
name......aix.fs.manage.unmount
flags.....0
aid.......1095
parent....(10, 1000, 1020, 0, 0, 0, 0, 0)
name......aix.fs.object
flags.....0
aid.......1120
parent....(10, 1000, 0, 0, 0, 0, 0, 0)
name......aix.fs.object.acl
flags.....0
aid.......1125
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.create
flags.....0
aid.......1140
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.group
flags.....0
aid.......1145
(0)> more (^C to quit) ?
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.list
flags.....0
aid.......1160
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.mode
flags.....0
aid.......1165
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.owner
flags.....0
aid.......1180
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.remove
flags.....0
aid.......1195
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.object.time
flags.....0
aid.......1200
parent....(10, 1000, 1120, 0, 0, 0, 0, 0)
name......aix.fs.stat
0)> more (^C to quit) ?
flags.....0
aid.......1205
parent....(10, 1000, 0, 0, 0, 0, 0, 0)
name......aix.lvm
flags.....0
aid.......2000
parent....(10, 0, 0, 0, 0, 0, 0, 0)
name......aix.lvm.conc
flags.....0
aid.......2020
parent....(10, 2000, 0, 0, 0, 0, 0, 0)
name......aix.lvm.debug
flags.....0
aid.......2040
parent....(10, 2000, 0, 0, 0, 0, 0, 0)
name......aix.lvm.manage
flags.....0
aid.......2050
parent....(10, 2000, 0, 0, 0, 0, 0, 0)
110 AIX Version 6.1: KDB kernel debugger and kdb command
name......aix.lvm.manage.varyon
flags.....0
aid.......2140
parent....(10, 2000, 2050, 0, 0, 0, 0, 0)
name......aix.lvm.perf
(0)> more (^C to quit) ?
flags.....0
aid.......2150
parent....(10, 2000, 0, 0, 0, 0, 0, 0)
name......aix.lvm.perf.stat
flags.....0
aid.......2155
parent....(10, 2000, 2150, 0, 0, 0, 0, 0)
name......aix.lvm.perf.tune
flags.....0
aid.......2160
parent....(10, 2000, 2150, 0, 0, 0, 0, 0)
name......aix.lvm.readlvcopy
flags.....0
aid.......2200
parent....(10, 2000, 0, 0, 0, 0, 0, 0)
name......aix.mls
flags.....0
aid.......3000
parent....(10, 0, 0, 0, 0, 0, 0, 0)
name......aix.mls.boot
flags.....0
aid.......3010
(0)> more (^C to quit) ?
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
name......aix.mls.clear
flags.....0
aid.......3020
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
name......aix.mls.clear.read
flags.....0
aid.......3025
parent....(10, 3000, 3020, 0, 0, 0, 0, 0)
name......aix.mls.clear.write
flags.....0
aid.......3030
parent....(10, 3000, 3020, 0, 0, 0, 0, 0)
name......aix.mls.label
flags.....0
aid.......3050
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
name......aix.mls.label.outsideaccred
flags.....0
aid.......3055
parent....(10, 3000, 3050, 0, 0, 0, 0, 0)
name......aix.mls.label.sl
(0)> more (^C to quit) ?
flags.....0
aid.......3060
parent....(10, 3000, 3050, 0, 0, 0, 0, 0)
name......aix.mls.label.sl.downgrade
flags.....0
aid.......3065
parent....(10, 3000, 3050, 3060, 0, 0, 0, 0)
name......aix.mls.label.sl.upgrade
flags.....0
aid.......3070
parent....(10, 3000, 3050, 3060, 0, 0, 0, 0)
name......aix.mls.label.tl
flags.....0
aid.......3080
parent....(10, 3000, 3050, 0, 0, 0, 0, 0)
112 AIX Version 6.1: KDB kernel debugger and kdb command
name......aix.mls.proc.sl.downgrade
flags.....0
aid.......3265
parent....(10, 3000, 3250, 3260, 0, 0, 0, 0)
name......aix.mls.proc.sl.upgrade
flags.....0
aid.......3270
parent....(10, 3000, 3250, 3260, 0, 0, 0, 0)
name......aix.mls.proc.stat
(0)> more (^C to quit) ?
flags.....0
aid.......3275
parent....(10, 3000, 3250, 0, 0, 0, 0, 0)
name......aix.mls.proc.tl
flags.....0
aid.......3280
parent....(10, 3000, 3250, 0, 0, 0, 0, 0)
name......aix.mls.proc.tl.downgrade
flags.....0
aid.......3285
parent....(10, 3000, 3250, 3280, 0, 0, 0, 0)
name......aix.mls.proc.tl.upgrade
flags.....0
aid.......3290
parent....(10, 3000, 3250, 3280, 0, 0, 0, 0)
name......aix.mls.stat
flags.....0
aid.......3300
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
name......aix.mls.system
flags.....0
aid.......3320
(0)> more (^C to quit) ?
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
name......aix.mls.system.access
flags.....0
aid.......3323
parent....(10, 3000, 3320, 0, 0, 0, 0, 0)
name......aix.mls.system.access.dir
flags.....0
aid.......3325
parent....(10, 3000, 3320, 3323, 0, 0, 0, 0)
name......aix.mls.system.config
flags.....0
aid.......3330
parent....(10, 3000, 3320, 0, 0, 0, 0, 0)
name......aix.mls.system.config.read
flags.....0
aid.......3335
parent....(10, 3000, 3320, 3330, 0, 0, 0, 0)
name......aix.mls.system.label
flags.....0
aid.......3350
parent....(10, 3000, 3320, 0, 0, 0, 0, 0)
name......aix.mls.system.label.read
(0)> more (^C to quit) ?
flags.....0
aid.......3355
parent....(10, 3000, 3320, 3350, 0, 0, 0, 0)
name......aix.mls.system.label.write
flags.....0
aid.......3360
parent....(10, 3000, 3320, 3350, 0, 0, 0, 0)
name......aix.mls.tpath
flags.....0
aid.......3380
parent....(10, 3000, 0, 0, 0, 0, 0, 0)
kernrole subcommand
The kernrole subcommand provides options to display the kernel role table for a WPAR ID and global
system.
114 AIX Version 6.1: KDB kernel debugger and kdb command
Format
kernrole [cid]
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Item Description
cid Specifies the WPAR ID
Other
krt
Example
The following is an example of how to use the krt alias for the kernrole subcommand:
KDB(1)> kernrole 1
roles
--------------------------------------------
nroles....10
name......isso
rid........1
nauths.....43
auths.....(500, 1010, 1055, 1205, 4000, 4520, 4540, 4580, 4590, 6020, 6040, 6070,
6100, 6110, 6150, 6210, 6220, 6240, 6260, 6300, 6320, 6340, 6350, 6380, 6420, 6430, 6440,
7025, 7080, 7085, 7095, 7100, 7105, 7115, 7120, 7130, 7150, 7160, 7165, 7175, 7185, 7220, 9000)
name......sa
rid........2
nauths.....20
auths.....(1030, 1035, 1040, 1045, 1050, 1060, 1065, 1070, 1075, 1080, 1090, 1095,
1120, 2000, 6170, 6450, 7075, 7090, 7170, 7200)
name......so
rid........3
nauths.....11
auths.....(1025, 1085, 4560, 5000, 7025, 7030, 7035, 7040, 7045, 7110, 7180)
name......AccountAdmin
rid........4
nauths.....2
auths.....(6170, 6450)
(1)> more (^C to quit) ?
name......BackupRestore
rid........5
nauths.....2
auths.....(1025, 1085)
name......DomainAdmin
rid........6
nauths.....4
auths.....(6210, 6240, 6300, 6340)
name......FSAdmin
rid........7
nauths.....14
auths.....(1030, 1035, 1040, 1045, 1050, 1060, 1065, 1070, 1075, 1080, 1090, 1095, 1120, 2000)
name......SecPolicy
rid........8
nauths.....14
auths.....(6020, 6040, 6070, 6100, 6110, 6150, 6220, 6260, 6320, 6350, 6380, 6420, 6430, 6440)
name......SysConfig
rid........10
nauths.....16
auths.....(7025, 7080, 7085, 7095, 7100, 7105, 7115, 7120, 7130, 7150, 7160, 7165, 7175,
7185, 7220, 9000)
KDB(1)>
kpct subcommand
The kpct subcommand displays the kernel commands table.
Format
Note: By default all the entries in the commands table are printed out. If the WPAR ID is not specified,
then the global system is displayed.
Parameters
Item Description
-p pathname Displays commands table for the given pathname
cid Specifies the WPAR ID
Example
The following is an example of how to use the kpct subcommand to print a commands table for the
/usr/ccs/bin/probevue directory:
KDB(0)> kpct -p /usr/ccs/bin/probevue
KPCT entries
-----------------------------------------------------------------------
path........./usr/ccs/bin/probevue
accessAuths...(5125, 5135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
privAuths.....(5120, 5125, 5130, 5135, 5110, 5145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
secFlags........FSF_EPS
ruid.........0
innatePrivs
None
inheritPrivs
None
authPrivs
authPrivs[0][0]...04000000 authPrivs[0][1]...00000000 authPrivs[0][2]...00000000
authPrivs[0][3]...00000000 authPrivs[0][4]...00000000 authPrivs[0][5]...00000000
authPrivs[0][6]...00000000 authPrivs[0][7]...00000000
116 AIX Version 6.1: KDB kernel debugger and kdb command
authPrivs[3][0]...20000000 authPrivs[3][1]...00000000 authPrivs[3][2]...00000000
authPrivs[3][3]...00000000 authPrivs[3][4]...00000000 authPrivs[3][5]...00000000
authPrivs[3][6]...00000000 authPrivs[3][7]...00000000
kpdt subcommand
The kpdt subcommand displays the kernel device table.
Format
Note: By default all the entries in the commands table are printed out. If the WPAR ID is not specified,
then the global system is displayed.
Parameters
Item Description
-p pathname Displays commands table for the given pathname
cid Specifies the WPAR ID
Example
The following is an example of how to use the kpdt subcommand to display the device table:
KDB(0)> kpdt
num_entries......1
KPDT entries
-----------------------------------------------------------------------
path........./dev/hd1
readPrivs
PV_LAB_LEF
writePrivs
PV_LAB_LEF
-----------------------------------------------------------------------
kst subcommand
The kst subcommand is a wrapper for displaying kernel security tables. You can use the kst
subcommand to display the data for a specified WPAR ID.
Format
kst [cid]
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Other
No alias
Example
The following is an example of how to use the kst subcommand:
KDB(0)> kst 1
Select the kst information to display:
1) krt
2) wps
3) kat
4) sec_flags
5) kpct
6) kpdt
99) Quit
Enter your choice: 1
roles
--------------------------------------------
nroles....10
name......isso
rid........1
nauths.....43
auths.....(500, 1010, 1055, 1205, 4000, 4520, 4540, 4580, 4590, 6020, 6040, 6070,
6100, 6110, 6150, 6210, 6220, 6240, 6260, 6300, 6320, 6340, 6350, 6380, 6420, 6430, 6440,
7025, 7080, 7085, 7095, 7100, 7105, 7115, 7120, 7130, 7150, 7160, 7165, 7175, 7185, 7220, 9000)
name......sa
rid........2
nauths.....20
auths.....(1030, 1035, 1040, 1045, 1050, 1060, 1065, 1070, 1075, 1080, 1090, 1095,
1120, 2000, 6170, 6450, 7075, 7090, 7170, 7200)
name......so
rid........3
nauths.....11
auths.....(1025, 1085, 4560, 5000, 7025, 7030, 7035, 7040, 7045, 7110, 7180)
name......AccountAdmin
rid........4
nauths.....2
auths.....(6170, 6450)
(0)> more (^C to quit) ?
name......BackupRestore
rid........5
nauths.....2
auths.....(1025, 1085)
name......DomainAdmin
rid........6
nauths.....4
auths.....(6210, 6240, 6300, 6340)
name......FSAdmin
rid........7
nauths.....14
118 AIX Version 6.1: KDB kernel debugger and kdb command
auths.....(1030, 1035, 1040, 1045, 1050, 1060, 1065, 1070, 1075, 1080, 1090,
1095, 1120, 2000)
name......SecPolicy
rid........8
nauths.....14
auths.....(6020, 6040, 6070, 6100, 6110, 6150, 6220, 6260, 6320, 6350, 6380,
6420, 6430, 6440)
name......SysBoot
(0)> more (^C to quit) ?
rid........9
nauths.....5
auths.....(7025, 7030, 7035, 7040, 7045)
name......SysConfig
rid........10
nauths.....16
auths.....(7025, 7080, 7085, 7095, 7100, 7105, 7115, 7120, 7130, 7150, 7160,
7165, 7175, 7185, 7220, 9000)
KDB(0)>
KDB(0)> kst 1
Select the kst information to display:
1) krt
2) wps
3) kat
4) sec_flags
5) kpct
6) kpdt
99) Quit
Enter your choice: 2
wpar privilege set
--------------------------------------------
PV_AU_ PV_AU_ADD
PV_AU_ADMIN PV_AU_READ
PV_AU_WRITE PV_AU_PROC
PV_AZ_ADMIN PV_AZ_READ
PV_AZ_ROOT PV_AZ_CHECK
PV_DAC_ PV_DAC_R
PV_DAC_W PV_DAC_X
PV_DAC_O PV_DAC_UID
PV_DAC_GID PV_DAC_RID
PV_PROBEVUE_TRC_USER PV_PROBEVUE_TRC_USER_SELF
PV_FS_MOUNT PV_FS_MKNOD
PV_FS_CHOWN PV_FS_QUOTA
PV_FS_LINKDIR PV_FS_CNTL
PV_FS_CHROOT PV_FS_PDMODE
PV_PROC_PRIO PV_PROC_CORE
PV_PROC_RAC PV_PROC_ENV
PV_PROC_CKPT PV_PROC_CRED
PV_PROC_SIG PV_PROC_PRIV
PV_PROC_TIMER PV_PROC_RTCLK
PV_PROC_VARS PV_PROC_PDMODE
(0)> more (^C to quit) ?
PV_TCB PV_TP
PV_TP_SET PV_KER_ACCT
PV_KER_DR PV_KER_RAC
PV_KER_EWLM PV_KER_REBOOT
PV_KER_LVM PV_KER_NFS
PV_KER_CONF PV_KER_EXTCONF
KDB(0)>
KDB(0)> kst 1
Select the kst information to display:
1) krt
2) wps
3) kat
4) sec_flags
5) kpct
6) kpdt
99) Quit
Enter your choice: 99
kst <cid>
sec_flags subcommand
The sec_flags subcommand provides options to display the kernel security flags for a WPAR ID.
Format
sec_flags [cid]
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Item Description
cid Specifies the WPAR ID
Other
sf
Example
The following is an example of how to use the sf alias for the sec_flags subcommand:
KDB(1)> sec_flags 1
sec_flags
--------------------------------------------
conf_flags........2
120 AIX Version 6.1: KDB kernel debugger and kdb command
oper_flags........2
runtime_mode......2
mode_status.......0
KDB(1)>
wparprivs subcommand
The wparprivs subcommand provides options for the display of the WPAR privilege set by names for a
WPAR ID.
Format
wparprivs [cid]
Note: If the WPAR ID is not specified, then the global system is displayed.
Parameters
Item Description
cid Specifies the WPAR ID
Other
wps
Example
The following is an example of how to use the wps alias for the wparprivs subcommand:
KDB(1)> wps 1
wpar privilege set
--------------------------------------------
PV_AU_ PV_AU_ADD
PV_AU_ADMIN PV_AU_READ
PV_AU_WRITE PV_AU_PROC
PV_AZ_ADMIN PV_AZ_READ
PV_AZ_ROOT PV_AZ_CHECK
PV_DAC_ PV_DAC_R
PV_DAC_W PV_DAC_X
PV_DAC_O PV_DAC_UID
PV_DAC_GID PV_DAC_RID
PV_PROBEVUE_TRC_USER PV_PROBEVUE_TRC_USER_SELF
PV_FS_MOUNT PV_FS_MKNOD
PV_FS_CHOWN PV_FS_QUOTA
PV_FS_LINKDIR PV_FS_CNTL
PV_FS_CHROOT PV_FS_PDMODE
PV_PROC_PRIO PV_PROC_CORE
PV_PROC_RAC PV_PROC_ENV
PV_PROC_CKPT PV_PROC_CRED
PV_PROC_SIG PV_PROC_PRIV
PV_PROC_TIMER PV_PROC_RTCLK
PV_PROC_VARS PV_PROC_PDMODE
(1)> more (^C to quit) ?
PV_TCB PV_TP
PV_TP_SET PV_KER_ACCT
PV_KER_DR PV_KER_RAC
PV_KER_EWLM PV_KER_REBOOT
PV_KER_LVM PV_KER_NFS
PV_KER_CONF PV_KER_EXTCONF
PV_KER_IPC PV_KER_IPC_R
PV_KER_IPC_W PV_KER_IPC_O
PV_KER_SECCONFIG PV_KER_RAS_ERR
PV_DEV_CONFIG PV_DEV_QUERY
KDB(1)>
ames subcommand
The ames subcommand provides options for the display of the process address map for either the current
process, a specified process, or a specified address map.
Format
Parameters
Item Description
menu options Menu options and parameters can be entered along with the subcommand to avoid display of menus and
prompts.
If this subcommand is invoked without arguments, menus and prompts are used to determine the data to
be displayed. If the menu selections and required values are known they can be entered as subcommand
arguments.
Other
No aliases.
Examples
The following is an example of how to use the ames subcommand:
KDB(0)> ames
VMM AMEs
Select the ame to display by:
1) current process
2) specified process
3) specified address map
Enter your choice: 2
Enter the process id: 0326E
Switch to proc: E2006400
122 AIX Version 6.1: KDB kernel debugger and kdb command
next entry (vme_next) : D0000040
start of range (min_offset) : 30000000
end of range (max_offset) : F0000000
number of entries (nentries) : 00000001
size (size) : 00100000
non-directed map. (min_offset2) : 30000000
reference count (ref_count) : 00000001
hint (hint) : D0000040
first free hint (first_free) : D0000040
entries pageable (entries_pageable): 00000000
VMM SCB Addr B0489BEC Index 00000344 of 0000050B Segment ID: 00008344
//MAPPING SEGMENT
> (_segtype)..... mapping segment
segment info bits (_sibits) : 10000000
default storage key (_defkey) : 0
starting ame (same) : D0000040
ending ame (eame) : D0000040
hint ame (hame) : D0000040
waitlist for change (msegwait) : 00000000
> (mappings).... mappings exist
sibling mmap fork seg (sibling) : 00000000
class ID (classid) : 00000000 0
physical attachments (_att) : 00000000
mmap reference count (refcnt) : 00000001
non-fblu pageout count (npopages) : 0000
xmem attach count (xmemcnt) : 0000
pages in real memory (npages) : 00000000
pinned pages in memory (npinpages): 00000000
lru pageout count (npopages) : 00000000
proc pointer (proc) : E2006400
(0)> more (^C to quit) ?
page frame at head (sidlist) : FFFFFFFF
max assigned page number (maxvpn) : FFFFFFFF
lock (lock) :@B0489C44 00000000
KDB(0)>
apt subcommand
The apt subcommand provides options for display of information from the alias page table.
Format
Parameters
If this subcommand is invoked without arguments, menus and prompts are used to determine the data to
be displayed. If the menu selections and required values are known, they can be entered as subcommand
arguments.
Other
No aliases.
Examples
124 AIX Version 6.1: KDB kernel debugger and kdb command
00003A - 00003B - 00003C - 00003D - 00003E - 00003F - 000040 - 000041 -
000042 - 000043 - 000044 - 000045 - 000046 - 000047 - 000048 - 000049 -
00004A - 00004B - 00004C - 00004D - 00004E - 00004F - 000050 - 000051 -
000052 - 000053 - 000054 - 000055 - 000056 - 000057 - 000058 - 000059 -
00005A - 00005B - 00005C - 00005D - 00005E - 00005F - 000060 - 000061 -
000062 - 000063 - 000064 - 000065 - 000066 - 000067 - 000068 - 000069 -
00006A - 00006B - 00006C - 00006D - 00006E - 00006F - 000070 - 000071 -
000072 - 000073 - 000074 - 000075 - 000076 - 000077 - 000078 - 000079 -
00007A - 00007B - 00007C - 00007D - 00007E - 00007F - 000080 - 000081 -
000082 - 000083 - 000084 - 000085 - 000086 - 000087 - 000088 - 000089 -
00008A - 00008B - 00008C - 00008D - 00008E - 00008F - 000090 - 000091 -
000092 - 000093 - 000094 - 000095 - 000096 - 000097 - 000098 - 000099 -
00009A - 00009B - 00009C - 00009D - 00009E - 00009F - 0000A0 - 0000A1 -
0000A2 - 0000A3 - 0000A4 - 0000A5 - 0000A6 - 0000A7 - 0000A8 - 0000A9 -
0000AA - 0000AB - 0000AC - 0000AD - 0000AE - 0000AF - 0000B0 - 0000B1 -
0000B2 - 0000B3 - 0000B4 - 0000B5 - 0000B6 - 0000B7 - 0000B8 - 0000B9 -
0000BA - 0000BB - 0000BC - 0000BD - 0000BE - 0000BF - 0000C0 - 0000C1 -
(0)> more (^C to quit) ?
<snip>
frameset subcommand
The frameset displays information about VMM frame sets.
Format
frameset [frs_id]
Parameters
Item Description
frs_id Can be the * character to specify a summary of the frame set table should be displayed. Or, it can be a
specific frameset id to indicate detailed information about the specific frameset should be displayed.
Other
frs
Examples
> valid
freefwd (freefwd) : 000000000009C7D5
freebwd (freebwd) : 000000000009C8F3
free nfr lock @ 0000000000EC7080 00000000
free frames (numfrb) : 0000000000128D11
number of frames (nb_frame) : 000000000013B2BA
next frameset (next_frs) : FFFFFFFF
owning mempool (memp_id) : 00000000
owning vmpool (vmpool_id) : 00000000
KDB(1)>
Format
free
Parameters
The free subcommand counts and displays the number of free page frames, on a vmpool/frameset basis.
Note: The time it takes for this command to complete depends on the amount of system memory being
considered. Noticeable delays are not unusual.
Other
No aliases.
Examples
VMPOOL: 00
frame set 0 : 128CFB free frames
frame set 1 : 128D11 free frames
KDB(1)>
freelist subcommand
The freelist subcommand displays VMM free list information.
Format
freelist [frs_id]
Parameters
Item Description
frs_id Specifies the frameset identifier for which you want to display VMM free list information.
The freelist subcommand requires an frs_id parameter to identify the particular frameset to examine. The
list of all page frames on the free list for that frameset is then displayed.
Note: The longer the length of the free list, the more time this subcommand takes to complete.
Other
No aliases.
Examples
126 AIX Version 6.1: KDB kernel debugger and kdb command
KDB(0)> freelist 1
00000261A5 - 00000261B5 - 00000261A3 - 00000261B1 - 00000261AF - 00000261AD -
00000261AB - 00000261A9 - 00000261A7 - 000002619B - 00000261A1 - 000002619F -
000002619D - 0000026189 - 0000026199 - 0000026197 - 0000026195 - 0000026193 -
0000026191 - 000002618F - 000002618D - 000002618B - 0000026183 - 0000026187 -
0000026185 - 0000024951 - 0000024AFD - 0000024AEB - 0000024D09 - 000002616D -
0000026121 - 0000024B9B - 0000024B9D - 000002613D - 0000024D11 - 0000024D15 -
0000024AFB - 000002617D - 0000024BC3 - 000002617B - 0000024D77 - 0000026179 -
<snip>
00000261FD - 00000261FB - 00000261F9 - 00000261F7 - 00000261F5 - 00000261F3 -
00000261F1 - 00000261EF - 00000261ED - 00000261EB - 00000261E9 - 00000261E7 -
00000261E5 - 00000261E3 - 00000261E1 - 00000261DF - 00000261DD - 00000261DB -
00000261D9 - 00000261D7 - 00000261D5 - 00000261D3 - 00000261D1 - 00000261CF -
00000261CD - 00000261CB - 00000261C9 - 00000261C7 - 00000261C5 - 00000261C3 -
00000261C1 - 00000261BF - 00000261BD - 00000261BB - 00000261B9 - 00000261B7 -
FBANCH
2905E free frames
KDB(0)>
ipc subcommand
The ipc subcommand reports interprocess communication facility information.
Format
Parameters
Item Description
menu options Menu options and parameters can be entered along with the subcommand to avoid display of menus and
prompts.
If this subcommand is invoked without parameters, then menus and prompts are used to determine the
data to be displayed. If the menu selections and required values are known, you can enter them as
subcommand parameters.
ipc 1 [1..3] to print message queue information
ipc 2 [1..2] to print shared memory information
ipc 3 [1..2] to print semaphore information
Other
No aliases.
Examples
rtipc subcommand
The rtipc subcommand reports posix realtime interprocess communication facility information.
Format
Parameters
Item Description
menu options Identifies menu options and parameters that can be entered along with the subcommand to avoid display
of menus and prompts.
If this subcommand is invoked without parameters, then menus and prompts are used to determine the
data to be displayed.
(0)> rtipc
RTIPC info
Select the display:
1) Message Queues
2) Shared Memory
3) Semaphores
4) Message Queue Name Table
5) Shared Memory Name Table
6) Semaphore Name Table
Enter your choice:
Reported information is related to posix realtime message queues, shared memory and semaphores, and
their associated name table.
Note: If the menu selections and required values are known, they can be entered as subcommand
parameters.
For realtime ipc objects, displayed data can be selected by object address, index in object table, or
realtime ipc name. If selection is by name, the subcommand must be invoked with all its parameters.
(0)> rtipc 1
1) all entries
2) select one entry by address
128 AIX Version 6.1: KDB kernel debugger and kdb command
3) select one entry by index
4) select one entry by name
(name up to 16 chars, type command in once)
Enter your choice:
For a realtime ipc name table, displayed data can be selected by index in the name table.
(0)> rtipc 4
1) all entries
2) select one entry by index
Enter your choice:
Other
No aliases.
Examples
(0)> rtipc 4 1
00000030 : F10000B080360998
00000061 : F10000B08026A520
00000062 : F10000B08029C458 F10000B08025B520
00000064 : F10000B080267B18 F10000B080279368 F10000B08026F430
0000006A : F10000B080269F80
rtipcd subcommand
The rtipcd subcommand reports posix realtime ipc descriptor information.
Format
Parameters
If this subcommand is invoked without parameters, then menus and prompts are used to determine
which data to display.
Reported information is related to process descriptors of posix realtime message queues and semaphores,
and process descriptor hash tables.
0)> rtipcd
RTIPC Descriptor info
Select the display:
1) Message Queue Descriptors
2) Semaphore Descriptors
3) Message Queue Descriptor Table
4) Semaphore Descriptor Table
Enter your choice:
For realtime ipc descriptors, displayed data can be selected by descriptor address or descriptor user id.
0)> rtipcd 1
1) select one entry by address
2) select one entry by user id
Enter your choice:
For realtime ipc descriptor tables, displayed data can be selected by hash table index.
(0)> rtipcd 3
1) all entries
2) select one entry by index
Enter your choice:
Other
No aliases.
Examples
(0)> rtipcd 3 1
0000001C : F100009E189B57E0
00000034 : F100009E189B5C00 F100009E189B5F00
00000037 : F100009E189B5AE0
130 AIX Version 6.1: KDB kernel debugger and kdb command
lka subcommand
The lka subcommand displays VMM lock anchor data and data for the transaction blocks in the
transaction block table. You can display individual entries of the transaction block table by providing a
slot number or an effective address.
Format
Parameters
Item Description
slot Specifies the slot number in the transaction block table to be displayed. This parameter must be a decimal
value.
effectiveaddress Specifies the effective address of an entry in the transaction block table. Symbols, hexadecimal values, or
hexadecimal expressions can be used to specify the address.
Other
lockanch, tblk
Examples
lkh subcommand
The lkh subcommand displays the contents of the VMM lock hash list. The entries for a particular hash
chain can be viewed by specifying the slot number or effective address of an entry in the VMM lock hash
list.
Parameters
Item Description
slot Specifies the slot number in the VMM lock hash list. This parameter must be a decimal value.
eaddr Specifies the effective address of a VMM lock hash list entry. Symbols, hexadecimal values, or hexadecimal
expressions can be used in specification of the address.
Other
lockhash
Examples
lkw subcommand
The lkw subcommand displays VMM lock words.
Format
Parameters
Item Description
slot Specifies the slot number of an entry in the VMM lock word table. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of an entry in the VMM lock word table. Symbols, hexadecimal values, or
hexadecimal expressions can be used to specify the address.
If no parameter is entered, a summary of the entries in the VMM lock word table is displayed, one line
per entry. If a parameter identifying a particular entry is entered, details are shown for that entry and the
following entries on the transaction ID chain.
Other
lockword
Examples
132 AIX Version 6.1: KDB kernel debugger and kdb command
KDB(0)> lkw
NEXT TIDNXT SID PAGE TID FLAGS
mempool subcommand
The mempool subcommand displays information about VMM memory pools.
Format
mempool [memp_id]
Parameters
Other
memp
Examples
> valid
number of frames (nb_frame) : 0000000000276576
first frame set (first_frs) : 00000000
next memory pool (next) : FFFFFFFF
owning vmpool (vmpool_id) : 00000000
134 AIX Version 6.1: KDB kernel debugger and kdb command
lru daemon anchor (lru_daemon) : F100009E14741400
lru request (lru_requested) : 00000000
DR thread id (dr_tid) : FFFFFFFF
lru pf color (lru_pf_color) : 0
LRU lock @ 0000000000F07008: 00000000
KDB(1)>
pdt subcommand
The pdt subcommand displays entries of the paging device table.
Format
Parameters
Item Description
* Displays all entries of the paging device table.
slot Specifies the slot number within the paging device table to be displayed. This value must be a hexadecimal
value.
An asterisk (* ) parameter displays all entries in a summary. To display the details for a specific entry,
specify the slot number in the paging device table. If no parameter is specified, you are prompted to
enter the PDT index you want to display. Detailed data is then displayed for the entered slot and all
higher slot numbers.
Other
No aliases.
Examples
pfhdata subcommand
The pfhdata subcommand displays virtual memory control variables.
Format
pfhdata
Parameters
No parameters.
Other
No aliases.
Examples
136 AIX Version 6.1: KDB kernel debugger and kdb command
extend XPT wait (extendwait) : 00000000
buf struct wait (bufwait) : 00000000
inh/delete wait (deletewait) : 00000000
SIGDANGER level (npswarn) : 00001000
SIGKILL level (npskill) : 00000400
next warn level (nextwarn) : 00001000
next kill level (nextkill) : 00000400
adj warn level (adjwarn) : 00000008
adj kill level (adjkill) : 00000008
cur pdt alloc (npdtblks) : 00000002
max pdt alloc (maxpdtblks) : 00000004
num i/o sched (numsched) : 00000004
disk quota wait (dqwait) : 00000000
1st free ame entry (amefree) : 0000000A
1st del pending ame (amexmem) : 00000000
highest ame entry (hiame) : 00000040
pag space free wait (pgspwait) : 00000000
first free apt entry (aptfree) : 00000012
apt high water mark (hiapt) : 0000FFFF
next apt entry (aptlru) : 00000000
first free esid (esidfree) : 00200054
high index of esid (hiesid) : 00000160
first lgpg rsvd sidx (sidxlimit) : 00200000
log high wartermark (logmax) : 00000002
sid index of logs (logsidx) : B0476734
lru creation thread (lruwait) : 00000000
memp needing daemon (mempnew) : 00000000
minperm percent (minperm) : 20.0 %
maxperm percent (maxperm) : 80.0 %
maxclient percent (maxclient) : 80.0 %
frame thresholds (minfree, maxfree)
computational : 00000078 00000080
client : 00000078 00000080
persistent : 00000078 00000080
fixed lmb freelist (fixlmbfree) : 00000001
fixed lmb size(pages)(fixlmbsz) : 00000000
fixed lmb firstnfr (fixlmbfirst) : 00000001
fixed lmb lastnfr (fixlmblast) : 00000001
vmpool being deleted (vmp_del) : 00000000
mempool being deleted (memp_del) : 00000000
frameset being deleted (frs_del) : 00000000
global vmap lock @ B0476100 00000000
global ame lock @ B0476180 00000000
global rpt lock @ B0476200 00000000
rpt pool lock [00] @ B0476280 00000000
rpt pool lock [01] @ B0476284 00000000
rpt pool lock [02] @ B0476288 00000000
rpt pool lock [03] @ B047628C 00000000
rpt pool lock [04] @ B0476290 00000000
rpt pool lock [05] @ B0476294 00000000
rpt pool lock [06] @ B0476298 00000000
rpt pool lock [07] @ B047629C 00000000
rpt pool lock [08] @ B04762A0 00000000
rpt pool lock [09] @ B04762A4 00000000
rpt pool lock [10] @ B04762A8 00000000
rpt pool lock [11] @ B04762AC 00000000
rpt pool lock [12] @ B04762B0 00000000
rpt pool lock [13] @ B04762B4 00000000
rpt pool lock [14] @ B04762B8 00000000
rpt pool lock [15] @ B04762BC 00000000
global alloc lock @ B0476300 00000000
apt freelist lock @ B0476380 00000000
pdt allocation lock @ B0476400 00000000
pdt io list lock @ B0476480 00000000
pft subcommand
The pft subcommand displays information about the VMM page frame table.
Format
Parameters
Item Description
menu options Use menu options and parameters with the subcommand to avoid display of menus and prompts.
If the pft subcommand is invoked without parameters, then menus and prompts determine which data is
displayed. If the menu selections and required values are known, you can enter them as subcommand
parameters.
Other
No aliases.
Examples
> in use
> on scb list
> valid (h/w)
> referenced (pft/pvt/pte): 0/0/1
> modified (pft/pvt/pte): 1/0/1
owning vmpool id (vmp) : 0000
owning mempool id (memp) : 0000
owning frameset (frs) : 0001
page number in scb (spage) : FF3C
138 AIX Version 6.1: KDB kernel debugger and kdb command
disk block number (dblock) : 00000000
next page on scb list (sidfwd) : 00000FC6
prev page on scb list (sidbwd) : 0005F6D4
freefwd/waitlist (freefwd): 00000000
freebwd/logage/pincnt (freebwd): 00010000
out-of-order I/O (nonfifo): 00000000
(0)> more (^C to quit) ?
storage attributes (wimg) : 2
next page on s/w hash (next) : FFFFFFFF
List of alias entries (alist) : 0000FFFF
index in PDT (devid) : 0000
next frame i/o list (nextio) : 00000000
save key across pagein(savekey): 0
KDB(0)> pft 2
Enter the sid (in hex): 24012
Enter the pno (in hex): FF3C
> in use
> on scb list
> valid (h/w)
> referenced (pft/pvt/pte): 0/0/1
> modified (pft/pvt/pte): 1/0/1
owning vmpool id (vmp) : 0000
owning mempool id (memp) : 0000
owning frameset (frs) : 0001
page number in scb (spage) : FF3C
disk block number (dblock) : 00000000
next page on scb list (sidfwd) : 00000FC6
prev page on scb list (sidbwd) : 0005F6D4
freefwd/waitlist (freefwd): 00000000
freebwd/logage/pincnt (freebwd): 00010000
out-of-order I/O (nonfifo): 00000000
(0)> more (^C to quit) ?
storage attributes (wimg) : 2
next page on s/w hash (next) : FFFFFFFF
List of alias entries (alist) : 0000FFFF
index in PDT (devid) : 0000
next frame i/o list (nextio) : 00000000
save key across pagein(savekey): 0
KDB(0)> pft 3 24012 FF3C
> in use
> on scb list
> valid (h/w)
> referenced (pft/pvt/pte): 0/0/1
> modified (pft/pvt/pte): 1/0/1
owning vmpool id (vmp) : 0000
owning mempool id (memp) : 0000
owning frameset (frs) : 0001
page number in scb (spage) : FF3C
disk block number (dblock) : 00000000
next page on scb list (sidfwd) : 00000FC6
prev page on scb list (sidbwd) : 0005F6D4
freefwd/waitlist (freefwd): 00000000
freebwd/logage/pincnt (freebwd): 00010000
> in use
> on scb list
> valid (h/w)
> referenced (pft/pvt/pte): 0/0/1
> modified (pft/pvt/pte): 1/0/1
owning vmpool id (vmp) : 0000
owning mempool id (memp) : 0000
owning frameset (frs) : 0001
page number in scb (spage) : FF7C
disk block number (dblock) : 00000000
next page on scb list (sidfwd) : 0005F6D4
prev page on scb list (sidbwd) : FFFFFFFF
freefwd/waitlist (freefwd): 00000000
freebwd/logage/pincnt (freebwd): 00000000
out-of-order I/O (nonfifo): 00000000
(0)> more (^C to quit) ?
storage attributes (wimg) : 2
next page on s/w hash (next) : FFFFFFFF
List of alias entries (alist) : 0000FFFF
index in PDT (devid) : 0000
next frame i/o list (nextio) : 00000000
save key across pagein(savekey): 0
> in use
> on scb list
> valid (h/w)
> referenced (pft/pvt/pte): 0/0/1
> modified (pft/pvt/pte): 1/0/0
owning vmpool id (vmp) : 0000
owning mempool id (memp) : 0000
owning frameset (frs) : 0000
page number in scb (spage) : FF3A
(0)> more (^C to quit) ?
disk block number (dblock) : 00000000
next page on scb list (sidfwd) : 00000FCD
prev page on scb list (sidbwd) : 00000FCF
freefwd/waitlist (freefwd): 00000000
freebwd/logage/pincnt (freebwd): 00010000
out-of-order I/O (nonfifo): 00000000
storage attributes (wimg) : 2
next page on s/w hash (next) : FFFFFFFF
List of alias entries (alist) : 0000FFFF
index in PDT (devid) : 0000
next frame i/o list (nextio) : 00000000
140 AIX Version 6.1: KDB kernel debugger and kdb command
save key across pagein(savekey): 0
> in use
> on scb list
> valid (h/w)
(0)> more (^C to quit) ?
<snip>
KDB(0)> pft a
Enter the sid (in hex): 00024012
Frame Ord..page Pincount Dblock Key ...
00000FCF FF7C 00000000 00000000 K MOD REF
0005F6D4 FF3A 00010000 00000000 K MOD REF
00000FCD FF3C 00010000 00000000 K MOD REF
00000FC6 FF3B 00020000 00000000 K MOD REF
swhat subcommand
The swhat subcommand displays VMM SW hash table entries. It can also be used to look for corrupted
SW hash table entries.
Format
swhat [1..3]
swhat 1 [index]
swhat 3
When the swhat subcommand is given no parameters, a menu is displayed with the following options:
Item Description
1 Displays the software hash table entry identified by a swhat index entered by the user.
2 Displays the software hash table entry identified by a sid (virtual segment identifier) and pno (page
number) entered by the user.
3 Checks for corruption in the swhat by examining the stored page frame numbers.
The command completes after it runs one of the options. To exit the menu and terminate the command
without running any of the options, enter a period (.).
Other
No aliases.
Examples
pvt subcommand
The pvt subcommand displays the VMM PVT and PVLIST entries. The pvt subcommand can also be
used to look for corrupted PVT and PVLIST entries.
Format
pvt [1..4]
pvt 1 [index]
142 AIX Version 6.1: KDB kernel debugger and kdb command
pvt 2
pvt 3 [index]
pvt 4
Parameters
Item Description
index Identifies the PVT or PVLIST index for which you want PVT information.
If you use the pvt subcommand with no parameters, a menu with four options is displayed. Choose one
of the options, or type the parameters with the options as part of the subcommand. The options you can
choose or type are the following:
Item Description
1 Displays the PVT identified by a PVT index entered by the user.
2 Checks the PVT entry for every page with a valid software pft entry by examining the pte index stored in
the PVT. Entries identified as corrupted are printed.
3 Displays the PVLIST identified by a PVLIST index entered by the user.
4 Checks the PVLIST entry for each pte index by examining the pvnext field in the PVLIST.
To exit the menu and terminate the subcommand without running any of the options, enter a period (.).
Other
pvlist
Examples
Format
Parameters
Item Description
-r Displays XPT root data.
-d Displays XPT direct block data.
-a Displays Area Page Maps or a specific Area Page Map.
-v Displays map blocks.
-x Displays XPT fields.
-f Prompts for the sid or idx for which the XPT fields are to be displayed.
sid Specifies the segment ID. Symbols, hexadecimal values, or hexadecimal expressions may be used for this
argument.
idx Specifies the index for the specified area. Symbols, hexadecimal values, or hexadecimal expressions can be
used for this argument.
The optional arguments listed above determine the data that is displayed. Summary information is
displayed when no parameter is provided.
Other
No aliases.
Examples
pte subcommand
The pte subcommand provides options for displaying information about the VMM page table entries.
144 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Parameters
Item Description
menu options Use menu options and parameters with the subcommand to avoid the display of menus and prompts.
If the pte subcommand is invoked without parameters, menus and prompts are used to determine the
data to be displayed. If the menu selections and required values are known, you can use them as
subcommand parameters.
Other
No aliases.
Examples
KDB(0)>
rmap subcommand
The rmap subcommand displays the real address range mapping table.
Parameters
Item Description
* Displays all real address range mappings.
slot Displays the real address range mapping for the specified slot. This value must be a hexadecimal value.
If the asterisk ( * ) parameter is specified, a summary of all entries is displayed. If a slot number is
specified, only that entry is displayed. If no parameter is specified, the user is prompted for a slot
number, and data for that and all higher slots is displayed.
Other
No aliases.
Examples
146 AIX Version 6.1: KDB kernel debugger and kdb command
Real address : 0000000000BF7000
Effective address : 00000000C0000000
Size : 0000000000001000
Alignment : 0000000000001000
WIMG bits : 2
vmpool requested : 00
vmpool actual : 00
RMAP entry 0012 of 004F: PTAD
> valid
> has mempool/frameset ids
Real address : 0000000000BF8000
Effective address : 00000000C0080000
Size : 0000000000002000
Alignment : 0000000000001000
WIMG bits : 2
vmpool requested : 00
vmpool actual : 00
RMAP entry 0013 of 004F: PTAI
> valid
(0)> more (^C to quit) ?
> has mempool/frameset ids
Real address : 0000000000BFA000
Effective address : 00000000C00C0000
Size : 0000000000003000
Alignment : 0000000000001000
WIMG bits : 2
vmpool requested : 00
vmpool actual : 00
RMAP entry 0014 of 004F: DMAP
> valid
> has mempool/frameset ids
Real address : 0000000000BFD000
Effective address : 00000000D0000000
Size : 0000000000001000
Alignment : 0000000000001000
WIMG bits : 2
vmpool requested : 00
vmpool actual : 00
RMAP entry 0015 of 004F: unknown
RMAP entry 0016 of 004F: unknown
<snip>
rvsid subcommand
The rvsid subcommand displays reserved vsid information (struct rvsid_data).
Note: The rvsid subcommand is only supported when you use the kdb command or the KDB kernel
debugger on the 64-bit kernel.
Format
rvsid
Parameters
Other
No aliases.
scb subcommand
The scb subcommand provides options for display of information about VMM segment control blocks.
Format
Parameters
Item Description
menu options Use menu options and parameters with the subcommand to avoid display of menus and prompts.
If this subcommand is invoked without parameters, then menus and prompts are used to determine the
data that is displayed. If the menu selections and required values are known, you can use them as
subcommand parameters.
Other
No aliases.
Examples
148 AIX Version 6.1: KDB kernel debugger and kdb command
VMM SCB Addr B04775F4 Index 00000012 of 0000050B Segment ID: 00024012
VMM SCB Addr B04774E0 Index 0000000F of 0000050B Segment ID: 0001E00F
VMM SCB Addr B04774E0 Index 0000000F of 0000050B Segment ID: 0001E00F
segst64 subcommand
The segst64 subcommand displays the segment state information for a 64-bit process.
150 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Parameters
Item Description
-p pid Specifies the process ID of a 64-bit process. This must be a decimal or hexadecimal value depending on the
setting of the hexadecimal_wanted switch.
-e esid Specifies the first segment register to display. The lower register numbers 0, 1, and 2 are ignored. This
parameter must be a hexadecimal value.
-s seg Limits the display to only segment register with a segment state that matches seg. Possible values for seg
are: SEG_AVAIL, SEG_SHARED, SEG_MAPPED, SEG_MRDWR, SEG_DEFER, SEG_MMAP,
SEG_WORKING, SEG_RMMAP, SEG_OTHER, SEG_EXTSHM, and SEG_TEXT.
value Sets the limit to display only segments with the specified value for the segfileno field. This value must be
hexadecimal.
Other
No aliases.
Examples
sr64 subcommand
The sr64 subcommand displays segment registers for a 64-bit process.
Format
Parameters
If no parameters are specified, the current process is used. Another process can be specified by using the
-p pid flag. Additionally, the esid and size parameters can be used to limit the segment registers displayed.
The esid value determines the first segment register to display. The value of esid + size determines the last
segment register to display.
The registers are displayed in groups of 16. If necessary, the value of the esid parameter is rounded down
to a multiple of 16, and the size is rounded up to a multiple of 16. For example: sr64 11 11 displays the
segment registers 10 through 2f.
Other
No aliases.
Examples
The following is an example of how to use the sr64 subcommand for a 64-bit kernel:
KDB(0)> sr64 -g
Segment registers for global address space
kernel..... sr000000000: 00000400
vmm data... srF10000004: 00801400
vmm pta.... srF10000005: 01002400
vmm diskmap srF10000006: 01803400 srF10000007: 02004400 srF10000008: 02805400 ..
152 AIX Version 6.1: KDB kernel debugger and kdb command
vmm data... srF10000004: 00801400
vmm pta.... srF10000005: 01002400
vmm diskmap srF10000006: 01803400 srF10000007: 02004400 srF10000008: 02805400
vmm diskmap srF10000009: 03006400
vmm ame.... srF1000000A: 03807400 srF1000000B: 04008400 srF1000000C: 04809400
vmm ame.... srF1000000D: 0500A400
vmm scb.... srF1000000E: 0580B400 srF1000000F: 0600C400 srF10000010: 0680D400
vmm scb.... srF10000011: 0700E400 srF10000012: 0780F400 srF10000013: 08010400 ..
ksp subcommand
The ksp subcommand displays information about the Kernel Special Purpose (KSP) region.
Format
ksp
Parameters
No parameters.
Other
No aliases.
Examples
KSP_FIRST_SID........010000000
NUMSIDS...............10000000
VM_L2_MAXARCH_VSID....00000025
VM_MAXARCH_VSID.......1FFFFFFFFF
VM_L2_IOSID_BIT.......00000024
IOSIDBIT..............1000000000
IOSIDMASK.............FFFFFFFFF
GLOB_ESID_LAST........F10000FFF
(0)>
ste subcommand
The ste subcommand provides options for displaying information about segment table entries for 64-bit
processes.
Format
Parameters
154 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-p pid Specifies the process identifier to switch to before the menu is invoked. If this optional flag is omitted, the
current process is assumed.
menu options Enter menu options and parameters along with the subcommand to avoid displaying menus and prompts.
If you do not enter menu options, the menu is invoked.
If this subcommand is invoked without parameters, then menus and prompts are used to determine the
data to display.
Other
No aliases.
Examples
vmbufst subcommand
The vmbufst subcommand displays VMM buf structures.
Format
vmbufst [bufaddr]
Parameters
Item Description
bufaddr Specifies the address of the buf structure to display. If the parameter is omitted, you are prompted to enter
it.
The vmbufst subcommand is similar to the general filesystem buf subcommand. It displays a subset of
the fields and automatically traverses any buf.av_forw chain.
Other
No aliases.
Examples
156 AIX Version 6.1: KDB kernel debugger and kdb command
start.tv_sec 00015947 start.tv_nsec 00000000
xmemd.aspace_id FFFFFFFC xmemd.prexflags 00000011
xmemd.orig_xmem 34DF0030 xmemd.rlist 34DF1030
orig.aspace_id 00000000 orig.subspace_id 008384CE
orig.subspace_id2 00000000 orig.uaddr 00000000
KDB(7)>
Another difference between the two commands is that the vmbufst command
automatically traverses any av_forw list:
KDB(0)> buf @r5
DEV BLKNO FLAGS
flags.......: 00000000000C0000
b_forw......: 0000000000000000 b_back..... : 0000000000000000
av_forw.....: 0000000000000000 av_back.....: 0000000000000000
iodone......: 00000000034CD180 b_vp........: 0000000000000000
b_dev.......: 8000000D00000001 b_blkno.....: 0000000000DE2800
b_addr......: 000000000000A000 b_bcount....: 0000000000002000
b_error.....: 00 xmem is at : 0000000003016BB0
KDB(0)>
vmaddr subcommand
The vmaddr subcommand displays addresses of VMM structures.
Format
vmaddr
Parameters
No parameters.
Other
No aliases.
VMM Addresses
vmdmap subcommand
The vmdmap subcommand displays VMM disk maps.
Format
Parameters
Item Description
slot Specifies the Page Device Table (pdt) slot number. This parameter must be a decimal value.
address Specifies the address of a specific vmdmap structure to display.
If no parameters are entered, all paging and file system disk maps are displayed. To view a single disk
map, enter a slot number.
Other
No aliases.
Examples
158 AIX Version 6.1: KDB kernel debugger and kdb command
[email protected] [email protected]
[email protected] [email protected]
PDT slot [0011] Vmdmap [D0000000] dmsrval [00002081]
mapsize................00002000 freecnt................0000199B
agsize.................00000800 agcnt..................00000004
totalags...............00000004 lastalloc..............00000430
maptype................00000001 clsize.................00000008
clmask.................000000FF version................00000000
btree..................00000000
btree_nxt..............00000000
[email protected] [email protected]
[email protected] [email protected]
PDT slot [0013] Vmdmap [D0000000] dmsrval [0003609B]
mapsize................00006000 freecnt................00004E2B
agsize.................00000800 agcnt..................00000008
totalags...............0000000C lastalloc..............000000DC
maptype................00000001 clsize.................00000020
clmask.................00000000 version................00000001
btree..................00000000
btree_nxt..............00000000
[email protected] [email protected]
[email protected] [email protected]
<snip>
KDB(0)> vmdmap 11
PDT slot [0011] Vmdmap [D0000000] dmsrval [00002081]
mapsize................00002000 freecnt................0000199B
agsize.................00000800 agcnt..................00000004
totalags...............00000004 lastalloc..............00000430
maptype................00000001 clsize.................00000008
clmask.................000000FF version................00000000
btree..................00000000
btree_nxt..............00000000
[email protected] [email protected]
[email protected] [email protected]
KDB(0)>
vmint subcommand
The vmint subcommand displays VMM data for intervals.
Format
Parameters
Item Description
base | list | range Use one of these optional address input parameters. Identify a base of an interval array, the head of an
interval, or the address of a range in an interval to be displayed.
Note: The base and range parameters are typically only used for debugging problems in the vminterval
code.
The vmint subcommand displays VMM structure vmintervals information. If no parameter is provided,
information on system-wide intervals is displayed.
The vmint subcommand displays one of three types of information when an address input parameter is
provided:
v If the address parameter is a base of an interval array, the entire array of vmintervals is displayed.
v If the address parameter is the head of an interval, the vminterval is displayed.
v If the address parameter is the address of one range in an interval, the specific range is displayed.
No aliases.
Examples
160 AIX Version 6.1: KDB kernel debugger and kdb command
KDB(0)> vmint 010B1258
vminterval array based at 010B1258
srad: 0000 freebase: 0
freelist has 80 items starting with 010B1858
freelist lock @ 010B12A0 00000000
00001CF5 pages lock @ 010B12E0 00000000
[000000,000216)
[000423,000427)
[001000,001333)
[00149C,002C44)
00000FA2 pages lock @ 010B1320 00000000
[0002BB,000410)
[000428,00042B)
[001463,00147E)
[002C65,003A94)
00000326 pages lock @ 010B1360 00000000
[000216,0002BB)
[000427,000428)
[000485,0005B4)
[001333,001463)
[002C44,002C65)
00000023 pages lock @ 010B13A0 00000000
[000410,000423)
[00042B,00042D)
[00147E,00148B)
[003A94,003A95)
0000032F pages lock @ 010B13E0 00000000
[002937,002C65)
[003A94,003A95)
FFD90000 pages lock @ 010B1420 00000000
[270000,100000000)
00019D8C pages lock @ 010B16E0 00000000
[000000,000A14)
[000C14,000C18)
[000C48,000C58)
[001000,0015A7)
[001800,002B80)
[002C00,003C00)
[00698B,0069AB)
[007D2C,007D49)
[008000,016A00)
[017000,01F000)
vmker subcommand
The vmker subcommand displays virtual memory kernel data.
Format
Parameters
Item Description
-pta Displays the Page Table Area (PTA) data.
-dr Displays dynamic memory reconfiguration related data.
-seg Displays VMM segment data.
General VMM kernel data is displayed when no parameter is supplied. All three flags are optional.
No aliases.
Examples
162 AIX Version 6.1: KDB kernel debugger and kdb command
offset of iplcb (iplcboff) : 00000000
hashbits (hashbits) : 00000015
hashmask (hashmask) : 001FFFFF
hash shift amount (stoibits) : 00000010
base config seg (bconfsrval): 1E0FFE400
shadow srval (ukernsrval): 00000000
kernel srval (kernsrval) : 00000400
STOI/ITOS mask (stoimask) : 0000001F
STOI/ITOS sid mask(stoinio) : 00000000
rmallocvmh (rmallocvmh): 1B013B400
# of ptasegments (numptasegs): 00000001
ptaseg(s) (ptasegs[1]): F100000050000000
KDB(1)> vmker -dr
vmlocks subcommand
The vmlocks subcommand displays VMM spin lock data.
Format
vmlocks
Parameters
No parameters.
Other
vmlock, vl
The following is an example of how to use the vl alias for the vmlocks subcommand:
KDB(0)> vl
GLOBAL LOCKS
VMPOOL 00
mempool[00000000]: LRU lock at @ 01FA4004 FREE
frameset[00000000]: free nfr lock @ 01F94000 FREE
frameset[00000001]: free nfr lock @ 01F94080 FREE
SCOREBOARD
scoreboard cpu 0 :
hint.....................00000000
00: empty
01: empty
(0)> more (^C to quit) ?
02: empty
03: empty
04: empty
05: empty
06: empty
07: empty
scoreboard cpu 1 :
hint.....................00000000
00: empty
01: empty
02: empty
03: empty
04: empty
164 AIX Version 6.1: KDB kernel debugger and kdb command
05: empty
06: empty
07: empty
KDB(0)>
vmlog subcommand
The vmlog subcommand displays the current VMM error log entry.
Format
vmlog
Parameters
No parameters.
Other
No aliases.
Examples
vmpool subcommand
The vmpool subcommand displays VMM information for resource pools.
Format
Parameters
Item Description
-l Indicates that the SYSVMP_LGPG type anchor should be accessed.
-d Indicates that the SYSVMP_DORM type anchor should be accessed.
-f Indicates that the SYSVMP_FREE type anchor should be accessed.
* Indicates that the summary information is to be displayed.
vmpool_id Indicates the specific vmpool identifier.
The vmpool subcommand displays VMM data for resource pools (struct vmpool_t). Use the asterisk ( * )
parameter to display summary information. The information you select to display can be modified by
including one of the flags. If none of the flags are used, the SYSVMP_NORMAL-type anchor is accessed.
You can also use the vmpool subcommand to display information for a specific vmpool identifier.
KDB kernel debugger and kdb command 165
Other
No aliases.
Examples
KDB(1)> vmpool -l *
No vmpools on this list.
KDB(1)> vmpool -f *
KDB(1)> vmpool 2
VMPOOL 02 (addr = 000000000027C9B0)
number of LRUable pages (npages_lru) : 00000000
sradid (srad_id) : 00000000
first memory pool (memp_first) : FFFFFFFF
number of memory pools (nb_mempool) : 00000000
number of frame sets / memp (nb_frs_per_memp) : 00000000
first nfr on lgpg freelist (lgpg_free) : 0000000000000001
number of frames on lgpg freelist (lgpg_numfrb): 0000000000000000
total # of lgpg frames (npages_lg) : 0000000000000000
addr of vmintervals array (vmint) : 0000000000000000
addr of freemem list (freemem) : 0000000000000000
addr of usedmem list (usedmem) : 0000000000000000
affinity_list (affinity_list) : 000000000027C9F0
NULL
next vmpool (next) : 03
next lgpg vmpool (next_lgpg) : 00
last_[memp/frs]_ecpus : 0000 / 0000
vmpool flags (flags) : 00000000
large page frb lock @ 000000000027CA50 00000000
memp frs dr lock @ 000000000027CA58 00000000
KDB(1)>
vmstat subcommand
The vmstat subcommand displays virtual memory statistics.
166 AIX Version 6.1: KDB kernel debugger and kdb command
Format
vmstat
Parameters
No parameters.
Other
No aliases.
Examples
The following is an example of how to use the vmstat subcommand:
KDB(0)> vmstat
VMM Statistics:
VMM Statistics:
vmthrpgio subcommand
The vmthrpgio subcommand provides VMM support of thread/base level page I/O commands.
Format
vmthrpgio
Parameters
No parameters.
When you enter the vmthrpgio subcommand, the following options are displayed:
1) display a given thrpgio frame structure (user provides the address)
2) display the ut_pgio_fields of the current thread
3) display THRPGIO bufstructs. The user provides the address of
a struct bufthrio. Any av_forw chain is traversed, displaying
each struct bufthrio.
Other
No aliases.
Examples
No example.
vmwait subcommand
The vmwait subcommand displays VMM wait status.
Format
vmwait [effectiveaddress]
Parameters
168 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
effectiveaddress Specifies the effective address for a wait channel. Symbols, hexadecimal values, or hexadecimal expressions
to specify the address.
Other
No aliases.
Examples
vrld subcommand
The vrld subcommand displays the VMM reload translate table. This information is used only on the
SMP POWER processor-based machine to prevent VMM reload dead-lock.
Format
vrld
Parameters
No parameters.
Other
No aliases.
Examples
KDB(0)>
vsidd subcommand
The vsidd subcommand displays memory using a virtual segment identifier (vsid) and byte-offset
addressing format.
Format
Parameters
Item Description
vsid:offset Identifies the memory location to be displayed. The vsid parameter indicates which segment to access, and
the offset is the number of bytes into the segment from which to begin displaying. These parameters are
required.
count Indicates the number of display units (4-byte words or 16-byte double words) to display. If count is
omitted, one line (32-bytes) of data is displayed.
,w Indicates that the display unit is 4-byte words.
,d Indicates that the display unit is 8-byte double words.
Note: The default display unit is eight bytes. The page must be in memory.
Other
sidd
Examples
vsidm subcommand
The vsidm subcommand modifies memory using a vsid (virtual segment identifier) and the byte offset
addressing format.
Format
Parameters
170 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
vsid:offset Identifies the memory location to be modified. The vsid parameter indicates which segment to access, and
the offset is the first byte to access. These parameters are required.
,w Indicates that the modification unit is 4-byte words.
,d Indicates that the modification unit is 8-byte double words.
Note: The default modification unit is eight bytes. The page must be in memory.
This vsidm subcommand works like other memory-modification commands. The current word (or double
word) at the target location is displayed. If you enter a new value, the memory location is changed. If
you press Enter without typing a value, the value in the memory location remains unchanged and the
next location is displayed for modification. When you type a period (.), the command terminates.
Other
sidm
Examples
zproc subcommand
The zproc subcommand displays information about the VMM zeroing kproc.
Format
zproc
Parameters
No parameters
Other
No aliases.
Examples
drlist subcommand
The drlist subcommand displays VMM data for a drlist_t structure.
Format
drlist [address]
Parameters
Item Description
address Specifies the memory location to be displayed as a drlist_t structure.
The drlist command is used to display a drlist_t structure. If no parameter is given, the global kernel
anchor is examined and the drlist_t, (if any), is displayed. If there is no valid outstanding DRlist, a
message is displayed.
If the address parameter is given, the memory location is displayed as a drlist_t structure.
Other
drl
Examples
DRlist @ F10010F01644D700
172 AIX Version 6.1: KDB kernel debugger and kdb command
maxvisits......... 0000000000000000
lrusteals......... 0000000000000000
maxpouts.......... 0000000000000000
lrupouts.......... 0000000000000000
lrupass........... 00000000
addnfr............ 0000000000000000
lock.............. 0000000000000000
KDB(0)>
lrustate subcommand
The lrustate displays the lru daemon control variables.
Note: These variables reside on the respective lru daemon stack, and only have valid values while the lru
daemon is actively running.
Format
lrustate [ mempool id ]
Parameters
Item Description
mempool id Is the memory pool identifier that corresponds to the lru daemon whose state you want to examine.
Other
lru
Examples
The following is an example of how to use the lru alias for the lrustate subcommand:
KDB(0)> lru -?
lru <mempool id>
KDB(0)> lru 0
tr and tv subcommands
The tr and tv subcommands display address translation information. The tr subcommand provides a
short format and the tv subcommand provides a detailed format.
Format
tr effectiveaddress
tv effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address for which translation details are to be displayed. Use symbols, hexadecimal
values or hexadecimal expressions to specify the address.
For the tv subcommand, all double-hashed entries are dumped when the entry matches the specified
effective address. Corresponding physical address and protections are displayed. Page protection (the K
bit and the PP bits) is displayed according to the current segment and machine state register values.
Other
No aliases.
Examples
slb subcommand
The slb subcommand displays Segment Lookaside Buffer (SLB) information.
174 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Parameters
Item Description
-r Specifies that the current register contents of the SLBs should be displayed. If there are any SLB values, the
slb subcommand usually displays them for the current context, but does not display the contents of the
registers.
Note: This flag is only supported for the KDB kernel debugger.
entry Specifies the SLB entry to display. If this parameter is not used, all of the SLBs are displayed.
If the underlying hardware platform does not support SLBs, the slb subcommand displays a message
indicating that the subcommand is unavailable.
Other
No aliases.
Examples
The following is an example of how to use the slb subcommand:
KDB(0)> slb
00 0000000008000000 0000000000000400 V 01 F000000028000000 0000000021002000 V
02 F000000030000000 00000000013E0400 I 03 FFFFFFFF08000000 00000001C109C080 V
04 FFFFFFFF10000000 00000000D14AD080 I 05 FFFFFFFF20000000 00000001D12FD080 I
06 FFFFFFFF30000000 0000000111131080 I 07 0000000000000000 0000000000000000 I
08 0000000000000000 0000000000000000 I 09 0000000000000000 0000000000000000 I
0A 0000000000000000 0000000000000000 I 0B 0FFFFFFFF8000000 0000000031003C00 V
0C F100009E18000000 00000001E09DE400 V 0D F100008798000000 0000000160876400 V
0E F100008788000000 0000000150875400 V 0F F1000089C8000000 0000000190899400 V
10 F1000000E8000000 00000000B000B400 V 11 F100000BE8000000 00000001B00BB400 V
12 F100000048000000 0000000010001400 V 13 F100000058000000 0000000020002400 V
14 F100009E28000000 00000001F09DF400 V 15 F10000AFB8000000 0000000180AF8400 V
16 F10000AFC8000000 0000000190AF9400 V 17 F10000AFD8000000 00000001A0AFA400 V
18 F200010018000000 0000010010001400 V 19 F200010028000000 0000010020002400 V
1A F200020038000000 0000020030003500 V 1B F100000BE0000000 00000001B00BB400 I
1C F100000040000000 0000000010001400 I 1D F100000050000000 0000000020002400 I
1E F100009C00000000 00000001D09BD400 I 1F F100009E20000000 00000001F09DF400 I
20 F200010010000000 0000010010001400 I 21 F200010020000000 0000010020002400 I
22 F200020030000000 0000020030003500 I 23 F100009D00000000 00000000D09CD400 I
24 F100001420000000 00000001F013F400 I 25 F100009AE0000000 00000000B09AB400 I
26 F10000AFC0000000 0000000190AF9400 I 27 F100001420000000 00000001F013F400 I
28 090000F0D0000000 00000000A09AAC00 I 29 F100009AD0000000 00000000A09AA400 I
2A 090000F030000000 00000001714D7C00 I 2B 090000F040000000 00000001914D9C00 I
2C F10000AFB0000000 0000000180AF8400 I 2D 090000F0F0000000 00000000314C3C00 I
2E 090000F0F0000000 00000000414C4C00 I 2F F10000AFB0000000 0000000180AF8400 I
30 090000F010000000 00000001810F8C00 I 31 090000F020000000 00000000714C7C00 I
32 090000F0D0000000 00000000A09AAC00 I 33 090000F0F0000000 00000000414C4C00 I
34 F10000AFC0000000 0000000190AF9400 I 35 F10000AFD0000000 00000001A0AFA400 I
36 090000F0F0000000 0000000111471C00 I 37 0000000000000000 0000000000000000 I
38 0000000000000000 0000000000000000 I 39 0000000000000000 0000000000000000 I
3A 0000000000000000 0000000000000000 I 3B 0000000000000000 0000000000000000 I
3C 0000000000000000 0000000000000000 I 3D 0000000000000000 0000000000000000 I
3E 0000000000000000 0000000000000000 I 3F 0000000000000000 0000000000000000 I
KDB(0)> slb 3
03 FFFFFFFF08000000 00000001C109C080 V
> valid
mslb subcommand
The mslb subcommand modifies (Segment Lookaside Buffer) SLB information.
Format
Parameters
Item Description
-r Specifies that the current register contents of the SLB should be modified. If the -r flag is not used, the
mslb subcommand changes the SLB value for the current context.
Note: The -r flag is only supported for the KDB kernel debugger.
entry Indicates the specific SLB entry to modify. This value is a decimal value. If no entry parameter is provided,
the subcommand defaults to entry number 0.
The update procedure is identical to other modification subcommands. The current value is displayed, and:
v The value can be altered.
v The value can be left unmodified if you press Enter. Pressing Enter causes the next SLB to be displayed.
The next SLB is displayed only if no entry parameter is entered. If you modify a specific SLB entry, the
subcommand terminates after it advances past the virtual segment identifier (VSID) double word.
v The mslb subcommand can be terminated if you enter a period (.).
The SLB is treated as two 8-byte double words, referred to as the effective segment identifier (ESID) and
the virtual segment identifier (VSID) respectively. If the underlying hardware platform does not support
SLBs, the mslb subcommand displays a message indicating that the subcommand is unavailable.
Other
No aliases.
Examples
dbat subcommand
On POWER processor-based machines that implement the block address translation facility, the dbat
subcommand displays dbat registers.
176 AIX Version 6.1: KDB kernel debugger and kdb command
Format
dbat [index]
Parameters
Item Description
index Specifies the dbat register to display. Valid values are 0 through 3. If no parameter is specified all dbat
registers are displayed.
Other
No aliases.
Examples
ibat subcommand
On POWER processor-based machines that implement the block address translation facility, the ibat
subcommand can be used to display ibat registers.
Format
ibat [index]
Parameters
Item Description
index Specifies the ibat register to display. Valid values are 0 through 3. If no parameter is specified, all ibat
registers are displayed.
Other
No aliases.
Examples
mdbat subcommand
The mdbat subcommand is used to modify the dbat register. The processor data bat register is modified
immediately. The word containing the valid bit is set last.
Format
mdbat [index]
Parameters
Item Description
index Specifies the dbat register to modify. Valid values are 0 through 3.
If no parameter is entered, you are prompted for the values for all dbat registers. If a parameter is
specified for the mdbat subcommand, you are only prompted for the new values for the specified dbat
register.
You can input both the upper and lower values for each dbat register or you can press Enter for these
values. If the upper and lower values for the register are not entered, the user is prompted for the values
for the individual fields of the dbat register. To stop entering values, you type a period (.) and press
Enter at any prompt.
Other
No aliases.
Examples
The following is an example of how to use the mdbat subcommand on a PowerPC 604™ RISC
Microprocessor:
KDB(0)> mdbat 2 //alter bat register 2
BAT register, enter <RC> twice to select BAT field, enter <.> to quit
DBAT2 upper 00000000 =
DBAT2 lower 00000000 =
BAT field, enter <RC> to select field, enter <.> to quit
DBAT2.bepi: 00000000 = 00007FE0
DBAT2.brpn: 00000000 = 00007FE0
DBAT2.bl : 00000000 = 0000001F
DBAT2.vs : 00000000 = 00000001
DBAT2.vp : 00000000 = <CR/LF>
DBAT2.wimg: 00000000 = 00000003
DBAT2.pp : 00000000 = 00000002
DBAT2 FFC0007E FFC0001A
bepi 7FE0 brpn 7FE0 bl 001F vs 1 vp 0 wimg 3 pp 2
eaddr = FFC00000, paddr = FFC00000 size = 4096 KBytes [Supervisor state]
KDB(0)> mdbat 2 //clear bat register 2
BAT register, enter <RC> twice to select BAT field, enter <.> to quit
DBAT2 upper FFC0007E = 0
DBAT2 lower FFC0001A = 0
DBAT2 00000000 00000000
bepi 0000 brpn 0000 bl 0000 vs 0 vp 0 wimg 0 pp 0
178 AIX Version 6.1: KDB kernel debugger and kdb command
mibat subcommand
The mibat subcommand is used to modify the ibat register. The processor instruction bat register is
changed immediately.
Format
mibat [index]
Parameters
Item Description
index Specifies the ibat register to modify. Valid values are 0 through 3.
If no parameter is specified, you are prompted for the values for all ibat registers. If a parameter is
specified for the mibat subcommand, you are only prompted for the new values for the specified ibat
register.
Input both the upper and lower values for each ibat register or press Enter to use these values. If the
upper and lower values for the register are not entered, you are prompted for the values for the
individual fields of the ibat register. You can stop entering values by typing a period (.) at any prompt
and pressing Enter.
Other
No aliases.
Examples
The following is an example of how to use the mibat subcommand on a PowerPC 604 RISC
Microprocessor:
KDB(0)> mibat 2
BAT register, enter <RC> twice to select BAT field, enter <.> to quit
IBAT2 upper 00000000 = <CR/LF>
IBAT2 lower 00000000 = <CR/LF>
BAT field, enter <RC> to select field, enter <.> to quit
IBAT2.bepi: 00000000 = <CR/LF>
IBAT2.brpn: 00000000 = <CR/LF>
IBAT2.bl : 00000000 = 3ff
IBAT2.vs : 00000000 = 1
IBAT2.vp : 00000000 = <CR/LF>
IBAT2.wimg: 00000000 = 2
IBAT2.pp : 00000000 = 2
IBAT2 00000FFE 00000012
bepi 0000 brpn 0000 bl 03FF vs 1 vp 0 wimg 2 pp 2
eaddr = 00000000, paddr = 00000000 size = 131072 KBytes [Supervisor state]
Loader subcommands
The subcommands in this category display the kernel loader entries, add symbols from loaded kernel
extensions to the KDB kernel debugger's symbol name cache, and display or remove symbol tables.
lke [-l] [-l32] [-l64] [-p pslot] [-n name] [[-s] {entry | effectiveaddress}] [-a ldr_address]
Parameters
Item Description
-l Lists the current entries in the name list cache.
-l32 Displays loader entries for 32-bit shared libraries.
-l64 Displays loader entries for 64-bit shared libraries.
-p pslot Displays the shared-library loader entries for the process slot indicated. The value for pslot must be a
decimal process slot number.
-n name Displays the loader entry specified by name.
-s Does not display symbols when populating the cache.
entry Specifies a loader entry. The entry parameter must be a decimal value. The specified entry is displayed, and
the name list cache is loaded with data for that entry.
effectiveaddress Specifies an effective address in the text or data area for a loader entry. The specified entry is displayed and
the name list cache is loaded with data for that entry. This address can be a hexadecimal value, a symbol,
or a hexadecimal expression.
-a ldr_address Displays the loader entry at the specified address, and loads the name list cache with data for that entry.
This address can be a hexadecimal value, a symbol, or a hexadecimal expression.
sym_slot Specifies the slot number. This value must be a decimal number.
ldr_address Specifies the address of a loader entry. The address can be a hexadecimal value, a symbol, or a hexadecimal
expression.
During boot phase, KDB kernel debugger is called to load extension symbol tables. When KDB kernel
debugger is called, a message is displayed.
The symbol tables that are available to KDB kernel debugger can be listed with the stbl subcommand. If
this subcommand is invoked without parameters, a summary of all symbol tables is displayed. Details
about a particular symbol table can be obtained by supplying a slot number or the effective address of
the loader entry to the stbl subcommand.
A symbol table can be removed from KDB kernel debugger using the rmst subcommand. This
subcommand requires that either a slot number or the effective address for the loader entry of the symbol
table be specified.
A symbol name cache is managed inside KDB kernel debugger. The cache is filled with function names
with the lke [-s] { entry | address} subcommand and the lke -a ldr_address subcommand. When this cache
is full, old entries are replaced by new entries.
If the lke subcommand is invoked without parameters, a summary of the kernel loader entries is
displayed. The lke subcommand parameters -l32 and -l64 can be used to list the loader entries for 32-bit
and 64-bit shared libraries, respectively. Details can be viewed for individual loader entries by specifying
the following:
v Entry number
v Address of the loader entry with the -a flag
v Address within the text or data area for a loader entry
The name lists contained in the name list cache area can be reviewed by using the -l option.
180 AIX Version 6.1: KDB kernel debugger and kdb command
Other
No aliases.
Examples
The following is an example of how to use the stbl, rmst and lke subcommand when /unix and one
driver have symbol tables:
Note: If the kernel extension is stripped, the symbol table is not loaded in memory.
...//during boot phase
no symbol [/etc/drivers/mddtu_load]
no symbol [/etc/drivers/fd]
Preserving 14280 bytes of symbol table [/etc/drivers/rsdd]
no symbol [/etc/drivers/posixdd]
no symbol [/etc/drivers/dtropendd]
...
KDB(4)> stbl //list symbol table entries
LDRENTRY TEXT DATA TOC MODULE NAME
1 00000000 00000000 00000000 00207EF0 /unix
2 0B04C400 0156F0F0 015784F0 01578840 /etc/drivers/rsdd
KDB(4)> rmst 2 //ignore second entry
KDB(4)> stbl //list symbol table entries
LDRENTRY TEXT DATA TOC MODULE NAME
1 00000000 00000000 00000000 00207EF0 /unix
KDB(4)> stbl 1 //list a symbol table entry
LDRENTRY TEXT DATA TOC MODULE NAME
1 00000000 00000000 00000000 00207EF0 /unix
st_desc addr.... 00153920
symoff.......... 002A9EB8
nb_sym.......... 0000551E
182 AIX Version 6.1: KDB kernel debugger and kdb command
12 F100009AE00CEA00 D0A0A0C0 00033A77 000000C0 shr.o/usr/lib/libct_dev.a
13 F100009AE00CE900 D0BB50C0 00039B41 00000882 shr.o/usr/lib/libct_sr.a
14 F100009AE00CE800 D0B4E0C0 0006666F 00000882 shr.o/usr/lib/libct_rm.a
(0)> more (^C to quit) ? ^C //interrupt
KDB(0)> lke -l64 //loader entries for 64-bit shared libraries
ADDRESS FILE FILESIZE FLAGS MODULE NAME
lle subcommand
The lle subcommand lists loader entries.
Format
Parameters
Item Description
-k Lists the kernel loader entries.
-l32 Lists the 32-bit library loader entries.
-l64 Lists the 64-bit library loader entries.
-a Lists the loader entry at the specified address.
-p Lists the loader entries for the specified process.
-A Lists the loader anchor information.
-v Lists all fields in the selected entries.
address Specifies the address of a loader entry. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify the address.
slot Specifies a decimal process slot.
Other
No aliases.
184 AIX Version 6.1: KDB kernel debugger and kdb command
(0)> more (^C to quit) ? ^C //interrupt
KDB(0)> lle -a 07058000 //loader entry at a specific address
Loader Entry @07058000
le_filename.... 07058088 /usr/lib/drivers/random(random64)
le_flags....... TEXT KERNELEX DATAINTEXT DATA DATAEXISTS 64
le_next........ 07172100 le_svc_sequence 00FFFFFF
le_fp.......... 00000000
le_fh.......... 00000000 le_file........ 03634EA0
le_filesize.... 0000ADF8 le_data........ 0363AC80
le_tid......... 0363AC80 le_datasize.... 00005018
le_usecount.... 00000003 le_loadcount... 00000001
le_ndepend..... 00000001 le_maxdepend... 00000001
le_deferred.... 00000000 le_ule......... 00000000
le_exports..... 07601000 le_de.......... F00E000000000002
le_searchlist.. 00000000 le_dlusecount.. 00000000
le_dlindex..... FFFFFFFF le_lex......... 00000000
le_depend...... 07058E00
KDB(0)> lle -p 1 //loader entries for process slot 1
ADDRESS FILE FILESIZE FLAGS MODULE NAME
exp subcommand
The exp subcommand looks for an exported symbol or displays the entire export list.
Format
exp [symbol]
Parameters
If no parameter is specified, the entire export list is displayed. If a symbol name is specified as a
parameter and that symbol is in the export list, then that symbol name is displayed. If a symbol name is
specified that is not in the list, then all symbols that begin with the input string are displayed.
Other
No aliases.
Examples
pnda subcommand
The pnda subcommand displays the per-node data area pnda structures for each processor.
186 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Parameters
Item Description
* Displays a summary of the pnda structure for each processor. Multiple processors can share the same pnda
structure.
-a Causes the subcommand to display the pnda structure associated with each processor on the system.
cpu Specifies the number of the processor for which you want to display the pnda structure.
effectiveaddress Displays the effective address for which you want to display the pnda structure.
When used without parameters, the pnda subcommand displays the pnda structure for the current
processor. With parameters, the pnda subcommand can either display a summary of all pnda structures
on the system, or it can display a pnda structure for a specific processor.
Other
No aliases.
Examples
sradid..................00000000
pndas[0]................00566B50
cpu2srad[00]................0000 cpu2srad[01]................0000
cpu2srad[02]................0000 cpu2srad[03]................0000
srad2cpu[0].................0000
cpubitm[0]......F000000000000000
num_cpus_onl[0].........00000004
max_cpus[0].............00000004
max_num_srads...........00000001 num_srads_onl...........00000001
sys_cpus_onl............00000004 sys_max_cpus............00000004
first_srad_with_cpus...........00000000
memp_on_srad[0].0000000000000000
mrq_srad................02171000 gc_heap.................00000000
srad_rptr...............0040FD50 srad_rset...............00566D18
srad_att_entry..........00566D20
netkmem.................3287D000
entry.start.....0000000000000000 entry.nbytes............00000000
entry.next..............00000000 entry.policy............00000000
entry.cursor............00000000 entry.rset..............00566D38
KDB(0)>
Format
Parameters
Item Description
* Displays a summary for all processors.
cpu Displays the data for the ppda structure for the specified processor. This parameter must be a decimal
value.
effectiveaddress Specifies the effective address of a ppda structure to display. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Other
No aliases.
Examples
csa......................004B8EB0 mstack...................004B7EB0
fpowner..................00000000 curthread................E6000234
syscall..................0001879B intr.....................E0100080
i_softis.....................0000 i_softpri....................4000
prilvl...................05CB1000
ppda_pal[0]..............00000000 ppda_pal[1]..............00000000
ppda_pal[2]..............00000000 ppda_pal[3]..............00000000
phy_cpuid....................0001 ppda_fp_cr...............28222881
flih save[0].............00000000 flih save[1].............2FF3B338
flih save[2].............002E65E0 flih save[3].............00000003
flih save[4].............00000002 flih save[5].............00000006
flih save[6].............002E6750 flih save[7].............00000000
dsisr....................40000000 dsi_flag.................00000003
dar......................2FF9F884
dssave[0]................2FF3B2A0 dssave[1]................002E65E0
dssave[2]................00000000 dssave[3]................002A4B1C
dssave[4]................E6001ED8 dssave[5]................00002A33
dssave[6]................00002A33 dssave[7]................00000001
dssrr0...................0027D5AC dssrr1...................00009030
dssprg1..................2FF9F880 dsctr....................00000000
dslr.....................0027D4CC dsxer....................20000000
dsmq.....................00000000 pmapstk..................00212C80
pmapsave64...............00000000 pmapcsa..................00000000
188 AIX Version 6.1: KDB kernel debugger and kdb command
schedtail[0].............00000000 schedtail[1].............00000000
schedtail[2].............00000000 schedtail[3].............00000000
cpuid....................00000001 stackfix.................00000000
lru......................00000000 vmflags..................00010000
sio............................00 reservation....................01
hint...........................00 lock...........................00
no_vwait.................00000000
scoreboard[0]............00000000
scoreboard[1]............00000000
scoreboard[2]............00000000
scoreboard[3]............00000000
scoreboard[4]............00000000
scoreboard[5]............00000000
scoreboard[6]............00000000
scoreboard[7]............00000000
intr_res1................00000000 intr_res2................00000000
mpc_pend.................00000000 iodonelist...............00000000
affinity.................00000000 TB_ref_u.................003DC159
TB_ref_l.................28000000 sec_ref..................33CDD7B0
nsec_ref.................13EF2000 _ficd....................00000000
decompress...............00000000 ppda_qio.................00000000
cs_sync..................00000000
ppda_perfmon_sv[0].......00000000 ppda_perfmon_sv[1].......00000000
thread_private...........00000000 cpu_priv_seg.............60017017
fp flih save[0]..........00000000 fp flih save[1]..........00000000
fp flih save[2]..........00000000 fp flih save[3]..........00000000
fp flih save[4]..........00000000 fp flih save[5]..........00000000
fp flih save[6]..........00000000 fp flih save[7]..........00000000
TIMER....................
t_free...................00000000 t_active.................05CB9080
t_freecnt................00000000 trb_called...............00000000
systimer.................05CB9080 ticks_its................00000051
ref_time.tv_sec..........33CDD7B1 ref_time.tv_nsec.........01DCDA38
time_delta...............00000000 time_adjusted............05CB9080
wtimer.next..............05767068 wtimer.prev..............0B30B81C
wtimer.func..............000F2F0C wtimer.count.............00000000
wtimer.restart...........00000000 w_called.................00000000
trb_lock.................000C04F0 slock/slockp 00000000
KDB......................
flih_llsave[0]...........00000000 flih_llsave[1]...........2FF22FB8
flih_llsave[2]...........00000000 flih_llsave[3]...........00000000
flih_llsave[4]...........00000000 flih_llsave[5]...........00000000
flih_save[0].............00000000 flih_save[1].............00000000
flih_save[2].............00000000 csa......................001D4800
KDB(3)>
mst subcommand
The mst subcommand prints the Machine State Save Area.
Format
Parameters
If a thread slot number is specified, the Machine State Save Area for the specified slot is displayed. If an
effective address is entered, it is assumed to be the address of the Machine State Save Area.
Other
No aliases.
Examples
190 AIX Version 6.1: KDB kernel debugger and kdb command
Except :
csr 30002F00 dsisr 40000000 bit set: DSISR_PFT
srval 6000A00A dar 20022000 dsirr 00000106
KDB(0)>
lastbackt subcommand
The lastbackt subcommand prints the context (Machine State Save Area) for when the last backtracking
fault was taken on either the current processor or the specified processor.
Format
lastbackt [cpu]
Parameters
Item Description
cpu Specifies a cpu index as a decimal value. If the cpu index is omitted, lastbackt defaults to the current cpu
context.
Other
No aliases.
Examples
KDB(0)>
proc subcommand
The proc subcommand (alias p) displays data from the kernel process table.
Format
proc
proc ?
proc *
192 AIX Version 6.1: KDB kernel debugger and kdb command
proc -
proc @ wpar id
proc address
proc -c wlm_class
proc -n substring
proc -nw
proc -pt
proc -s proc_state
proc slot
proc symbol
Parameters
Item Description
? Prints usage.
* Prints process table.
- Prints all processes that are in the none or zombie state in the long format.
@ wpar_id Displays the process that match the wpar_id parameter.
address Prints process at the address parameter.
-c wlm_class Sorts process by Workload Manager (WLM) class.
-n substring Sorts process by name.
-nw Prints process table after skipping the waitproc option.
-pr projid Sorts process by the projid parameter.
-pt Prints the ptrace information for the current process.
-s proc_state Sorts process by state.
slot Prints process in slot parameter.
symbol Prints process that matches the symbol parameter.
-v] -aff Prints affinity counts for the current process.
-v] -aff * Prints the process table and checks affinity counts.
-v] -aff slot Prints affinity counts for process in the slot parameter.
Examples
KDB(0)> p *
SLOT NAME STATE PID PPID ADSPACE CL #THS
The slot column lists the process structure slot index for the process. The numbers in this
columns must be used as the slot argument for detailed display options. The CL column displays
the WLM class. The #THS column displays the number of threads in the process.
Detailed output for a given process
This format displays all or selected fields of the process structure for a given process. The
following example shows detailed output for the given process:
KDB(0)> p
SLOT NAME STATE PID PPID ADSPACE CL #THS
NAME....... kdb_64
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00200001 LOAD EXECED
........... flag2 :00000001 64BIT
........... flag3/e/p :0000 00 04 ACTIVE_P
........... atomic :00000000
........... secflag:0001 ROOT
LINKS...... child :0000000000000000
........... siblings :0000000000000000
........... sib_back :0000000000000000
........... uidinfo :000000000358FA80
........... ganchor :F100100A00111400 <pvproc+111400>
THREAD..... threadlist :F100100A1008A700 <pvthread+08A700>
........... zombies :0000000000000000
Note: For all kdb subcommands, only a few output might be useful for AIX users, because most of the
output columns requires knowledge about of the corresponding subsystem's internals (in this case,
process management).
thread subcommand
The thread subcommand (alias th) displays data from the kernel thread table.
194 AIX Version 6.1: KDB kernel debugger and kdb command
Format
thread
thread ?
thread *
thread -
thread @wpar_id
thread address
thread -c wlm_class
thread -j
thread -lk
thread -n substring
thread -nw
thread p proc_slot
thread -r
thread -s thread_state
thread slot
thread symbol
thread -w wait_type
Parameters
The following list of parameter provides the summary output for all or a selected subset of threads.
The following table provides detailed output for all or selected subset of threads.
196 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
th Prints the current thread.
- Prints all threads that are in the none or zombie state in the long format.
address Prints threads at an address parameter where an address parameter is the effective address of the
corresponding thread or pvtthread slot.
slot Prints threads in the slot parameter where slot is the value from the SLOT column of the summary output.
symbol Prints threads that match the symbol parameter.
Examples
KDB(0)> th *
SLOT NAME STATE TID PRI RQ CPUID CL WCHAN
The slot column lists the thread structure slot index for the thread. The numbers in this column
must be used as the slot argument for detailed display options. The PRI column lists the current
scheduling priority for the thread. The RQ column lists current scheduler run queue for the
thread. CPUID when present, is the CPU index to which the thread is bound. CL is the Workload
Manager (WLM) class (relevant when WLM is active). WCHAN is the wait channel for threads
that are in the SLEEP state.
Detailed output for a given thread
This format displays all or selected fields of the process structure for a given process. The
following example shows the detailed output for the given thread:
KDB(0)>th
SLOT NAME STATE TID PRI RQ CPUID CL WCHAN
NAME................ kdb_64
WTYPE............... WEVENT
.................tid :0000000000A70103 ......tsleep :FFFFFFFFFFFFFFFF
............tv_flags :00000000 ...........tv_flags2 :00000000
Note: For all kdb subcommands, only a few output might be useful for AIX users, because most of the
output columns requires knowledge about of the corresponding subsystem's internals (in this case,
process management).
user subcommand
The user subcommand (alias u) displays data from the kernel user structure.
Format
user [-ad] [-cr] [-f] [-w] [-s] [-ru] [-t] [-ut] [-64] [-32] [-s32] threadslot/eaddr
Parameters
Item Description
-ad Prints user adpsace information only.
-cr Prints credential information only.
-f Prints file information only.
-ru Prints profiling, resource, or limit information only.
-s Prints signal information only.
-t Prints timers information only.
-ut Prints user-thread information only.
-64 Prints 64-bit user information only.
-mc Prints miscellaneous user information only.
-w Prints Workload Manager (WLM) information only.
-32 Prints 32-bit STAB only.
-s32 Prints 32-bit signal information for a 64-bit process.
Examples
The user command displays the user structure as uthread and ublock, for a thread identified by its slot
number or thread slot address. When the slot or address is not specified, it displays the user structure for
the current thread. The options listed for the user command limit the output to some sections of the user
structure.
KDB(0)> u
User thread context [F00000002FF47600]:
save.... @ F00000002FF47600 fpr..... @ F00000002FF47900
kstack .... F00000002FF47600
Uthread VMX state:
vmxstate...00<<VMX NOT USED
Uthread System call state:
198 AIX Version 6.1: KDB kernel debugger and kdb command
msr........800000000000D032
errnopp....0FFFFFFFFFFFFFE8 error......00000000
context....0000000000000000
sigssz.....0000000000000000 sc_flags...00
stkb.......0000000000000000 scnum......0153 cancelable? N
scsave[0]..BADC0FFEE0DDF00D scsave[1]..0000000000000000
scsave[2]..0000000000001000 scsave[3]..090000000003BFE0
scsave[4]..FFFFFFFFFFFFFFFF scsave[5]..000000002000148C
scsave[6]..FFFFFFFFFFFFFFFF scsave[7]..00000000DEADBEEF
flags: ASSERTSIG CHKWAKE
kstack.....F00000002FF47600 audsvc.....0000000000000000
amr........3FFC000000000003 amrstack...F00000002FFCD000
Uthread Miscellaneous stuff:
fstid.....00000000 ioctlrv...00000000
Note: For all kdb subcommands, only a few output might be useful for AIX users, because most of the
output columns requires knowledge about of the corresponding subsystem's internals (in this case,
process management).
ppid subcommand
The ppid subcommand displays the process entry belonging to a process.
Format
Parameters
Item Description
-h Specifies that the pid parameter is in hexadecimal.
-d Specifies that the pid parameter is in decimal.
pid Specifies the process ID for which you want to display the process entry. This value must be a decimal or a
hexadecimal value as specified by the -h or -d options, or as required by the hexadecimal_wanted toggle
specified with the set subcommand. If no process ID is specified, the process table entry for the current
process is displayed.
Other
pr_pid
Examples
NAME....... ksh
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00200001 LOAD EXECED
........... flag2 :00000000
........... atomic :00040000 ORPHANPGRP
LINKS...... child :00000000
........... siblings :E2005400 <pvproc+005400>
........... uidinfo :0055C240
........... ganchor :E2007800 <pvproc+007800>
THREAD..... threadlist :EA003100 <pvthread+003100>
NAME....... errdemon
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00000401 LOAD SIGNOCHLD
........... flag2 :02600000 INHERITED
........... atomic :00040000 ORPHANPGRP
...
ptid subcommand
The ptid subcommand displays the process entry corresponding to a thread.
Format
Parameters
Item Description
-h Specifies that the tid parameter is in hexadecimal.
-d Specifies that the tid parameter is in decimal.
tid Specifies the thread ID for which you want to display the process entry. This value must be a decimal or a
hexadecimal value as specified by the -h or -d options, or as required by the hexadecimal_wanted toggle
specified with the set subcommand. If no thread ID is specified, the process table entry for the current
thread is displayed.
Other
pr_tid
Examples
NAME....... ksh
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00200001 LOAD EXECED
........... flag2 :00000000
........... atomic :00040000 ORPHANPGRP
200 AIX Version 6.1: KDB kernel debugger and kdb command
LINKS...... child :00000000
........... siblings :E2005400 <pvproc+005400>
........... uidinfo :0055C240
........... ganchor :E2007800 <pvproc+007800>
THREAD..... threadlist :EA003100 <pvthread+003100>
DISPATCH... synch :FFFFFFFF
AACCT...... projid :00000000 ........... sprojid :00000000
........... subproj :0000000000000000
........... file id :0000000000000000 0000000000000000 00000000
........... flags :0000
WLM........ class/wlm :00/0000
........... time of SIGTERM:00000000
........... wlm_nvpages :0000000000000000 0
... <The output here is identical to the "p" or "proc" command, and is for all other examples here>
NAME....... sendmail
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00200001 LOAD EXECED
........... flag2 :00000000
........... atomic :00040000 ORPHANPGRP
....
ttid subcommand
The ttid subcommand displays the thread table entry for a specific thread.
Format
Parameters
Item Description
-h Specifies that the tid parameter is in hexadecimal.
-d Specifies that the tid parameter is in decimal.
tid Specifies the thread ID. This value must be a decimal or a hexadecimal value as specified by the -h or -d
options, or as required by the hexadecimal_wanted toggle specified with the set subcommand. If no thread ID
is specified, the entry for the current thread is displayed.
Other
th_tid
Examples
NAME................ init
FLAGS............... WAKEONSIG
WTYPE............... WEVENT
............stackp64 :00000000 ..............stackp :2FF22DC0
...............state :00000003 ...............wtype :00000001
.............suspend :00000001 ...............flags :00000400
..............atomic :00000000
DATA................
...............procp :E3000100
...............userp :2FF3B6C0 <__ublock+0002C0>
............uthreadp :2FF3B400 <__ublock+000000>
THREAD LINK.........
..........prevthread :E60000C0
..........nextthread :E60000C0
SLEEP LOCK.........
............ulock64 :00000000 ..............ulock :00000000
...............wchan :00000000 ..............wchan1 :00000000
...........wchan1sid :00000000 ........wchan1offset :01AB5A58
..............wchan2 :00000000 ..............swchan :00000000
...........eventlist :00000000 ..............result :00000000
.............polevel :000000AF .............pevent :00000000
.............wevent :00000004 ..............slist :00000000
...........lockcount :00000000
DISPATCH............
...............ticks :00000000 ...............prior :E60000C0
................next :E60000C0 ...............synch :FFFFFFFF
..............dispct :000008F6 ...............fpuct :00000000
SCHEDULER...........
...............cpuid :FFFFFFFF ..............scpuid :FFFFFFFF
............affinity :00000001 .................pri :0000003C
..............policy :00000000 .................cpu :00000000
.............lockpri :0000003D .............wakepri :0000007F
................time :000000FF .............sav_pri :0000003C
SIGNAL..............
..............cursig :00000000
......(pending) sig :
............sigmask :
...............scp64 :00000000 .................scp :00000000
MISC................
............graphics :00000000 ..............cancel :00000000
...........lockowner :E60042C0 .............boosted :00000000
..............tsleep :FFFFFFFF
..........userdata64 :00000000 ............userdata :00000000
tpid subcommand
The tpid subcommand displays all thread entries belonging to a process.
Format
Parameters
202 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-x Specifies that the pid parameter is in hexadecimal.
-d Specifies that the pid parameter is in decimal.
pid Specifies the process ID for which you want to display thread entries. This value must be a decimal or a
hexadecimal value as specified by the -h or -d options, or as required by the hexadecimal_wanted toggle
specified with the set subcommand. If no process ID is specified, all thread table entries for the current
process are displayed.
Other
th_pid
Examples
rq subcommand
The rq subcommand lists threads currently queued on the system run queues.
Format
rq [ bucket | effectiveaddress]
Parameters
Item Description
bucket Lists all threads queued in a particular bucket across all run queues. The bucket is equal to the thread
priority minus 1.
effectiveaddress Lists all threads queued in the bucket specified by the effective address.
If the rq subcommand is used with no parameters, a list of all buckets currently containing threads across
all run queues is generated. If the rq subcommand is used with parameters, you can restrict the
generated list to a particular run queue or to a particular bucket across all run queues.
Other
runq
rqi subcommand
The rqi subcommand displays information about run queues on the system.
Format
Parameters
Item Description
-mrq Displays information about all mrq nodes in the system.
queue Specifies the effective address for the run queue structure specified by the effective address.
slot Specifies the run queue structure you want to display.
If the rqi subcommand is run without any parameters, a summary line for each run queue in the system
is displayed. If the rqi subcommand is run with parameters, a specific run queue structure or the mrq
nodes in the system are displayed.
204 AIX Version 6.1: KDB kernel debugger and kdb command
Other
rqa
Examples
MRQ_NODE @ 2171000
my_ndx........... 0000 rq_start_ndx..... 0000 lbolt........ 0006
active_rqs....... 0004 max_rqs.......... 0004
rqs_mask..... F0000000 00000000 00000000 00000000
S2_threshold..... 0000 num_S2........... 0001 S3_threshold. 00000180
thread_count..... 00A3 load......... 00000003 rq_slot.... @ 21711C8
sched_tid........ 00000003 reaper_tid....... 0000060D
zstart........... 0 zfinal........... E200D000
pref_S2id........ 0
S2_stealable..... 0 0 0 0
S2id............. 0 0 0 0
num_S1........... 04
pref_S1id........ 00
S3_anysteals..... 0
S2_load.......... FFFFFFF4 balanced
S1_loads......... 00000000 00000000 00000000 00000000
KDB(0)>
KDB(0)> rqi
RQ Node CPUs First Threads stl ustl any S1stl S2stl S3stl Busy Load
lq subcommand
The lq subcommand displays information about threads waiting on a lock.
Format
lq [ bucket | effectiveaddress ]
Parameters
Item Description
bucket Displays information about a thread in the specified lock queue bucket.
effectiveaddress Displays information about a thread in the lock queue bucket that is specified by the effective address.
When run without any parameters, this subcommand displays a list of all threads which are currently
waiting on some lock. With a parameter, the subcommand displays information about a waiting thread in
a specific lock queue bucket.
Other
lockq
Examples
cr subcommand
The cr subcommand displays information about the checkpoint and the restart identifiers from the global
crid_table.
Format
cr [ * | -i id | slot | effectiveaddress ]
Parameters
206 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
* Causes the crid subcommand to display a summary of all crid structures in the system.
-i Specifies the checkpoint or restart identifier (CRID) of the crid structure to be displayed.
slot Specifies the slot number within the crid_table of the crid structure to be displayed.
effectiveaddress Specifies the effective address of a particular crid structure to be displayed.
If the cr subcommand is run without any parameters, the crid structure is displayed for the current
process if one exists. If the cr subcommand is run with parameters, a summary of all crid structures in
the table are displayed or any specific crid structure is displayed.
Other
crid
Examples
svmon subcommand
The svmon subcommand displays information about the memory and paging space use on a per-process
basis.
Format
Parameters
Item Description
-p pid Displays detailed information about the process specified by its process identifier.
-s slot Displays detailed information about the process in the specified process slot.
-a effectiveaddress Displays detailed information about the process specified by the effective address of its pvproc structure.
* Displays a brief summary about all the processes on the system when the asterisk ( * ) is the only
parameter.
– Displays detailed information about all the processes on the system when the minus sign ( – ) is the only
parameter.
Other
No aliases.
Examples
-------------------------------------------------------------------------------
Pid Command 64-bit Mthrd LPage Kproc Uid
8196 wait Y N N Y 0
208 AIX Version 6.1: KDB kernel debugger and kdb command
176260 IBM.AuditRMd 8359 3775 0 8306 N Y N
184438 diagd 8069 3766 0 8060 N N N
188594 qdaemon 8039 3766 0 8023 N N N
192622 writesrv 8040 3766 0 8035 N N N
196744 uprintfd 7997 3766 0 7995 N N N
204906 rpc.lockd 6185 3779 0 6185 Y Y N
213104 IBM.ServiceRM 8285 3774 0 8261 N Y N
249980 IBM.ERrmd 8467 3775 0 8406 N Y N
254120 kdb_64 7392 3769 0 6935 Y N N
258180 IBM.CSMAgentR 8453 3777 0 8395 N Y N
(0)>
meml subcommand
The meml subcommand displays information about the memory lock entries.
Format
Parameters
Item Description
-l Specifies the address of a memory lock entries list.
-e Specifies the address of a memory lock entry.
effectiveaddress Identifies the effective address. Use symbols, hexadecimal values, or hexadecimal expressions to specify the
address.
Other
memlock
Examples
cred subcommand
The cred subcommand displays the credentials structure for a specific effective address.
Format
cred [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of a credentials structure.
Other
No aliases.
Examples
kkeymap subcommand
The kkeymap subcommand displays the mapping of kernel keys to hardware storage keys. You can
display either the full mapping of all known kernel keys to hardware keys (no operand), or just the
hardware key that the specified kernel key maps to.
Format
kkeymap[kkey]
Parameters
210 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
kkey Specifies the decimal integer value representing the kernel key from the kernel/sys/skeys.h file.
Other
kkey or kk
Examples
The following is an example of how to use the kkeymap subcommand:
kkeymap
kkeymap 10
hkeymap subcommand
The hkeymap subcommand displays the names of all kernel keys that map to a specified hardware key.
Format
hkeymap[hkey]
Parameters
Item Description
hkey Specifies the decimal value of the hardware key of interest.
Other
hkey or hk
Examples
hkeyset subcommand
The hkeyset subcommand displays a list of the hardware keys included in a hardware keyset, including
as many kenal keys that map to each hardware key as will fit on one line.
Format
hkeyset[value]
Parameters
Other
hks
Examples
The following is an example of how to use the hkeyset subcommand:
hks 0
kkeyset subcommand
The kkeyset subcommand displays the contents of the addressed kkeyset_t pointer, showing by name
which kernal keys are included and their access levels.
Format
kkeyset[addr]
Parameters
Item Description
addr Specifies the address of a kkeyset_t, which is a pointer to a kernel keyset structure.
Other
kks
Examples
pbuf subcommand
The pbuf subcommand prints physical buffer information.
Format
pbuf [effectiveaddress]
Parameters
212 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
effectiveaddress Specifies the effective address of the physical buffer. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
Other
No aliases.
Examples
volgrp subcommand
The volgrp subcommand displays volume group information. The volgrp structure addresses are
registered in the devsw table in the DSDPTR field.
Format
volgrp [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of the volgrp structure to display. Use symbols, hexadecimal values or
hexadecimal expressions to specify the address.
Other
No aliases.
...
214 AIX Version 6.1: KDB kernel debugger and kdb command
pvol subcommand
The pvol subcommand displays the physical volume data structure.
Format
pvol [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of the pvol structure to display. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Other
No aliases.
Examples
lvol subcommand
The lvol subcommand displays logical volume information.
Format
lvol [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of the lvol structure to display. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Other
No aliases.
Examples
scd subcommand
The scd subcommand displays the scdisk_diskinfo structure.
Format
Parameters
Item Description
slot Specifies the slot number of the scdisk entry to be displayed. To use this parameter, the scdisk list must
have been previously loaded using the scd subcommand with no parameter. This value must be a decimal
number.
effectiveaddress Specifies the effective address of an scdisk_diskinfo structure to display. Use symbols, hexadecimal values,
or hexadecimal expressions to specify the address.
If no argument is specified, the scd subcommand loads the slot numbers with addresses from the
scdisk_list array. If the scdisk_list symbol cannot be located to load these values, the user is prompted for
the address of the scdisk_list array. Obtain this address by locating the data address for the scdiskpin
kernel extension and adding the offset to the scdisk_list array, which is obtained from a map, to that
value.
A specific scdisk_list entry can be displayed by specifying either a slot number or the effective address of
the entry. You can only use a slot number if the slots were previously loaded using the scd subcommand
with no arguments.
Other
scdisk
Examples
216 AIX Version 6.1: KDB kernel debugger and kdb command
le_de........... 00000000
KDB(4)> d 01A61320 100 //print data
01A61320: 0000 000B 0000 0006 FFFF FFFF 0562 7C00 .............b|.
01A61330: 0000 0000 0000 0000 0000 0000 0000 0000 ................
01A61340: 01A6 08DC 01A6 08D8 01A6 08D4 01A6 08D0 ................
01A61350: 01A6 08CC 01A6 08C8 01A6 08C4 01A6 08C0 ................
01A61360: 01A6 0920 01A6 0960 01A6 09A0 01A6 09E0 ... ...`........
01A61370: 01A6 0A20 01A6 0A60 01A6 0AA0 01A6 0AE0 ... ...`........
01A61380: 01A6 0B20 01A6 0B60 01A6 0BA0 01A6 0BE0 ... ...`........
01A61390: 01A6 0C20 01A6 0C60 01A6 0CA0 01A6 0CE0 ... ...`........
01A613A0: 7363 696E 666F 0000 6366 676C 6973 7400 scinfo..cfglist.
01A613B0: 6F70 6C69 7374 0000 4028 2329 3435 2020 oplist..@(#)45
01A613C0: 312E 3139 2E36 2E31 3620 2073 7263 2F62 1.19.6.16 src/b
01A613D0: 6F73 2F6B 6572 6E65 7874 2F64 6973 6B2F os/kernext/disk/
01A613E0: 7363 6469 736B 622E 632C 2073 7973 7864 scdiskb.c, sysxd
01A613F0: 6973 6B2C 2062 6F73 3432 302C 2039 3631 isk, bos420, 961
01A61400: 3354 2031 2F38 2F39 3620 3233 3A34 313A 3T 1/8/96 23:41:
01A61410: 3538 0000 0000 0000 0567 4000 0567 5000 [email protected].
KDB(4)> scd //print scsi disk table
Unable to find <scdisk_list>
Enter the scdisk_list address (in hex): 01A61418
Scsi pointer [01A61418]
slot 0...........05674000
slot 1...........05675000
slot 2...........0566C000
slot 3...........0566D000
slot 4...........0566E000
slot 5...........0566F000
slot 6...........05670000
slot 7...........05671000
slot 8...........05672000
slot 9...........05673000
slot 10...........0C40D000
slot 11...........00000000
slot 12...........00000000
slot 13...........00000000
slot 14...........00000000
slot 15...........00000000
218 AIX Version 6.1: KDB kernel debugger and kdb command
Display memory allocation information subcommands
The subcommands in this category display memory allocation information.
heap subcommand
The heap subcommand displays information about heaps.
Format
Parameters
Item Description
-l Displays information about the heap, including the complete free page list, deferred free page list
(MODS-enabled only), and allocated pages.
-f Displays only the free page list.
-d Displays only the deferred free page list.
-a Displays only the allocated pages.
<address> Specifies the effective address of the heap. Use symbols, hexadecimal values, or hexadecimal expressions
to specify the address.
<SRAD number> Specifies that the heap to display should be the default kernel heap corresponding to the given system
resource allocation domain (SRAD).
Other
hp
Examples
220 AIX Version 6.1: KDB kernel debugger and kdb command
vmrelflag...... 00000000 newheap........ 00000000
protect........ 00000000 limit.......... 00000000
heap64......... 00000000 rhash.. 0000000002E56048
pagtot......... 000024CC pagused........ 00001068
frtot[00].. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frtot[04].. 0000000B [05].. 00000617 [06].. 0000C087 [07].. 00008A5F
frtot[08].. 00000438 [09].. 000001E4 [10].. 0000203A [11].. 000000A3
frused[00]. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frused[04]. 0000000B [05].. 000005F8 [06].. 00000073 [07].. 000001E0
frused[08]. 000000A3 [09].. 00000026 [10].. 000000D8 [11].. 00000012
fr[00]..... 00FFFFFF [01].. 00FFFFFF [02].. 00FFFFFF [03].. 00FFFFFF
fr[04]..... 000000E0 [05].. 0000F1BB [06].. 000158C6 [07].. 000158B6
fr[08]..... 00015242 [09].. 0000F216 [10].. 000158BF [11].. 0000F3D3
Heap: per-cpu free lists
addr...... F1000C000FF0A000 overflow.......... 00000000
ov_min.... 0000000000000000 ov_max.... 0000000000000000
maxpds............ 00FF00F6 peakpd............ 00000000
l2pg_size......... 0000000C l2pd_size......... 0000000C
limit_callout..... 00000000 newseg_callout.... 00000000
pagesoffset....... 00008BA0 pages_srval....... 00000000
lockoffset........ 00000400 locks_srval....... 00000000
heap_locks...... @ F1000C0000000400 pages........... @ F1000C0000008BA0
heap_lists...... @ F1000C0000000A80
Heap anchor
... F1000C0000008B90 pageno FFFFFFFF type.. 00 allocpage offset... 0158C9
The largest free range in the heap is 16623661 pages and starts
at page 158C9.
KDB(0)> heap -l 0
Heap for node #00
Heap F1000C0000000110
sanity......... 48454150 base... 000000000FF09EF0
lock@.. F1000C0000000120 lock... 0000000000000000
alt............ 00000000 numpds......... 00FF00F6
amount. 000000000B106FF0 pinflag........ 00000000
vmrelflag...... 00000000 newheap........ 00000000
protect........ 00000000 limit.......... 00000000
heap64......... 00000000 rhash.. 0000000002E56048
pagtot......... 0001223C pagused........ 0000AFAA
frtot[00].. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frtot[04].. 000005B9 [05].. 00000A84 [06].. 000005ED [07].. 00001F93
frtot[08].. 000001F8 [09].. 00000016 [10].. 0000007D [11].. 0000000E
frused[00]. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frused[04]. 00000001 [05].. 00000005 [06].. 0000002B [07].. 00001579
frused[08]. 00000014 [09].. 00000002 [10].. 0000000C [11].. 0000000A
fr[00]..... 00FFFFFF [01].. 00FFFFFF [02].. 00FFFFFF [03].. 00FFFFFF
fr[04]..... 00014E09 [05].. 000158B0 [06].. 00015648 [07].. 000140A0
fr[08]..... 000154A8 [09].. 0000F198 [10].. 000155D8 [11].. 00FFFFFF
Heap: per-cpu free lists
Heap F1000C0000000000
sanity......... 48454150 base... 000000000FF0A000
lock@.. F1000C0000000010 lock... 0000000000000000
alt............ 00000001 numpds......... 00FF00F6
amount. 000000000202EB70 pinflag........ 00000001
vmrelflag...... 00000000 newheap........ 00000000
protect........ 00000000 limit.......... 00000000
heap64......... 00000000 rhash.. 0000000002E56048
pagtot......... 000024CC pagused........ 00001068
frtot[00].. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frtot[04].. 0000000B [05].. 00000617 [06].. 0000C087 [07].. 00008A5F
frtot[08].. 00000438 [09].. 000001E4 [10].. 0000203A [11].. 000000A3
frused[00]. 00000000 [01].. 00000000 [02].. 00000000 [03].. 00000000
frused[04]. 0000000B [05].. 000005F8 [06].. 00000073 [07].. 000001E0
frused[08]. 000000A3 [09].. 00000026 [10].. 000000D8 [11].. 00000012
fr[00]..... 00FFFFFF [01].. 00FFFFFF [02].. 00FFFFFF [03].. 00FFFFFF
fr[04]..... 000000E0 [05].. 0000F1BB [06].. 000158C6 [07].. 000158B6
fr[08]..... 00015242 [09].. 0000F216 [10].. 000158BF [11].. 0000F3D3
Heap: per-cpu free lists
222 AIX Version 6.1: KDB kernel debugger and kdb command
Heap deferred free anchor
... F1000C0000008B80 pageno FFFFFFFE type.. 00 allocpage offset... 0158C7
Heap Deferred Free list
... F1000C0000161810 pageno 000158C7 type.. 01 allocrange offset... 0158C0
... F1000C0000161820 pageno 000158C8 type.. 06 allocsize size..... 000002
... F1000C00001617A0 pageno 000158C0 type.. 01 allocrange offset... 0158B7
...
KDB(0)> heap -d 0
Heap for node #00
Heap F1000C0000000110
Heap: per-cpu free lists
Heap F1000C0000000000
Heap: per-cpu free lists
addr...... F1000C000FF0A000 overflow.......... 00000000
ov_min.... 0000000000000000 ov_max.... 0000000000000000
maxpds............ 00FF00F6 peakpd............ 00000000
l2pg_size......... 0000000C l2pd_size......... 0000000C
limit_callout..... 00000000 newseg_callout.... 00000000
pagesoffset....... 00008BA0 pages_srval....... 00000000
lockoffset........ 00000400 locks_srval....... 00000000
heap_locks...... @ F1000C0000000400 pages........... @ F1000C0000008BA0
heap_lists...... @ F1000C0000000A80
Heap anchor
... F1000C0000008B90 pageno FFFFFFFF type.. 00 allocpage offset... 0158C9
The largest free range in the heap is 16623661 pages and starts
at page 158C9.
Heap Alloc list
... F1000C0000008BA0 pageno 00000000 type.. 00 allocpage offset... NO_PAGE
... F1000C0000008BB0 pageno 00000001 type.. 00 allocpage offset... NO_PAGE
... F1000C0000008BC0 pageno 00000002 type.. 00 allocpage offset... NO_PAGE
...
KDB(0)> heap @kernel_heap0
Heap 03AF80E0
sanity......... 48454150 base... 0000000000039F20
lock@.. 0000000003AF80F0 lock... 0000000000000000
alt............ 00000000 numpages....... 0000C4CE
amount. 00000000005E66C0 pinflag........ 00000000
vmrelflag...... 00000000 newheap........ 00000000
protect........ 00000000 limit.......... 00000000
heap64......... 00000000 rhash.. 0000000000000000
pagtot......... 00000000 pagused........ 00000000
...
xmalloc subcommand
The xmalloc subcommand displays memory allocation information, finds the memory location of any
heap record using the page index or finds the heap record using the allocated memory location.
Format
xmalloc [-s [effectiveaddress]] [-h [effectiveaddress]] [[-l] -f] [[-l] -a] [[-l] -p page] [-d [effectiveaddress]] [-v] [[-q]
-u [size]] [-S] [effectiveaddress] [-H heap_addr]
Parameters
Other than the -u parameter, these parameters require that the Memory Overlay Detection System
(MODS) is active. If parameters require a memory address and no value is specified, the value of the
Debug_addr symbol is used. If a system crash is caused by detection of a problem within MODS, this
value is updated by MODS. The default heap reported on is the kernel heap.
Other
xm
Examples
The following is an example of how to use the xm alias of the xmalloc subcommand:
(0)> stat
RS6K_SMP_MCA POWER_PC POWER_604 machine with 8 processor(s)
.......... SYSTEM STATUS
sysname... AIX nodename.. jumbo32
release... 3 version... 4
machine... 00920312A0 nid....... 920312A0
time of crash: Fri Jul 11 08:07:01 1997
age of system: 1 day, 20 hr., 31 min., 17 sec.
.......... PANIC STRING
Memdbg: *w == pat
224 AIX Version 6.1: KDB kernel debugger and kdb command
00235CD4(.dlistadd+000040) 00234F04(.setbitmaps+0001BC)
00235520(.newblk+00006C) 00236894(.finicom+0001A4)
(0)> heap
...
Heap Alloc list
... 0FFC41B0 pageno 00000007 pages.type.. 01 allocrange offset... NO_PAGE
... 0FFC41B4 pageno 00000008 pages.type.. 06 allocsize size..... 00001E00
... 0FFCB9AC pageno 00001E06 pages.type.. 07 allocrangeend offset... 00000007
... 0FFCB9B0 pageno 00001E07 pages.type.. 01 allocrange offset... NO_PAGE
... 0FFCB9B4 pageno 00001E08 pages.type.. 06 allocsize size..... 00001E00
kmbucket subcommand
The kmbucket subcommand prints kernel memory allocator buckets.
Format
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
226 AIX Version 6.1: KDB kernel debugger and kdb command
Examples
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
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
kmstats subcommand
The kmstats subcommand prints kernel allocator memory statistics.
Format
kmstats [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of the kernel allocator memory statistics entry to display. Use symbols,
hexadecimal values, or hexadecimal expressions to specify the address.
If no address is specified, all of the kernel allocator memory statistics are displayed. If an address is
entered, only the specified statistics entry is displayed.
No aliases.
Examples
...
228 AIX Version 6.1: KDB kernel debugger and kdb command
(0)> more (^C to quit) ? //continue
limit blocks..(x)........00000000
map blocks..(x)..........00000000
maxused..(x).............00003500
limit..(x)...............02666680
failed..(x)..............00000000
lock..(x)................00000000
KDB(0)>
dnlc subcommand
The dnlc subcommand displays information about the filesystem directory name lookup cache.
Format
Parameters
Item Description
slot Specifies the decimal identifier of a specific cache slot.
effectiveaddress Specifies the effective address of the entry. Symbols, hexadecimal values, or hexadecimal expressions can be
used in specification of the address.
The dnlc subcommand is used to display information about the directory name cache.
When no parameters are provided, a summary of the entire directory name lookup cache is displayed.
Other
ncache
Examples
hdnlc subcommand
The hdnlc subcommand displays information about the file system hash list for the directory name cache.
Format
Parameters
Item Description
slot Specifies the decimal identifier of a specific hash bucket.
effectiveaddress Specifies the effective address of the entry. Symbols, hexadecimal values, or hexadecimal expressions can be
used to specify the address.
The hdnlc command is used to display information about the dnlc hash table. When no parameters are
provided, a summary of the entire hash list is displayed.
Other
hncache
Examples
230 AIX Version 6.1: KDB kernel debugger and kdb command
KERN_heap+65B9018 2 F10000F0059B9600 F10000F0059B9660 00000000 1
KERN_heap+65B9078 6 F10000F0059BAE60 F10000F0059BAEC0 00000000 2
KERN_heap+65B9288 28 F10000F0059C35C0 F10000F0059C3620 00000000 11
KERN_heap+65B9378 38 F10000F0059C6E00 F10000F0059C6E60 00000000 1
KERN_heap+65B9420 45 F10000F0059C9800 F10000F0059C9860 00000000 1
KERN_heap+65B9540 57 F10000F0059CE000 F10000F0059CE060 00000000 1
KERN_heap+65B9738 78 F10000F0059D5E00 F10000F0059D5E60 00000000 1
KERN_heap+65B9750 79 F10000F0059D6400 F10000F0059D6460 00000000 1
KERN_heap+65B9768 80 F10000F0059D6A00 F10000F0059D6A60 00000000 1
KERN_heap+65B9810 87 F10000F0059D9400 F10000F0059D9460 00000000 1
KERN_heap+65B9828 88 F10000F0059D9A00 F10000F0059D9A60 00000000 1
KERN_heap+65B98A0 93 F10000F0059DB800 F10000F0059DB860 00000000 1
KERN_heap+65B98D0 95 F10000F0059DC400 F10000F0059DC460 00000000 1
KERN_heap+65B9900 97 F10000F0059DD000 F10000F0059DD060 00000000 1
KERN_heap+65B9978 102 F10000F0059DEE00 F10000F0059DEE60 00000000 1
KERN_heap+65B9990 103 F10000F0059DF400 F10000F0059DF460 00000000 1
KERN_heap+65B9A38 110 F10000F0059E1E00 F10000F0059E1E60 00000000 1
KERN_heap+65B9A80 113 F10000F0059E3000 F10000F0059E3060 00000000 1
KERN_heap+65B9B88 124 F10000F0059E7200 F10000F0059E7260 00000000 1
(0)> more (^C to quit) ?
<snip>
KDB(0)> hdnlc 28 //specific bucket
HASH ENTRY( 28): F10000F0065B9288
DP NP NAME
kvn subcommand
The kvn subcommand displays the kdm vnode data structure.
Format
kvn address
Parameters
Item Description
address Identifies the address of the kdm vnode to display.
Other
No aliases.
Examples
NOTE: The kdm vnode pointer is in the JFS2 inode and may be obtained from
the output of the i2 command, in the kdmvp field:
KDB(0)> i2 32F23340
ADDRESS DEVICE I_NUM IPMNT COUNT TYPE FLAG
32F23340 002B0007 2 32F77020 00001 VDIR
232 AIX Version 6.1: KDB kernel debugger and kdb command
fsxlock......0x00000000
btorder......0x00000000
agstart......0x0000000000000000
lastCommittedSize...0x0000000000000100
buffer subcommand
The buffer subcommand displays buffer cache headers.
Format
Parameters
Item Description
slot Specifies the buffer pool slot number. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a buffer pool entry. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
Other
buf
Examples
hbuffer subcommand
The hbuffer subcommand displays buffer cache hash list headers.
Format
hbuffer [bucket | effectiveaddress]
Parameters
Item Description
bucket Specifies the bucket number of the buffer cache hash list entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a buffer cache hash list entry. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is specified, a summary for all entries is displayed. Display a specific entry by specifying
the entry by bucket number or entry address.
Other
hb
Examples
0562F0CC 18 057E4630 1
0562F12C 26 057E4688 1
KDB(0)> hb 26 //print buffer cache hash list bucket 26
DEV VNODE BLKNO FLAGS
fbuffer subcommand
The fbuffer subcommand displays buffer cache freelist headers.
234 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Parameters
Item Description
bucket Specifies the bucket number of the buffer cache freelist entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a buffer cache freelist entry. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is specified, a summary for all entries is displayed. Display a specific entry by specifying
the entry by bucket number or entry address.
Other
fb
Examples
gnode subcommand
The gnode subcommand displays the generic node structure at the specified address.
Format
gnode effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address of a generic node structure. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Other
gno
Examples
The following is an example of how to use the gno alias for the gnode subcommand:
gfs subcommand
The gfs subcommand displays the generic file system structure at the specified address.
Format
gfs address
Parameters
Item Description
address Specifies the address of a generic file system structure. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
Other
No aliases.
Examples
file subcommand
The file subcommand displays file table entries.
Format
Parameters
236 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
slot Specifies the slot number of a file table entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a file table entry. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the effective address.
If no parameter is used, all of the file table entries are displayed in a summary. Used files are displayed
first. Detailed information can be displayed for individual file table entries by specifying the entry slot
number or address.
Other
No aliases.
Examples
inode subcommand
The inode subcommand displays inode table entries.
Parameters
Item Description
slot Specifies the slot number of an inode table entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of an inode table entry. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
If no parameter is entered, a summary for used inode table entries is displayed. The inode is considered
used when count is greater than 0. Unused inodes are displayed with the fino subcommand. Detailed
information is displayed for individual inode table entries by specifying the entry. The information is
interpreted for special inodes. Special inodes include: mountnode and inodes.
Other
ino
Examples
The following is an example of how to use the ino alias for the inode subcommand:
(0)> ino //print inode table
DEV NUMBER CNT GNODE IPMNT TYPE FLAGS
238 AIX Version 6.1: KDB kernel debugger and kdb command
GNODE............ 09F79520
gn_type....... 00000000 gn_flags...... 00000000 gn_seg........ 00000000
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 09F794E0 gn_rdev....... 00000000 gn_ops........ jfs_vops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 09F79554
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 09F79510
gn_type....... NON
VNODE........... 09F794E0
v_flag.... 00000000 v_count... 00000000 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 09F794EC v_vfsp.... 00000000
v_mvfsp... 00000000 v_gnode... 09F79520 v_next.... 00000000
v_vfsnext. 00000000 v_vfsprev. 00000000 v_pfsvnode 00000000
v_audit... 00000000
GNODE............ 09F77F58
gn_type....... 00000000 gn_flags...... 00000000 gn_seg........ 00007547
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 09F77F18 gn_rdev....... 00000000 gn_ops........ jfs_vops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 09F77F8C
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 09F77F48
gn_type....... NON
VNODE........... 09F77F18
v_flag.... 00000000 v_count... 00000000 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 09F77F24 v_vfsp.... 00000000
v_mvfsp... 00000000 v_gnode... 09F77F58 v_next.... 00000000
v_vfsnext. 00000000 v_vfsprev. 00000000 v_pfsvnode 00000000
v_audit... 00000000
hinode subcommand
The hinode subcommand displays inode hash list entries.
Format
Parameters
Item Description
bucket Specifies the bucket number. This parameter must be a decimal value.
address Specifies the effective address of an inode hash list entry. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
If no parameter is entered, the hash list is displayed. View the entries for a specific hash table entry by
specifying a bucket number or the address of a hash list bucket.
Other
hino
Examples
The following is an example of how to use the hino alias for the hinode subcommand:
(0)> hino //print hash inode buckets
BUCKET HEAD TIMESTAMP LOCK COUNT
240 AIX Version 6.1: KDB kernel debugger and kdb command
0A340E68 00330004 2524 0 0A340E78 09F78090 REG
0A28CA50 00330003 10677 0 0A28CA60 09F79510 DIR
0A1AFCA0 00330006 2526 0 0A1AFCB0 09F7A990 REG
icache subcommand
The icache subcommand displays inode cache list entries.
Format
Parameters
Item Description
slot Specifies the slot number of an inode cache list entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of an inode cache list entry. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is entered, a summary is displayed. Display detailed information for a particular entry by
specifying the entry to display with either the slot number or the address.
Other
fino
Examples
The following is an example of how to use the fino alias for the icache subcommand:
(0)> fino //print free inode cache
DEV NUMBER CNT GNODE IPMNT TYPE FLAGS
GNODE............ 09CABFB0
gn_type....... 00000004 gn_flags...... 00000000 gn_seg........ 00000000
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 09CABF70 gn_rdev....... 00030000 gn_ops........ jfs_vops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 09CABFE4
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 09CABFA0
gn_type....... CHR
VNODE........... 09CABF70
v_flag.... 00000000 v_count... 00000000 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 09CABF7C v_vfsp.... 00000000
v_mvfsp... 00000000 v_gnode... 09CABFB0 v_next.... 00000000
v_vfsnext. 09CABE28 v_vfsprev. 00000000 v_pfsvnode 00000000
v_audit... 00000000
vnc subcommand
The vnc subcommand displays information about the vnode cache filesystem.
Format
Parameters
Item Description
slot Specifies the decimal identifier of a specific cache entry.
effectiveaddress Specifies the effective address of the entry.
When no parameters are provided, a summary of the entire vnode cache is displayed. If there are no
valid cache entries in memory, nothing is displayed.
Other
vcache
Examples
242 AIX Version 6.1: KDB kernel debugger and kdb command
8 F10010F0109A0118 F10010F0109A0150 0000000000000000 00000000
9 F10010F0109A0140 F10010F0109A0120 F10010F0109A0180 00000000
14 F10010F0109A0208 F10010F0109A0240 0000000000000000 00000000
15 F10010F0109A0230 F10010F0109A0210 F10010F0109A0270 00000000
20 F10010F0109A02F8 F10010F0109A0330 0000000000000000 00000000
21 F10010F0109A0320 F10010F0109A0300 F10010F0109A0360 00000000
26 F10010F0109A03E8 F10010F0109A0420 0000000000000000 00000000
27 F10010F0109A0410 F10010F0109A03F0 F10010F0109A0450 00000000
32 F10010F0109A04D8 F10010F0109A0510 0000000000000000 00000000
33 F10010F0109A0500 F10010F0109A04E0 F10010F0109A0540 00000000
38 F10010F0109A05C8 F10010F0109A0000 0000000000000000 00000000
39 F10010F0109A05F0 F10010F0109A0BD0 F10010F0121A0018 F10010F0
40 F10010F0109A0618 68E7612700000000 F10010F0121A0018 F10010F0
44 F10010F0109A06B8 F10010F0109A06F0 0000000000000000 00000000
45 F10010F0109A06E0 F10010F0109A06C0 F10010F0109A0720 00000000
50 F10010F0109A07A8 F10010F0109A07E0 0000000000000000 00000000
51 F10010F0109A07D0 F10010F0109A07B0 F10010F0109A0810 00000000
(0)> more (^C to quit) ? //Interrupted
(0)> vnc 1
VP DEV INO
hvnc subcommand
The hvnc subcommand displays information about the filesystem hash list for the vnode cache.
Format
Parameters
Item Description
slot Specifies the decimal identifier of a specific hash bucket.
effectiveaddress Specifies the effective address of the entry. Symbols, hexadecimal values, or hexadecimal expressions can be
used in specification of the address.
The hvnc command is used to display information about the vcache hash table. When no parameters are
provided, a summary of the entire hash list is displayed.
Other
hvcache
Examples
(0)> hvnc 1
HASH ENTRY( 1): F10010F0121A0000
VP DEV INO
vnode subcommand
The vnode subcommand displays virtual node (vnode) table entries.
Format
Parameters
244 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
slot Specifies the slot number of a virtual node table entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a virtual node table entry. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is entered, a summary is displayed with one line per table entry. Display detailed
information for individual vnode table entries by specifying the entry with either a slot number or an
address.
Other
vno
Examples
vfs subcommand
The vfs subcommand displays entries of the virtual file system table.
Format
Parameters
If no parameter is entered, a summary is displayed with one line for each entry. Display detailed
information by identifying the entry of interest with either a slot number or an address.
Other
mount
Examples
VFS_GFS.. gfs+000000
gfs_data. 00000000 gfs_flag. INIT VERSION4 VERSION42 VERSION421
gfs_ops.. jfs_vfsops gn_ops... jfs_vops gfs_name. jfs
gfs_init. jfs_init gfs_rinit jfs_rootinit gfs_type. JFS
gfs_hold. 00000013
VFS_MNTD.. 09D0BFA8
v_flag.... 00000001 v_count... 00000001 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 09D0BFB4 v_vfsp.... 056D18D8
v_mvfsp... 00000000 v_gnode... 09D0BFE8 v_next.... 00000000
246 AIX Version 6.1: KDB kernel debugger and kdb command
v_vfsnext. 00000000 v_vfsprev. 09D730A0 v_pfsvnode 00000000
v_audit... 00000000 v_flag.... ROOT
VFS_MNTDOVER.. 09D0B568
v_flag.... 00000000 v_count... 00000001 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 09D0B574 v_vfsp.... 056D183C
v_mvfsp... 056D18D8 v_gnode... 09D0B5A8 v_next.... 00000000
v_vfsnext. 09D0A230 v_vfsprev. 09D0C0F0 v_pfsvnode 00000000
v_audit... 00000000
VFS_VNODES LIST...
COUNT VFSGEN GNODE VFSP DATAPTR TYPE FLAGS
specnode subcommand
The specnode subcommand displays the special device node structure at the specified address.
Format
specnode address
Parameters
Item Description
address Specifies the effective address of a special device node structure. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Other
specno
Examples
The following is an example of how to use the specno alias for the specnode subcommand:
KDB(0)> file 108 //print file entry
ADDR COUNT OFFSET DATA TYPE FLAGS
SN_VNODE........ 32ABD1DC
v_flag.... 00000000 v_count... 00000018 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 32ABD1E8 v_vfsp.... 01FB4000
v_mvfsp... 00000000 v_gnode... 32843080 v_next.... 00000000
v_vfsnext. 00000000 v_vfsprev. 00000000 v_pfsvnode 14546080
v_audit... 00000000
SN_GNODE......... 32843080
gn_type....... 00000009 gn_flags...... 00000000 gn_seg........ 007FFFFF
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
(0)> more (^C to quit) ?
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 32ABD1DC gn_rdev....... 00040000 gn_ops........ spec_vnops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 328430B4
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 32843070
gn_type....... MPC
SN_PFSGNODE...... 145460C0
gn_type....... 00000004 gn_flags...... 00000000 gn_seg........ 00000000
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 14546080 gn_rdev....... 00040000 gn_ops........ jfs_vops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 145460F4
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 145460B0
gn_type....... CHR
KDB(0)>
devnode subcommand
The devnode subcommand displays device node table entries.
Format
Parameters
248 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
slot Specifies the slot number of a device node table entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a device node table entry. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is entered, a summary is displayed with one line per table entry. Display detailed
information for individual devnode table entries by specifying either a slot number or an address.
Other
devno
Examples
GNODE............ 0B221950
gn_type....... 00000003 gn_flags...... 00000000 gn_seg........ 007FFFFF
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000002 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 00000000 gn_rdev....... 00110000 gn_ops........ 00000000
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 0B221984
gn_reclk_event 00000000 gn_filocks.... 00000000 gn_data....... 0B221940
gn_type....... BLK
SPECNODES....... 00000000
fifonode subcommand
The fifonode subcommand displays fifo node table entries
Parameters
Item Description
slot Specifies the slot number of a fifo node table entry. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a fifo node table entry. Use symbols, hexadecimal values, or hexadecimal
expressions to specify the address.
If no parameter is entered, a summary with one line per entry is displayed. Display detailed information
for individual entries with either a slot number or an address.
Other
fifono
Examples
The following is an example of how to use the fifono alias for the fifonode subcommand:
(0)> fifono //print fifo node table
PFSGNODE SPECNODE SIZE RCNT WCNT TYPE FLAG
SPECNODE........ 0B2210D8
sn_next...... 00000000 sn_count..... 00000001 sn_lock...... 00000000
sn_gnode..... 0B2210E8 sn_pfsgnode.. 09D15EC8 sn_attr...... 00000000
sn_dev....... FFFFFFFF sn_chan...... 00000000 sn_vnode..... 056CE070
sn_ops....... 002751B0 sn_devnode... 056D1C08 sn_type...... FIFO
SN_VNODE........ 056CE070
v_flag.... 00000000 v_count... 00000002 v_vfsgen.. 00000000
v_lock.... 00000000 v_lock@... 056CE07C v_vfsp.... 01AC9810
v_mvfsp... 00000000 v_gnode... 0B2210E8 v_next.... 00000000
v_vfsnext. 00000000 v_vfsprev. 00000000 v_pfsvnode 09D15E88
v_audit... 00000000
SN_GNODE......... 0B2210E8
gn_type....... 00000008 gn_flags...... 00000000 gn_seg........ 007FFFFF
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
gn_vnode...... 056CE070 gn_rdev....... FFFFFFFF gn_ops........ fifo_vnops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 0B22111C
gn_reclk_event 00000000 gn_filocks.... 00000000 gn_data....... 0B2210D8
gn_type....... FIFO
SN_PFSGNODE...... 09D15EC8
gn_type....... 00000008 gn_flags...... 00000000 gn_seg........ 00000000
gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000000
gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000
250 AIX Version 6.1: KDB kernel debugger and kdb command
gn_vnode...... 09D15E88 gn_rdev....... 000A0005 gn_ops........ jfs_vops
gn_chan....... 00000000 gn_reclk_lock. 00000000 gn_reclk_lock@ 09D15EFC
gn_reclk_event FFFFFFFF gn_filocks.... 00000000 gn_data....... 09D15EB8
gn_type....... FIFO
hnode subcommand
The hnode subcommand displays hash node table entries.
Format
Parameters
Item Description
bucket Specifies the bucket number within the hash node table. This parameter must be a decimal value.
effectiveaddress Specifies the effective address of a bucket in the hash node table. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is entered, a summary that contains one line per hash bucket is displayed. Display the
entries for a specific bucket by specifying the bucket number or the address of the bucket.
Other
hno
Examples
The following is an example of how to use the hno alias for the hnode subcommand:
(0)> hno //print hash node table
BUCKET HEAD LOCK COUNT
Format
jfsnode [address]
Parameters
Item Description
address Specifies the address of a node allocated in the inode cache.
Note: The address parameter is useful only for nodes allocated in the inode cache. It is not useful for soft
mounts, specnodes, cdrnodes, or other non-jfs structures.
Other
jno
Examples
252 AIX Version 6.1: KDB kernel debugger and kdb command
Object (xnode) size is 0x230
vnode offset is 0x0
inode offset is 0x58
gnode offset is 0x78
(0)>
(0)> jno 0xF100009E18B63000
0xF100009E18B63000 is a vnode
INODE GNODE VNODE VFS FILESYSTEM
F100009E18B63058 F100009E18B63078 F100009E18B63000 0
(0)> jno 0xF100009E18B63005
0xF100009E18B63005 is an OFFSET into the vnode at 0xF100009E18B63000
INODE GNODE VNODE VFS FILESYSTEM
F100009E18B63058 F100009E18B63078 F100009E18B63000 0
(0)> jno 0x1
Address not in jfs inode cache: 0x1
(0)>
kfset subcommand
The kfset subcommand displays the kdm fset cache data structure.
Format
kfset address
Parameters
Item Description
address Identifies the address of the kdm fset cache data structure to display.
Other
kfs
Examples
Note: The kfset pointer is in the kdm vnode structure and may be
obtained from the output of the kvnode command, in the fset field:
Format
i2 [address | -c]
Parameters
Item Description
address Displays the JFS2 inode structure at the specified inode address.
-c Displays the inode cache table.
-d device Displays a list of inodes in the specified device.
-i inumber Displays the inode structure of the inode number specified.
-m count Displays a list of inodes with a minimum number of the open count specified.
The -d, -i, and -m flags can be mixed. For these three flags, when multiple inodes satisfy the criteria, only
summary information is displayed. If a single inode satisfies the criteria, detailed information is also
displayed.
When the i2 command is invoked without any parameters, a summary list of inodes in memory is
displayed along with the inodes' address, device, and inode number.
Other
inode2
Examples
254 AIX Version 6.1: KDB kernel debugger and kdb command
ipmnt........0x3252F080 ipimap.......0x32595080 pagerObject..0x31A6D000
event........0xFFFFFFFF fsevent......0xFFFFFFFF openevent....0xFFFFFFFF
cacheLst.nxt.0x317230B0 cacheLst.prv.0x317230B0 freeNext.....0x317230B0
hashLst.nxt..0x00000000 hashLst.prv..0x31BA1034 kdmvp........0x00000000
flag.........0x00000000
cflag........0x00000000
xlock........0x00000000
fsxlock......0x00000000
btorder......0x00000000
agstart......0x0000000000000000
lastCommittedSize...0x0000000000001000
tree subcommand
The tree subcommand displays either the Enhanced Journaled File System (JFS2) d-tree or x-tree structure
based on the specified inode parameter.
Format
tree address
Parameters
Item Description
address Specifies the address of an inode. If the address of the specified inode is a directory, the d-tree structure is
displayed. If the address of the specified inode is not a directory, the x-tree structure is displayed. This is a
required parameter.
Other
No aliases.
Examples
Leaf xads:
xad[2]
flag.........0x00
len..........1
addr1........0x00
addr2........0x00000028
off1.........0x00
off2.........0x00000000
offset.......0
address......40
Format
dtree address
Parameters
Item Description
address Specifies the address of the d-tree structure.
The dtree subcommand contains its own subcommands that allow the user to walk the d-tree.
Subcommand
Function
f Walks freelist entries.
s Displays the specified slot entry.
t Displays the formatted stbl structure.
u Visits the parent node (but not the parent directory).
c Visits the child node.
x Exits subcommand mode.
Other
dt
Examples
The following is an example of how to use the dt alias for the dtree subcommand:
KDB(0)> dt 0x325E1248
Internal D-tree page:
flag.........0x85
flag_name....BT_ROOT BT_INTERNAL
freecnt......7
Actual Free Count: 7
nextindex....1
freelist.....2
self.len.....0x010203
maxslot......0
stblindex....0
self.addr1...0x04
self.addr2...0x05060708
next.........0x2
prev.........0x0
xtree subcommand
The xtree subcommand displays the Enhanced Journaled File System (JFS2) xtree structure and allows the
user to walk the xtree structure.
256 AIX Version 6.1: KDB kernel debugger and kdb command
Format
xtree address
Parameters
Item Description
address Displays the x-tree at the address of the specified x-tree.
The dtree subcommand contains its own subcommands that allow the user to walk the x-tree structure.
Subcommand
Function
s Selects the xad entry to view.
u Visits the parent node.
c Visits the child node.
x Exits subcommand mode.
Other
xt
Examples
Leaf xads:
xad[2]
flag.........0x00
len..........1
addr1........0x00
addr2........0x00000028
off1.........0x00
off2.........0x00000000
offset.......0
address......40
pgobj subcommand
The pgobj subcommand displays the Enhanced Journaled File System (JFS2) pager object structure.
pgobj address
Parameters
Item Description
address Displays the pager object structure at the specified address.
Other
No aliases.
Examples
RBNA:
rbnaXoffset..0x0000000000000000 rbnaXlen..0x00000000
rbnaDelta.... 0x00 nRbnaXad..0xFFFFFFFF
wipXAD:
flag.........0x00000000
len..........0x00000000 addr1........0x00000000 addr2........0x00000000
off1.........0x00000000 off2.........0x00000000
offset.......0x0000000000000000 address......0x0000000000000000
pgbuf subcommand
The pgbuf subcommand displays the Enhanced Journaled File System (JFS2) pager buffer structure.
Format
pgbuf address | -c
Parameters
Item Description
address Displays the JFS2 pager buffer structure at the specified address.
-c Displays a list of the JFS2 pager buffers in the buffer cache.
Other
No aliases.
258 AIX Version 6.1: KDB kernel debugger and kdb command
Examples
Cache table:
CLASS BUFS FREE LRU CACHELIST.HEAD FREELIST.HEAD
0 3 1 0 3253F8DC 3253F090
1 3 1 0 32540214 3253F17C
2 3 0 0 3253F268 0
3 3 0 0 3253F354 0
4 3 0 0 3253F440 0
5 3 0 0 3253F52C 0
6 2 0 0 3253FE64 0
7 2 0 0 3253FF50 0
8 2 0 0 3253F7F0 0
KDB(0)>pgbuf 3253F8DC
xflag........0x0000000C BUFFER PAGE
nohomeok.....0x00000000
lid..........0x00000000
flags........0x00000011 METADATA IODONE
count................0x00000000 cacheClass...........0x00000000
data.........0xD004C000 syncList.nxt.0x00000000 syncList.prv.0x00000000
logx.........0x00000000 ip...........0x32595080 pagerObject..0x325A7000
pageList.nxt.0x00000000 pageList.prv.0x3253FA08 hashList.nxt.0x00000000
hashList.prv.0x31C10460 cacheLst.nxt.0x32540128 cacheLst.prv.0x31A70010
ioListNext...0x32540128 freeList.nxt.0x32540128 freeList.prv.0x31A70010
ioNext.......0x00000000 iobp.........0x3253F884 ioWait.......0xFFFFFFFF
waitList.....0xFFFFFFFF
lsn..........0x0000000000000000 clsn.........0x0000000000000000
xoffset......0x0000000000000000 pxd..........0x000000000000001E
KDB(0)>
txblock subcommand
The txblock subcommand displays the Enhanced Journaled File System (JFS2) transaction block structure.
Format
txblock address
Parameters
Item Description
address Displays the transaction block at the specified address.
Other
txblk
txblocki subcommand
The txblocki subcommand displays the Enhanced Journaled File System (JFS2) transaction block.
Format
txblocki index
Parameters
Item Description
index Displays the transaction block at the specified index.
Other
txblki
Examples
txlock subcommand
The txlock subcommand displays the Enhanced Journaled File System (JFS2) transaction lock structure.
Format
txlock address
Parameters
260 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
address Displays the transaction lock structure at the specified address.
Other
txlck
Examples
The following is an example of how to use the txlock subcommand:
KDB(3)> txlock 2FF3ABA8
tid..........0x00000003
flag.........0x00008801 PAGELOCK LOG LOCAL
next.........0x2FF3AB60 ip...........0x32573B00
bp...........0x325411C0 lock.........0x00000000
type.........0x00008002 GROW ENTRY INODE
lv[0].offset.0x00000040 lv[0].length.0x00000008
next.........0x00000000
KDB(3)>
bmblock subcommand
The bmblock subcommand displays the Enhanced Journaled File System (JFS2) metadata block and tries
to lookup the hash value for a particular block and see if it exists in the cache.
Format
Parameters
Item Description
ipAddr Specifies the address of an inode.
xoff Specifies the offset.
block, page, raw Specifies the page buffer type. One of these values must be provided.
Other
bmb, bmblk
Examples
The following is an example of how to use the bmb alias for the bmblock subcommand:
(0)> bmb 0xF10010F00F655C80 1C72F block
Hashclass @ F10010F00F4957D0
Pager buffer @ F10010F00F73C128
xflag........0x0000000A BUFFER BLOCK
nohomeok.....0x00000000
lid..........0x0000000000000000
flags........0x00020011 METADATA IODONE HIT
count................0x00000000 cacheClass...........0x00000002
data.........0xF10010A11006E000 logx.........0x0000000000000000
syncList.nxt.0x0000000000000000 syncList.prv.0x0000000000000000
ip...........0xF10010F00F655C80 pagerObject..0xF10010F00F2BB0C8
jfs2node subcommand
The jfs2node subcommand displays the Enhanced Journaled File System (JFS2) xnode structures.
Format
jfs2node address
Parameters
Item Description
address Specifies an address at which to check whether that address is a valid JFS2 xnode structure or an offset into
one. If there is a valid xnode or offset, the jfs2node subcommand displays the relevant structure. This is a
required parameter.
Other
j2no
Examples
The following is an example of how to use the j2no alias for the jfs2node subcommand:
(0)> j2no 0x1
0x1 is not a valid JFS2 xnode address.
(0)> i2
ADDRESS DEVICE I_NUM IPMNT COUNT TYPE FLAG
369F9080 00220001 1 369C9080 00001 NON
369C9080 00220001 mounted 369C9080 00001 NON
36A1F080 00220002 0 00000000 00001 NON
36A43080 00220001 2 369C9080 00001 VDIR
36A0C080 00220001 2 369C9080 00001 NON
36A30080 00220001 16 369C9080 00001 NON
(0)> j2no 36A1F080
0x36A1F080 is an inode:
262 AIX Version 6.1: KDB kernel debugger and kdb command
agstart......0x0000000000000000
lastCommittedSize...0x0000000000000000
.
.
.
j2logbuf subcommand
The j2logbuf displays the Enhanced Journaled File System (JFS2) log buffer structure.
Format
j2logbuf address
Parameters
Item Description
address Displays the JFS2 log buffer at the specified address.
Other
No aliases.
Examples
j2logx subcommand
The j2logx subcommand displays the logx structure.
j2logx [address]
Parameters
Item Description
address Displays the logx structure at the specified address.
Other
No aliases.
Examples
j2log subcommand
The j2log subcommand displays the log-t structure.
Format
j2log address
Parameters
Item Description
address Specifies a valid address for the log-t structure.
Other
No aliases.
Examples
264 AIX Version 6.1: KDB kernel debugger and kdb command
size.........0x00002000 bsize........0x00000000
pbsize.......0x00000000 l2bsize......0x0000 l2pbsize.....0x0009
logTid.......0x000007D0 lspn.........0x0000000000001246
pn...........0x00001246 eor..........0x00000378 cflag........0x00000000
gcrtc........0x00000000 syncState....0x00000000 nextsync.....0x001FFFF0
active.......0x00000000 syncBarrier..0x00000000 syncTid......0x00000004
after wInode, start at 0x005A70F8
bp...........0x31D6F5C4 dev..........0x000A000A
devfp........0x100038A0 logx.........0x31D6C000
logList.nxt..0x00000000 logList.prv..0x00806F7C
rdwrLock.....0x00000000 logLock......0x00000000
CMQ.head.....0x00000000 CMQ.tail.....0x00000000
gclrt........0x324F30B0 gcLock.......0x00000000
syncWait.....0x00000000 nTxLog.......0x00000000
KDB(0)>
pile subcommand
The pile subcommand displays information about pile data structures.
Format
pile [address]
Parameters
Item Description
address Specifies the memory address of the pile structure.
Other
No aliases.
Examples
name........NLC64
prev........0x32BAEA80 next........0x3004B400
ID..........0x50494C45 objectsize..0x0044 align.......0x0003
slabsize....0x0004 intpri......0x000B flags.......0x00000000
maxtotalpg..0xFFFFFFFFFFFFFFFF mintotalpg..0x0000000000000000
curtotalpg..0x0000000000000004
slab_full...0x3004B3A8 squeezed....0x0000 full........0x0000
slab_part...0x32D4D000 partial.....0x0001 empty.......0x0000
slab_dead...0x0 dead........0x0000
pile_lock...0x00000000 alloc_lock..0x00000000
heap........0x300000B8
HANDLERS:
cookie......0x00000000 reconfig....0x00000000
init........0x00000000 free........0x00000000
KDB(0)>
slab subcommand
The slab subcommand displays the slab structure at the specified address.
Format
slab address
Parameters
Item Description
address Specifies the memory address for which you want to display the slab structure. The address parameter is
required.
The slab command performs some basic error checking on the data structure. If the slab subcommand
finds an invalid slab ID, a warning message is generated. If the pile to which the slab belongs has an
invalid ID, a warning message is generated.
Other
No aliases.
Examples
KDB(0)>
266 AIX Version 6.1: KDB kernel debugger and kdb command
cupboard subcommand
The cupboard subcommand displays either a list of the current KRPC server cupboards in use or
displays the contents of a single KRPC server cupboard structure.
Format
cupboard [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of a cupboard structure to display. If this parameter is omitted, a list of the
current KRPC server cupboards is displayed.
Other
No aliases.
Examples
Service Handles:
Address Sockpint
32D4BD00 3286BE00 Master UDP handle - receiving on port 32769
3285D100 3286BE00 Master UDP handle - receiving on port 32788
Manager Section:
cb_mgrlock...... 00000000 cb_event........ FFFFFFFF
cb_all_stop..... FALSE cb_wrap......... FALSE
cb_start_thread. FALSE
cb_mgr_thread... 00004D9F cb_mon_thread... 0000429F
cb_svc_thread... 00004B9D cb_ogre_thread.. 00004EA1
cb_xprt......... 32D4BD00 cb_free_xprt.... 32D4B800
cb_next......... 00000000 cb_name......... rpc.lockd
Count Section:
cb_maxthreads. 00000020 cb_threads. 00000005
cb_active..... 00000000 cb_ideal.... 00000001
cb_idle1...... 00050000 cb_idle5.... 00050000
cb_idle15..... 0004FC08 cb_reserve.. 00000000
cb_threads1... 00050000 cb_threads5. 00050000
cb_threads15.. 0004FC08
Sockcup Section:
cb_sclock....... 00000000 cb_scfree........... 32BE2780
cb_scfirst...... 00000000 cb_sclast........... 00000000
cb_num_sockcups. 000005DC cb_queued_sockcups.. 00000000
cb_queued1...... 00000000 cb_ququqed5......... 00000000
cb_queued15..... 0000013B
Queued Sockcups:
None
KDB(0)>
sockpint subcommand
The sockpint subcommand displays the contents of a KRPC server sockpint structure.
Format
sockpint effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address of the sockpint structure to display.
Other
No aliases.
Examples
sockcup subcommand
The sockcup subcommand displays the contents of a KRPC server sockcup structure.
Format
sockcup effectiveaddress
Parameters
268 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
effectiveaddress Specifies the effective address of the sockcup structure to display.
Other
No aliases.
Examples
The following is an example of how to use the sockcup subcommand:
KDB(0)> sockcup 3D32532
SOCKCUP............ 003D32532
Next.. 0194387B Mbuf.. 12F05400 Sockpint.. 20363AF8
KDB(0)>
svcxprt subcommand
The svcxprt subcommand displays the contents of a KRPC server svcxprt structure.
Format
svcxprt effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address of the svcxprt structure to display.
Other
No aliases.
Examples
Time subcommands
The subcommands in this category are used to determine the elapsed time from the previous use of the
KDB kernel debugger, and to determine Timer Request Block (TRB) information.
Note: The time subcommand is only available in the KDB kernel debugger. It is not included in the kdb
command.
Format
time
Parameters
No parameters.
Other
No aliases.
Examples
270 AIX Version 6.1: KDB kernel debugger and kdb command
Breakpoint
0024FDE8 stwu stkp,FFFFFFB0(stkp) stkp=2FF3B3C0,FFFFFFB0(stkp)=2FF3B370
KDB(0)> time //Report time from leaving the debugger till the break
Command: time Aliases:
Elapsed time since last leaving the debugger:
2 seconds and 121211136 nanoseconds.
KDB(0)>
trb subcommand
The trb subcommand displays Timer Request Block (TRB) information.
Format
Parameters
Item Description
* Displays Timer Request Block (TRB) information for TRBs on all processors. Summary information is
displayed for some options. To see detailed information, select a specific processor and option.
cpu x Is the text cpu followed by the processor number. It displays TRB information for the specified processor.
Note: The characters cpu must be included in the input. The value x is the hexadecimal number of the
processor.
option Specifies the option number that indicates the data to be displayed. The available option numbers can be
viewed by entering the trb subcommand with no arguments.
If this subcommand is entered without parameters, a menu displays that allows you to select the data
you want to display.
Other
timer
Examples
trace subcommand
The trace subcommand displays data in the system trace buffers.
272 AIX Version 6.1: KDB kernel debugger and kdb command
Format
Flags
Item Description
-c channel Selects the trace channel for which the contents are to be monitored. The value for channel must be a
decimal constant in the range 0 to 7. If no channel is specified, a prompt is displayed.
-h Displays trace headers.
-j event_list Specifies user-defined events for which you want to collect trace data. You must separate multiple hook IDs
with blank spaces. For AIX 6.1 and later releases, entering a 2-digit hook ID of the form hh specifies
hh00,hh10,...,hhF0. Entering a 3-digit hook ID of the form hhh specifies hhh0. Entering a 4-digit hook ID
of the form hhhh specifies hhhh.
-k event_list Specifies user-defined events for which you want to exclude trace data. You must separate multiple hook
IDs with blank spaces. For AIX 6.1 and later releases, entering a 2-digit hook ID of the form hh specifies
hh00,hh10,...,hhF0. Entering a 3-digit hook ID of the form hhh specifies hhh0. Entering a 4-digit hook ID
of the form hhhh specifies hhhh
-t TID Specifies thread ID filter. A thread is identified by its thread ID in hex format. When the trace command is
used to display buffer contents, this parameter is used to display only events related to the specified
thread. Otherwise, this parameter is not valid. This parameter can be used when both system and KDB
kernel debugger trace buffers are displayed.
-v Displays events using a verbose output format. This parameter can be used when both system and KDB
kernel debugger trace buffers are displayed.
Parameters
Item Description
data Selects only those trace entries with the specified data word. For instance, specifying #AA displays all trace
entries where at least one data word is recorded as 0xAA.
hook Specifies user-defined events for which you want to collect trace data. You must separate multiple hook IDs
with blank spaces. For AIX 6.1 and later releases, entering a 2-digit hook ID of the form hh specifies hh00,
hh10,...,hhF0. Entering a 3-digit hook ID of the form hhh specifies hhh0. Entering a 4-digit hook ID of the
form hhhh specifies hhhh.
:subhook Specifies subhooks, if needed. The subhooks are specified as hexadecimal values.
Note: If subhooks are used, the complete syntax must include both the hook and subhook IDs as a pair
separated by a colon. For example, assume the trace hook is 1d1 and the subhook is 2d. The hook
specification would look like 1d1:2d. Separate multiple hook and subhook pairs with a space.
To display the user-initiated system trace buffers, specify the channel (-c). Data is entered into the system
trace buffers using the trace shell subcommand. If the shell subcommand was not invoked prior to using
the trace subcommand, the system trace buffers are empty. When buffered entries are displayed, they are
shown in reverse order (most recent first).
The default trace entry output format is a simplified and short view of the trace record. To view trace
entries in a more verbose format, use the -v parameter.
The trace subcommand is not meant to replace the shell trcrpt subcommand in Technical Reference: Base
Operating System and Extensions, Volume 2, which formats the data in more detail. The trace subcommand
is a facility for viewing system trace data from KDB kernel debugger or kdb command on a dump. The
trcdead and trcrpt shell subcommands are useful in working with trace buffers contained in a system
dump.
Other
No aliases.
The following example dumps the event buffer on channel 2, related to Thread ID 14539 for an active
system trace (the trace is not initiated by KDB kernel debugger):
KDB(0)> trace -c 2 -t 14539
mtrace subcommand
The mtrace subcommand displays information about the Lightweight Memory Trace (LMT).
Format
mtrace [ -C [ CPU_list | all ] [ -d addr [, size ] ] ] [-t TID ] [ -j Event [, Event ] ] [ -v ] [ rare | common |
all ]
Parameters
Item Description
-C [ CPU_list | all ] Specifies the logical IDs of processors in decimal format. The CPU_list parameter is a
comma-separated list of logical processor IDs. The keyword all is used to identify all active
processors. If the mtrace command requires specified processors and none is provided, -C all is
assumed.
-d addr [, size ] Specifies the memory trace buffer address and size.
-t TID Specifies a thread ID filter. A thread is identified by its thread ID in hexadecimal format. When
the mtrace command is used to display buffer contents, this parameter is used to display only
LMT events related to the specified thread. Otherwise, this parameter is not valid.
-j Event [, Event ] Specifies a hook ID filter. Identify a hook by its hook ID in hexadecimal format. When you use
the mtrace subcommand to display buffer contents, this parameter displays events for the hook
IDs that you specify. If you use this parameter, you must specify at least one event ID. You can
specify a maximum of 128 hooks. You can specify hook IDs as either three or four hexadecimal
digits. Specifying three hexadecimal digits indicates a hook ID of the form 0xhhh0. Specifying
four hexadecimal digits indicates a hook ID of the form 0xhhhh.
-v Displays events using a verbose output format. This option is only valid when the mtrace
command is used to display buffer contents.
rare | common | all Specifies the buffer types to be displayed.
If LMT is in disabled mode, only general LMT information can be displayed. If the kdb command is
invoked on a live kernel, trace events in buffers cannot be displayed.
If no options are specified, the mtrace command displays general information about LMT (the contents of
the mtrc structure).
If the -C parameter is specified with a single processor and no buffer type, information for the common
and rare buffer types on the specified processor is provided.
If the -C parameter is specified with one or more processors and a buffer type, trace events recorded in
the specified buffer of the specified processors are displayed, with the most recent events displayed first.
If the -d parameter is specified, trace events recorded in the buffer at the specified address and of the
specified size are displayed. Use the -d parameter to display memory trace events saved in the
dmp_minimal area of a system dump.
The default trace entry output format is a simplified and short view of the trace record. To view trace
entries in a more verbose format, use the -v parameter.
274 AIX Version 6.1: KDB kernel debugger and kdb command
Other
mtrc
Examples
The following example displays memory trace buffer information for processor 0 using the alias mtrc
subcommand:
KDB(0)> mtrc -C 0
MTRC [COM] @ F10008000FF99040
mtq_start... F100011870000000
mtq_size.... 0000000000098000
mtq_inptr... F100011870064090
The following example displays the trace event buffer for processor 0 in a verbose output format using
the alias mtrc subcommand:
KDB(0)> mtrc -C 0 common -v
Display content of buffer: mtrcq @ F10008000FF99040
Current entry at @ F100011870064088
Hook ID: KERN_SLIH (00000102) Hook Type:
ThreadIdent: 00000205
Subhook ID/HookData: 0000
Data Length: 0008 bytes
D0: 0000000003EC2050 ................
The following example merges and displays all entries using the alias mtrc subcommand:
KDB(0)> mtrc all
The following example displays events in both the common and rare buffer types on processor 0 and 3
with thread ID 1893 and hook 0x100, 0x200 and 0x3B7 using the alias mtrc subcommand:
KDB(0)> mtrc -C 0,3 -t 1893 -j 100,200,3B7 all
Restriction: This subcommand is only available within the kdb command. You can use this subcommand
only when analyzing a dump file. The subcommand does not display any information when you use the
kdb command on a live system. The cdt subcommand is not included in the KDB kernel debugger.
Format
Parameters
Item Description
-a Displays a list of entries containing the address addr.
-d Indicates that the dump routines in the /usr/lib/ras/dmprtns directory are used to display data from the
component-dump table specified by the index parameter. If you specify the -d parameter, any
dump-formatting routines for the component that the index parameter specifies are invoked to format the
data in the component-dump table.
-f Specifies the cdt command to display CDT data of the firmware-assisted dump specific CDTs.
-p Requests that a list of paged-in-memory regions is displayed from the specified component-dump table or
entry. If you specify the -p flag, a more detailed list showing the paged-in-memory regions within each
entry is displayed.
addr Indicates the address from which to start displaying an entry's data. If you do not specify this parameter,
the data display starts at the beginning of the entry. This must be a hexadecimal value or a symbolic name.
count Indicates the total number of words to display when you view an entry's data. The number can range
between 0 and 4294967296. If you do not specify this parameter, all of the entry's data starting at the
address addr is displayed. This must be a decimal value.
entry Indicates the data area of the indicated component to be viewed. This must be a decimal value.
index Indicates the component-dump table to be viewed. This must be a decimal value.
With no parameters, a list of all component-dump tables is displayed. If index is specified, the list of
entries belonging to the specified component-dump table is displayed.
If you specify the -a parameter, the kdb command searches all of the entries in the dump, and displays a
list of entries that include the address that you specify. If you use the -p and -a parameters together, the
kdb command lists only those paged-in-memory regions in the dump file that includes the address that
you specify.
If you specify both the index and entry parameters without any other parameters, the raw data for the
indicated entry is displayed in both hexadecimal and ASCII. You can use the optional addr and count
parameters to control how much of the entry's data is displayed. If neither of these parameters are
specified, all of that entry's raw data is displayed.
Other
No aliases.
276 AIX Version 6.1: KDB kernel debugger and kdb command
Examples
errpt subcommand
The errpt subcommand displays system error log entries that were not processed by the error daemon.
The entries are displayed in ascending chronological order with the oldest first.
In the example below, the machine check information starts with Machine Check - RTAS log Version 6
Details, up to the beginning of the hexadecimal dump of the detailed data.
Format
errpt
Parameters
No parameters.
Other
No aliases.
Examples
Error Record:
erec_flags .............. 0
erec_len ................ 40
erec_timestamp .......... 4034EA04
erec_rec_len ............ 20
erec_dupcount ........... 0
erec_duptime1 ........... 0
erec_duptime2 ........... 0
erec_rec.error_id ....... 2BFA76F6
erec_rec.resource_name .. SYSPROC
00000000 00000000 00000000 ............
Error Record:
erec_flags .............. 1
erec_len ................ 834
erec_timestamp .......... 47A9A026
erec_rec_len ............ 810
erec_cid ................ 0
erec_dupcount ........... 0
erec_duptime1 ........... 0
erec_duptime2 ........... 0
erec_rec.error_id ....... 56CDC3C8 MACHINE_CHECK_CHRP
erec_rec.resource_name .. sysplanar0
278 AIX Version 6.1: KDB kernel debugger and kdb command
08 F201800008000000 4000820000000500
09 F201800008000000 4000820000000500
check subcommand
The check subcommand runs consistency checkers on kernel data structures.
Format
check
check ? | -?
check -h CheckerName
Parameters
Item Description
CheckerName Specifies the name of the checker to run. Run the check command with no parameters to display the list of
known checkers.
SuffixName Specifies which of the suffixes of the given checker to run. Run the check command with the -h parameter
to display the list of known suffixes for a given checker.
Effective Address Specifies the effective address of the element to be validated or the effective address of the first element to
be validated for lists. Symbols, hexadecimal values, or hexadecimal expressions can be used to specify the
effective address.
-e Specifies that only one element should be checked. This is equivalent to -n 1. An effective address must be
specified if the -e parameter is specified.
-h Displays help for each suffix of the specified checker.
-l level Specifies the checking level the checker should use. This is a decimal value between 0 and 9. A value of 9
specifies the most detailed checking level and a value of 0 specifies no checking. The default value is 3
(light level) unless the -e flag is specified, in which case the default value is 7 (detailed level).
-n count Specifies the number of elements (count is a decimal value) to validate.
-v Specifies that the checker should run in verbose mode and display additional information if the checker
supports this option.
Other
No aliases.
ctctrl subcommand
The ctctrl subcommand displays information related to Component Trace (CT).
Format
Parameters
280 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-c component name Specifies a component by name.
-l alias name Specifies a component by alias.
-r Applies the query recursively to all children components.
-D Displays component trace buffer events of a specified component.
-j Event [, Event] Specifies a hook ID filter. A hook is identified by its hook ID in hexadecimal format. When the ctctrl
subcommand is used to display buffer contents, this parameter displays events for the specified hook IDs.
You must specify at least one event when you use the -j parameter. You can specify a maximum of 128
hooks. You can specify hook IDs as either three or four hexadecimal digits. Specifying three hexadecimal
digits indicates a hook ID of the form 0xhhh0. Specifying four hexadecimal digits indicates a hook ID of the
form 0xhhhh.
-t tid Thread ID filter. A thread is identified by its thread ID in hexadecimal format. When the ctctrl command is
used to display buffer contents, this parameter is used to display only events related to the specified
thread. Otherwise, this parameter is not valid.
-v Displays events using a verbose output format. This option is only valid when displaying trace events of a
specified component.
By default, without any parameters, ctctrl displays the settings of the base components. Specific
components can be specified with the -l parameter or the -c parameter. To display the trace entries, use
the -D parameter. The format used is the same as that of the trace command.
The default trace entry output format is a simplified and short view of the trace record. To view trace
entries in a more verbose format, use the -v parameter.
The display of trace entries are not supported in the kdb command on a live system because of
synchronization problems (buffers continue to be filled when being read, buffer resize operation can
occur, and so on). The kdb command can display trace entries when working on a dump. Moreover, in
user space, the memory buffers can be read and examined with the ctctrl command or the trcrpt
command.
Other
No aliases.
Examples
The following example displays the events in the net.route component with hook ID 0x617.
KDB(0)> ctctrl -D -c net.route -j 617
The following is the output of a ctctrl command with no arguments. The parameter information of all of
the active base components is displayed:
(0)> ctctrl
The following example displays the parameter information about the socket component and all of its
subcomponents:
(0)> ctctrl -c socket -r
trc subcommand
The trc subcommand is used to merge multiple Component Trace (CT) and Lightweight Memory Trace
(LMT) buffers in the KDB Kernel Debugger.
Format
trc { -c component[+] | -l component alias[+] | -m {rare | common | all }} [ -C cpu0,... ] [ -t TID ] [ -j { hook
ID, ... | hook:subhook } ] [ -s tb0 ] [ -e tb1 ] [ -v ]
trc all [-C cpu0,... ] [ -t TID ] [ -j { hook ID, ... | hook:subhook } ] [ -s tb0 ] [ -e tb1 ] [-v ]
Parameters
282 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-c component[+] Specify a RAS component by path name. Can optionally include all sub-components of this
component by appending the '+' symbol after the path name. Multiple -c parameters are
allowed. Multiple components can be specified with a single -c flag, provided that they are
comma-separated.
-l component alias[+] Specify a RAS component by alias name. Can optionally include all sub-components of this
component by appending the '+' symbol after the path name. Multiple -l parameters are
allowed. Multiple aliases can be specified with a single -l flag, provided that they are
comma-separated.
-m { rare | common | all } Specify an LMT buffer type.
all Merge all LMT and CT buffers in the system.
-C cpu0,... Restrict trace entries displayed to those that have occurred on the specified processors. If -C
is not specified, trace entries from all processors are included.
-t TID Restrict trace entries displayed to those that have the specified thread ID.
-j { hook ID, ... | hook:subhook } Restrict trace entries displayed to those that have the specified hook ID(s) or to those that
have specified the hook and subhook ID.
-s tb0 Restrict trace entries displayed to those that have a time base after what is specified.
-e tb1 Restrict trace entries displayed to those that have a time base before what is specified.
-v Display more descriptive information about trace data.
The trc subcommand can be used to merge multiple CT buffers and multiple LMT buffers. CT buffers can
be specified with component path name or component alias name. Components can also be specified
recursively from another component. LMT buffers can be limited to only rare or common buffers or not
limited at all. Traces can be filtered with any of the following: processor, ID, ThreadID, multiple hook
IDs, a specific hook and subhook, start time and end time. A verbose view is also available for extra trace
information. You can also specify to merge all CT and LMT buffers together with the trc all syntax. A
maximum of 512 CT buffers can be merged with any number of LMT buffers.
If a component is specified without recursion (the + flag) and is not trace aware, the component will not
be included and a warning will be printed. If a component is trace aware but has an empty buffer, it will
not be included and a warning will be printed. If the number of CT components specified exceeds the
maximum limit, only those under the limit will be merged.
Other
No aliases.
Examples
1. To combine all vmm and livedump Component Trace buffers with LMT common buffer data and
restrict output to processor 2 and processor 4, type the following:
trc –c vmm+ -l livedump –m common –C 2,4
2. To extract all vmm Component Trace data with LMT rare buffers for hook 100 and 200, TID 0x1003,
start timestamp 0x3ABCDEF00, and end timestamp 0x3FEDCBA00, type the following:
trc –c vmm+ -m rare –j 100,200 –t 1003 –s 3ABCDEF00 –e 3FEDCBA00
3. To extract all livedump Component Trace data with hook id 0x5CB and subhook 0x25, type the
following:
trc –l livedump –j 5CB:25
Related Information:
ctctrl subcommand
mtrace subcommand
errlg subcommand
Shows error-logging control information for partitions.
Format
errlg
errlg -g
errlg -w id
errlg -n name
errlg -a address
Flags
Using the errlg subcommand with no parameters shows error-logging control information for all
partitions.
Item Description
-a address Shows the error-logging control information at the specified address.
-g Shows the global error-logging control information.
-n name Shows the error-logging control information for the named partition.
-w id Shows the error-logging control information for the specified kernel partition ID.
ldmp subcommand
The ldmp subcommand displays live dump information.
Format
ldmp -g
ldmp -D address
ldmp -C address
ldmp -e
ldmp -E
Flags
284 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-c Specifies the component by name.
-C Displays live dump component at the address address.
-d Displays active live dump information.
-D Displays live dump at the address address.
-e Displays pre-capture dump elimination information.
-E Displays post-capture dump information.
-g Displays global live dump information.
-H Displays held dump information.
-l Specifies the component by alias.
-r Applies the query recursively to all children components.
-v Applies the verbose mode.
Other
No aliases.
Examples
1. To display global live dump information, enter:
KDB(0)> ldmp -g
ldmp_bulklock.......... 0000000000000000
ldmp_stglock........... 0000000000000000
ldmp_heaptid........... 0000000000000000
ldmp_heaps[0].lh_hcur 0000000000000000
ldmp_heaps[0].lh_free 0000000000000000
ldmp_heaps[0].lh_heap 700DFEED00004153
ldmp_heaps[0].lh_hsz 0000000000000000
ldmp_heaps[1].lh_hcur 000000000000E450
ldmp_heaps[1].lh_free F10000027000CC90
ldmp_heaps[1].lh_heap F100000270000000
ldmp_heaps[1].lh_hsz 0000000001000000
ldmp_heapid............ 1
ldmp_ihsz.............. 0000000000000000
ldmp_dflt_ihsz......... 0000000004000000
ldmp_disable_timeout... 20
ldmp_freezetime........ 100
ldmp_compress.......... 4
ldmp_threshold......... 25
ldmp_infotime.......... 300
ldmp_pretime........... 0000000000015180
ldmp_lock.............. 0000000000000000
ldmp_cb................ F100000270FFFC40
ldmp_parmlock.......... 0000000000000000
ldmp_predump........... 700DFEED00004153
ldmp_heldlock.......... 0000000000000000
ldmp_held.............. 700DFEED00004153
ldmp_proctid........... 0000000000036097
ldmp_qlock............. 0000000000000000
ldmp_ldmp_qhd.head..... 0000000000000000
ldmp_ldmp_qhd.last..... 0000000003E52CC0
ldmp_preheap.lh_hcur... 0000000000000000
ldmp_preheap.lh_free... F100000070000000
ldmp_preheap.lh_heap... F100000070000000
ldmp_preheap.lh_hsz.... 0000000000010000
ldmp_pre list.......... 700DFEED00004153
ldmp_dir............... F10001001162BE80: /var/adm/ras/livedump
ldmp_pin_stk........... F100000050000000
2. To show the live dump settings for a component, enter:
KDB(0)> ldmp -c scsidiskdd
286 AIX Version 6.1: KDB kernel debugger and kdb command
dcb_blkoutbuf..........@700DFEED00004153
dcb_compblk............@700DFEED00004153
dcb_dir................@700DFEED00004153:
dcb_errbuf errbufofst..........@F100000270FFF140 0000000000000000:
dcb_kext_str size=0x1C contents: empty
dcb_pre.................@0000000000000000
Dump component at F100000270FFFE90
lcmp_eyec................ 6C636F6D70524153: (EYEC_LCMP)
lcmp_next................ F100000270FFEFD0
lcmp_prev................ 700DFEED70524153
lcmp_comp................ F100010010161E00
lcmp_flags............... 9000000000002000:
PNAM PREPD FINISH
lcmp_lvl................. 3
lcmp_estimate............ 0000000000000428
lcmp_cidflags............ 0000000000020004
lcmp_cidtype............. 0000000053544449
lcmp_pname............... scsidiskdd
lcmp_plen................ 0000000000000000
lcmp_parms...............
(0)> more (^C to quit) ?
lcmp_table.............. @F100010010161D00
lcmp_wk................. @F100000270FFFF00
Dump component at F100000270FFEFD0
... (for each component)
dcb_dmphdr.............@F100000270FFFE30
ldh_eyec............... 6C64686472524153: (EYEC_LDH)
ldh_passes............. 1
ldh_type............... 0x800000A0: SER MULTIPASS SYNC FORCE INTMAX
ldh_prio............... 0x7: CRITICAL
ldh_errcode............ 0000000000000000
ldh_time............... 0000000046C99B55
ldh_strings_len........ 10
prefix:
recov:
func:
symp: symp
fcomp:
title:
dmptrc subcommand
The dmptrc subcommand displays dump-time-trace information. This command is only useful for
debugging the AIX system dump.
Format
dmptrc
Flags
No flags.
Other
No aliases.
Lock subcommands
The subcommands in this category can be used to display information about locks and to check the
system for deadlocks.
Note: The dlk subcommand is only available with the 64-bit kernel.
Format
lk [ 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.
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
288 AIX Version 6.1: KDB kernel debugger and kdb command
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
dla subcommand
The dla subcommand checks the system for deadlocks and displays details about threads waiting for
locks.
Note: The dla subcommand is only available with the kdb command.
Format
Parameters
If no arguments are given, the dla subcommand analyzes the system for deadlocks. The dla subcommand
also shows details on any thread waiting for a lock.
Other
No aliases.
Examples
No deadlock, but chain from tid 42C5, that waits for the first line lock,
owned by Owner-Id that waits for the next line lock, and so on ...
LOCK NAME | ADDRESS | OWNER-ID | LOCK STATUS | WAITING FUNC
ptrace_lock | 0x00000000006E9898 | Tid 1B37 | 0x20000000 | slock_ppc
No deadlock, but chain from tid 53AF, that waits for the first line lock,
owned by Owner-Id that waits for the next line lock, and so on ...
LOCK NAME | ADDRESS | OWNER-ID | LOCK STATUS | WAITING FUNC
ptrace_lock | 0x00000000006E9898 | Tid 1B37 | 0x20000000 | slock_ppc
No deadlock found
(0)> dla 42C5
No deadlock, but chain from tid 42C5, that waits for the first line lock,
owned by Owner-Id that waits for the next line lock, and so on ...
LOCK NAME | ADDRESS | OWNER-ID | LOCK STATUS | WAITING FUNC
ptrace_lock | 0x00000000006E9898 | Tid 1B37 | 0x20000000 | slock_ppc
No locks waited on for thread EA002100
(0)> dla -p 0
No locks being waited on for processor 0
(0)> dla -p
No deadlock found
Network subcommands
The subcommands in this category are used to print network information.
ifnet subcommand
The ifnet subcommand prints network interface information.
Format
Parameters
290 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
slot Specifies the slot number within the ifnet table for which data is to be displayed. This value must be a
decimal number.
effectiveaddress Specifies the effective address of an ifnet entry to display.
If no parameter is specified, information is displayed for each entry in the ifnet table. Display data for
individual entries by specifying either a slot number or by specifying the address of the entry.
Other
No aliases.
Examples
KDB(0)>
tcb subcommand
The tcb subcommand displays the inpcb structure for TCP connections.
Parameters
Item Description
-s Displays a one line summary of every tcb entry.
-b index Specifies the bucket number within the tcb hash table. All tcb entries in this bucket are displayed in detail.
The -b indicates that the number that follows is a bucket number and not an effective address.
effectiveaddress Specifies the effective address of a tcb entry to display in detail.
If no parameters are specified, detailed information is displayed for all entries in the tcb table. A
summary of all entries or detailed information for a specific entry can be displayed with the appropriate
parameters.
Other
No aliases.
Examples
The following is an example of how to use the tcb subcommand:
KDB(0)> tcb -s
SLOT 13 TCB --------- INPCB INFO ----(@ F100061000BF5A58)----
SLOT 21 TCB --------- INPCB INFO ----(@ F100061000BF7258)----
SLOT 23 TCB --------- INPCB INFO ----(@ F100061000BF7A58)----
SLOT 25 TCB --------- INPCB INFO ----(@ F1000610004C0A58)----
SLOT 37 TCB --------- INPCB INFO ----(@ F100061000BF2258)----
SLOT 111 TCB --------- INPCB INFO ----(@ F10006100039BA58)----
SLOT 512 TCB --------- INPCB INFO ----(@ F100061000BF5258)----
SLOT 513 TCB --------- INPCB INFO ----(@ F100061000BF6A58)----
SLOT 514 TCB --------- INPCB INFO ----(@ F100061000BF6258)----
SLOT 6864 TCB --------- INPCB INFO ----(@ F100061002D84258)----
SLOT 8269 TCB --------- INPCB INFO ----(@ F1000610003F6258)----
SLOT 8288 TCB --------- INPCB INFO ----(@ F1000610003F6A58)----
SLOT 8289 TCB --------- INPCB INFO ----(@ F100061000C1AA58)----
SLOT 9090 TCB --------- INPCB INFO ----(@ F100061000BF2A58)----
KDB(0)> tcb F100061000BF2258 //tcb address in slot 37
SLOT 37 TCB --------- INPCB INFO ----(@ F100061000BF2258)----
next........@0000000000000000 prev........@0000000000000000
head........@0000000003E63780 faddr_6.....@F100061000BF2278
iflowinfo... 00000000 fport....... 00000000 fatype...... 00000000
oflowinfo... 00000000 lport....... 00000025 latype...... 00000000
laddr_6.....@F100061000BF2290 socket......@F100061000BF2000
ppcb........@F100061000BF2360 route_6.....@F100061000BF22B0
ifa.........@0000000000000000 flags....... 00000400
proto....... 00000000 tos......... 00000000 ttl......... 0000003C
rcvttl...... 00000000 rcvif.......@0000000000000000
options.....@0000000000000000 refcnt...... 00000000
lock........ 0000000000000000 rc_lock..... 0000000000000000
moptions....@0000000000000000 hash.next...@F10006000C6D6378
hash.prev...@F10006000C6D6378 timewait.nxt@0000000000000000
timewait.prv@0000000000000000 inp_v6opts @0000000000000000
inp_pmtu....@0000000000000000
292 AIX Version 6.1: KDB kernel debugger and kdb command
lock....@F1000610002D7640 head....@0000000000000000
q0......@0000000000000000 q.......@0000000000000000
q0len....... 0000 qlen........ 0000 qlimit...... 03E8
timeo....... 0000 error....... 0000 special..... 0A08
pgid.... 0000000000000000 oobmark. 0000000000000000
MBUF LIST
MBUF LIST
tpcb....@0000000000000000 fdev_ch.@F10006000C3E16C0
sec_info@0000000000000000 qos.....@0000000000000000
gidlist.@0000000000000000 private.@0000000000000000
uid..... 00000000 bufsize. 00000000 threadcnt00000000
nextfree@0000000000000000
siguid.. 00000000 sigeuid. 00000000 sigpriv. 00000000
sndtime. 0000000000000000 sec 0000000000000000 usec
rcvtime. 0000000000000000 sec 0000000000000000 usec
saioq...@0000000000000000 saioqhd.@0000000000000000
accept.. FFFFFFFFFFFFFFFF frcatime 00000000
isnoflgs 00000000 ()
rcvlen.. 0000000000000000 frcaback@0000000000000000
frcassoc@0000000000000000 frcabckt 0000000000000000
iodone.. 00000000 iodonefl 00000000 ()
ioarg...@0000000000000000 refcnt.. 0000000000000000
proc/fd: 29/19
KDB(0)>
udb subcommand
The udb subcommand displays the inpcb structure for UDP connections.
Format
Parameters
If no parameters are specified, detailed information is displayed for all entries in the udb table. Display a
summary of all entries or detailed information for a specific entry by specifying the appropriate
parameters.
Other
No aliases.
Examples
The following is an example of how to use the udb subcommand:
KDB(0)> udb -s
SLOT 13 UDB --------- INPCB INFO ----(@ F100061000BF3000)----
SLOT 37 UDB --------- INPCB INFO ----(@ F100061000BF3200)----
SLOT 111 UDB --------- INPCB INFO ----(@ F100061000BFB600)----
SLOT 123 UDB --------- INPCB INFO ----(@ F10006100039D600)----
SLOT 123 UDB --------- INPCB INFO ----(@ F10006100039DE00)----
SLOT 123 UDB --------- INPCB INFO ----(@ F10006100039D800)----
SLOT 135 UDB --------- INPCB INFO ----(@ F100061000410A00)----
SLOT 514 UDB --------- INPCB INFO ----(@ F100061000BFF800)----
SLOT 518 UDB --------- INPCB INFO ----(@ F100061000BFBC00)----
KDB(0)> udb F100061000BFB600 //udb address in slot 111
SLOT 111 UDB --------- INPCB INFO ----(@ F100061000BFB600)----
next........@0000000000000000 prev........@0000000000000000
head........@0000000003E63888 faddr_6.....@F100061000BFB620
iflowinfo... 00000000 fport....... 00000000 fatype...... 00000000
oflowinfo... 00000000 lport....... 0000006F latype...... 00000000
laddr_6.....@F100061000BFB638 socket......@F1000610002DC400
ppcb........@0000000000000000 route_6.....@F100061000BFB658
ifa.........@0000000000000000 flags....... 00000400
proto....... 00000000 tos......... 00000000 ttl......... 0000001E
rcvttl...... 00000000 rcvif.......@0000000000000000
options.....@0000000000000000 refcnt...... 00000000
lock........ 0000000000000000 rc_lock..... 0000000000000000
moptions....@0000000000000000 hash.next...@F10006000CA64A68
hash.prev...@F10006000CA64A68 timewait.nxt@0000000000000000
timewait.prv@0000000000000000 inp_v6opts @0000000000000000
inp_pmtu....@0000000000000000
294 AIX Version 6.1: KDB kernel debugger and kdb command
timer...@0000000000000000 timeo... 00000000
flags....... 0048 (SEL|NOINTR|INHERIT|NOTIFY)
wakeup.. 03C59490 wakearg.@F100061000BFED18
lockwtg. FFFFFFFFFFFFFFFF
MBUF LIST
MBUF LIST
tpcb....@0000000000000000 fdev_ch.@0000000000000000
sec_info@0000000000000000 qos.....@0000000000000000
gidlist.@0000000000000000 private.@0000000000000000
uid..... 00000000 bufsize. 00000000 threadcnt00000000
nextfree@0000000000000000
siguid.. 00000000 sigeuid. 00000000 sigpriv. 00000000
sndtime. 0000000000000000 sec 0000000000000000 usec
rcvtime. 0000000000000000 sec 0000000000000000 usec
saioq...@0000000000000000 saioqhd.@0000000000000000
accept.. FFFFFFFFFFFFFFFF frcatime 00000000
isnoflgs 00000000 ()
rcvlen.. 0000000000000000 frcaback@0000000000000000
frcassoc@0000000000000000 frcabckt 0000000000000000
iodone.. 00000000 iodonefl 00000000 ()
ioarg...@0000000000000000 refcnt.. 0000000000000000
proc/fd:
KDB(0)>
sock subcommand
The sock subcommand prints socket structure for UDP and TCP sockets.
Format
sock -f
Parameters
Item Description
-d Suppresses the display of send and receive buffer information for a socket.
-s Displays a one-line summary of every socket. If the optional tcp or udp parameter is used with -s, displays
a summary of only the specified socket types.
-f Displays the "free page list".
tcp Displays socket information for TCP blocks only.
udp Displays socket information for UDP blocks only.
effectiveaddress Specifies the effective address of a particular socket structure to display.
Other
No aliases.
Examples
MBUF LIST
296 AIX Version 6.1: KDB kernel debugger and kdb command
wakeup.. 00000000 wakearg.@0000000000000000
lockwtg. FFFFFFFFFFFFFFFF
MBUF LIST
tpcb....@0000000000000000 fdev_ch.@F10006000CE0F600
sec_info@0000000000000000 qos.....@0000000000000000
gidlist.@0000000000000000 private.@0000000000000000
uid..... 00000000 bufsize. 00000000 threadcnt00000000
nextfree@0000000000000000
siguid.. 00000000 sigeuid. 00000000 sigpriv. 00000000
sndtime. 0000000000000000 sec 0000000000000000 usec
rcvtime. 0000000000000000 sec 0000000000000000 usec
saioq...@0000000000000000 saioqhd.@0000000000000000
accept.. FFFFFFFFFFFFFFFF frcatime 00000000
isnoflgs 00000000 ()
rcvlen.. 0000000000000000 frcaback@0000000000000000
frcassoc@0000000000000000 frcabckt 0000000000000000
iodone.. 00000000 iodonefl 00000000 ()
ioarg...@0000000000000000 refcnt.. 0000000000000000
proc/fd: 98/19
KDB(0)>
sctpcb subcommand
The sctpcb subcommand displays the sctpcb structure.
Format
sctpcb [effectiveaddress]
Parameters
Item Description
effectiveaddress Specifies the effective address of an sctpcb structure to be displayed. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is specified, usage error is returned. A single sctpcb structure is displayed by specifying
the effective address of the structure.
Other
stcb
Examples
next................@0000000000000000
faddr............... 0.0.0.0
state............... 00000000 ()
path_errcnt......... 00000000 hbinterval.......... 00000000
inactivesince....... 0000000000000000 time_datasent....... 0000000000000000
snd_cwnd............ 00000000 mtu................. 00000000
ssthresh............ 00000000 partial_bytes_acked. 00000000
srtt................ 00000000 rttvar.............. 00000000
rto................. 00000000
flags............... 00000000 ()
tsn_timed........... 00000000 sacked_bytes........ 00000000
rtentry.............@0000000000000000
TIMER 0
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000000 (HB_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 1
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000001 (INIT_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 2
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000002 (REXMIT_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 3
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000003 (COOKIE_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 4
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000004 (SHUTDOWN_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 5
298 AIX Version 6.1: KDB kernel debugger and kdb command
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000005 (PERSIST_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 6
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000006 (DELACK_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
TIMER 7
next............@0000000000000000 prev............@0000000000000000
numcycles....... 00000000 timertype....... 00000005 (SHUTDOWN_GUARD_TIMER)
sctpcb..........@F1000E0001DCAE00 flags........... 00000000 ()
index........... FFFFFFFF
tcpcb subcommand
The tcpcb subcommand displays the tcpcb structure.
Format
Parameters
Item Description
-s Displays a one-line summary of every tcb entry.
effectiveaddress Specifies the effective address of a tcpcb structure to be displayed. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
If no parameter is specified, detailed information is displayed for all tcpcb structures. A single tcpcb
structure is displayed by specifying the effective address of the structure, and a summary of all tcpcb
structures is displayed by using the -s option.
Other
No aliases.
Examples
KDB(0)>
mbuf subcommand
The mbuf subcommand displays data structure (mbuf) information. Mbufs are used to store data in the
kernel for incoming and outbound network traffic.
Format
Parameters
300 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-p Displays the private mbuf structure pool information.
-a Follows the packet chain. The effectiveaddress parameter is required for this flag.
-n Follows the mbuf structure chain within a packet. The effectiveaddress parameter is required for this flag.
-d Prints the mbuf structure data along with the mbuf header. This is helpful when you need mbuf data
information. You must use the effectiveaddress parameter with this flag.
effectiveaddress Specifies the effective address of an mbuf structure to be displayed. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
Display the packet chain and mbuf structure chains within packets by using the -a parameter and the -n
parameter.
Other
No aliases.
Examples
netm subcommand
The netm subcommand displays the net_malloc event records that are stored in the kernel.
Format
netm -a [effectiveaddress]
netm -i starting_index
netm -e [outstand_mem]
netm -c cpu
Parameters
Before you can use the netm subcommand, you must turn on the net_malloc_police attribute. The
display begins with the latest event. The netm subroutine displays up to 6 to 16 stack traces in the
net_malloc event, depending on the error level that you set for the net_malloc component.
Other
No aliases.
Examples
No example.
sockinfo subcommand
The sockinfo subcommand displays several different socket-related structures.
Format
Parameters
Item Description
effectiveaddress Specifies the effective address of the structure to be displayed.
TypeOfAddress Identifies the type of structure to which the effective address points. Valid address types are unpcb, inpcb,
rawcb, ripcb, sctpcb, socket, and tcpcb.
-d Suppresses the display of send and receive buffer information for a socket.
Other
si
Examples
302 AIX Version 6.1: KDB kernel debugger and kdb command
--- TCP (inpcb: @ F1000610003FBA58) --- SOCKET @ F1000610003FB800
--- TCP (inpcb: @ F1000610003F2A58) --- SOCKET @ F1000610003F2800
--- TCP (inpcb: @ F1000610003EE258) --- SOCKET @ F1000610003EE000
--- TCP (inpcb: @ F100061002AE0258) --- SOCKET @ F100061002AE0000
--- TCP (inpcb: @ F100061002A6D258) --- SOCKET @ F100061002A6D000
--- TCP (inpcb: @ F100061002AD1A58) --- SOCKET @ F100061002AD1800
--- TCP (inpcb: @ F100061000343258) --- SOCKET @ F100061000343000
--- TCP (inpcb: @ F100061000435258) --- SOCKET @ F100061000435000
--- TCP (inpcb: @ F100061000437A58) --- SOCKET @ F100061000437800
--- TCP (inpcb: @ F1000610003F1258) --- SOCKET @ F1000610003F1000
KDB(0)> sockinfo F1000610003F0258 inpcb address of first inpcb in list above
---- TCPCB ----(@ F1000610003F0360)----
seg_next......@F1000610003F0360 seg_prev......@F1000610003F0360
t_softerror... 00000000 t_state....... 00000001 (LISTEN)
t_timer....... 00000000 (TCPT_REXMT)
t_timer....... 00000000 (TCPT_PERSIST)
t_timer....... 00000000 (TCPT_KEEP)
t_timer....... 00000000 (TCPT_2MSL)
t_rxtshift.... 00000000 t_rxtcur...... 00000006 t_dupacks..... 00000000
t_maxseg...... 00000200 t_force....... 00000000
t_flags....... 00000020 (RFC1323|COPYFLAGS)
t_oobflags.... 00000000 ()
t_template....@0000000000000000 t_inpcb.......@F1000610003F0258
t_iobc........ 00000000 t_timestamp... 6886EC01 snd_una....... 00000000
snd_nxt....... 00000000 snd_up........ 00000000 snd_wl1....... 00000000
snd_wl2....... 00000000 iss........... 00000000
snd_wnd....... 0000000000000000 rcv_wnd....... 0000000000000000
rcv_nxt....... 00000000 rcv_up........ 00000000 irs........... 00000000
snd_wnd_scale. 00000000 rcv_wnd_scale. 00000000 req_scale_sent 00000000
req_scale_rcvd 00000000 last_ack_sent. 00000000 timestamp_rec. 00000000
timestamp_age. 00000006 rcv_adv....... 00000000 snd_max....... 00000000
snd_cwnd...... 000000003FFFC000 snd_ssthresh.. 000000003FFFC000
t_idle........ 00000006 t_rtt......... 00000000 t_rtseq....... 00000000
t_srtt........ 00000000 t_rttvar...... 00000006 t_rttmin...... 00000002
max_rcvd...... 0000000000000000 max_sndwnd.... 0000000000000000
t_peermaxseg.. 00000200 snd_in_pipe... 00000000
sack_data.....@0000000000000000 snd_recover... 00000000
snd_high...... 00000000 snd_ecn_max... 00000000 snd_ecn_clear. 00000000
t_splice_with.@0000000000000000 t_splice_flags 00000000
MBUF LIST
MBUF LIST
tpcb....@0000000000000000 fdev_ch.@F10006000CE0F480
sec_info@0000000000000000 qos.....@0000000000000000
gidlist.@0000000000000000 private.@0000000000000000
uid..... 00000000 bufsize. 00000000 threadcnt00000000
nextfree@0000000000000000
siguid.. 00000000 sigeuid. 00000000 sigpriv. 00000000
sndtime. 0000000000000000 sec 0000000000000000 usec
rcvtime. 0000000000000000 sec 0000000000000000 usec
saioq...@0000000000000000 saioqhd.@0000000000000000
accept.. FFFFFFFFFFFFFFFF frcatime 00000000
isnoflgs 00000000 ()
rcvlen.. 0000000000000000 frcaback@0000000000000000
frcassoc@0000000000000000 frcabckt 0000000000000000
iodone.. 00000000 iodonefl 00000000 ()
ioarg...@0000000000000000 refcnt.. 0000000000000000
proc/fd: 98/19
proc/fd: fd: 19
SLOT NAME STATE PID PPID ADSPACE CL #THS
KDB(0)>
ndd subcommand
The ndd subcommand displays the network device driver statistics.
Format
Parameters
304 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-s Displays the list of all of the valid network device driver tables and gives the address of each ndd structure
and the name of the corresponding network interface.
effectiveaddress Specifies the effective address from which the ndd structure is read. Use symbols, hexadecimal values, or
hexadecimal expressions to specify the address.
-n nddname Indicates a network interface name is used to specify which ndd structure is to be read.
When it is used with an address or network interface name, the ndd subcommand displays a detailed
description of the corresponding table. When it is used with the -s parameter, a list of valid network
interfaces and the addresses of their ndd structures is printed. If no parameters are used, the ndd
subcommand displays a detailed description of all of the valid network device driver tables.
Other
No aliases.
Examples
KDB(0)>
nsdbg subcommand
The nsdbg subcommand displays the ns_alloc and free event records stored in the kernel.
Note: This functionality is only available if the ndd_event_tracing parameter is turned on by using the no
command.
Parameters
Item Description
-i starting_index Displays events starting with the event record specified with the starting_index parameter.
-c display_count Displays only the events specified with the display_count parameter.
-n nddname Displays the events associated with the network interface that have names specified with the
nddname parameter.
If no parameters are specified, the nsdbg subcommand displays all event records stored in the kernel.
Other
No aliases.
Examples
No example.
netstat subcommand
The netstat subcommand symbolically displays the contents of various network-related data structures
for active connections.
Format
netstat [-n ] [-D] [-c] [-P] [-m | -s | -ss | -u | -v] [ { -A -a } | { -r -C -i -I Interface } ] [ -f AddressFamily ]
[-p Protocol] [-Zc | -Zi | -Zm | -Zs] [Interval] [System]
Parameters
Item Description
-n Shows network addresses as numbers. When the -n flag is not specified, the netstat command interprets
addresses where possible and displays them symbolically. This flag can be used with any of the display
formats.
-D Shows the number of packets received, transmitted, and dropped in the communications subsystem.
-c Shows the statistics of the Network Buffer Cache.
-P Shows the statistics of the Data Link Provider Interface (DLPI).
-m Shows statistics recorded by the memory management routines.
-s Shows statistics for each protocol.
-ss Displays all of the non-zero protocol statistics and provides a concise display.
-u Displays information about domain sockets.
-v Shows statistics for CDLI-based communications adapters. This flag causes the netstat command to run the
statistics commands for the entstat subcommand, the tokstat subcommand, and the fddistat subcommand.
No flags are issued to these device driver commands.
-A Shows the address of any protocol control blocks associated with the sockets. This flag acts with the default
display and is used for debugging purposes.
-a Shows the state of all of the sockets. Without this flag, sockets used by server processes are not shown.
-r Shows the routing tables. Shows routing statistics when it is used with the -s flag.
-C Shows the routing tables, including the user-configured costs and current costs of each route.
-i Shows the state of all configured interfaces.
306 AIX Version 6.1: KDB kernel debugger and kdb command
Item Description
-I Interface Shows the state of all of the configured interfaces specified by the Interface variable.
-f AddressFamily Limits reports of statistics or address control blocks to those items specified by the AddressFamily variable.
The following address families are recognized:
v inet – Indicates the AF_INET address family
v inet6 – Indicates the AF_INET6 address family
v ns – Indicates the AF_NS address family
v unix – Indicates the AF_UNIX address family
-p Protocol Shows statistics about the value specified for the Protocol variable, which is either a name for a protocol or
an alias for it. Protocol names and aliases are listed in the /etc/protocols file. A null response means that
there are no numbers to report. The program report of the value specified for the Protocol variable is
unknown if there is no statistics routine for it.
-Zc Clears network buffer cache statistics.
-Zi Clears interface statistics.
-Zm Clears network memory allocator statistics.
-Zs Clears protocol statistics. To clear statistics for a specific protocol, use -p Protocol. For example, to clear the
TCP statistics, type the following on the command line:
netstat -Zs -p tcp
Other
No aliases.
Examples
route subcommand
The route subcommand displays the routee structure at a given address.
Format
route effectiveaddress
Parameters
Other
No aliases.
Examples
The following is an example of how to use the route subcommand:
# netstat -f inet -n -A
Active Internet connections
PCB/ADDR Proto Recv-Q Send-Q Local Address Foreign Address (state)
715a45e8 tcp4 0 0 9.53.85.113.23 9.53.85.114.50921 ESTABLISHED
308 AIX Version 6.1: KDB kernel debugger and kdb command
q0...... 00000000 q....... 00000000 q0len....... 0000
qlen........ 0000 qlimit...... 0000 timeo....... 0000
error....... 0000 special..... 0A8C pgid.... 00000000 oobmark. 00000000
snd:cc...... 00000000 hiwat... 00004000 mbcnt... 00000000 mbmax... 00010000
lowat... 00003908 mb...... 00000000 sel..... 00000000 events...... 0000
iodone.. 00000000 ioargs.. 00000000 lastpkt. 709F6700 wakeone. FFFFFFFF
timer... 00000000 timeo... 00000000 flags....... 0048 (SEL|NOINTR)
wakeup.. 026A362C wakearg. 715D1890 lockwtg. FFFFFFFF
rcv:cc...... 00000000 hiwat... 00004470 mbcnt... 00000000 mbmax... 000111C0
lowat... 00000001 mb...... 00000000 sel..... 00000000 events...... 0004
iodone.. 00000000 ioargs.. 00000000 lastpkt. 715AEB00 wakeone. FFFFFFFF
timer... 00000000 timeo... 00000000 flags....... 0048 (SEL|NOINTR)
wakeup.. 026A362C wakearg. 715D1800 lockwtg. FFFFFFFF
tpcb.... 00000000 fdev_ch. 300736A0 sec_info 00000000 qos..... 00000000
gidlist. 00000000 private. 00000000 uid..... 00000000 bufsize. 00000000
threadcnt00000000 nextfree 00000000 siguid.. 00000000 sigeuid. 00000000
sigpriv. 00000000
sndtime. 00000000 sec 00000000 usec rcvtime. 00000000 sec 00000000 usec
saioq... 00000000 saioqhd. 00000000 accept.. FFFFFFFF frcatime 00000000
isnoflgs 00000000 ()
rcvlen.. 00000000 frcaback 00000000 frcassoc 00000000 frcabckt 00000000
iodone.. 00000000 iodonefl 00000000 ()
ioarg... 00000000 refcnt.. 00000001 proc/fd: 69/0 69/1 69/2
KDB(0)> route 715A4588 //route address from the route_6 field
Destination.. 9.53.85.114
.........rtentry@ 715AEE00.........
rt_nodes[0]......
rn_dupedkey @ 00000000
rt_nodes[1]......
KDB(0)>
rtentry subcommand
The rtentry subcommand displays the rtentry structure at a given address.
Format
rtentry effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address of the rtentry structure to display.
Other
No aliases.
Examples
.........rtentry@ 727BAD00.........
rt_nodes[0]......
310 AIX Version 6.1: KDB kernel debugger and kdb command
rt_nodes[1]......
KDB(0)>
rxnode subcommand
The rxnode subcommand displays information about the radix_node structure at a specified address.
Format
rxnode effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the effective address of the radix_node structure.
After displaying the radix_node structure, the subcommand presents a menu for interactive traversal of
the radix_node tree. If the radix_node is an intermediate node of the tree, the traversal can follow the
parent, left, or right nodes. If the displayed radix_node is a leaf node, the traversal can only follow the
parent node.
Other
No aliases.
Examples
.........rtentry@ 7095D200.........
rt_nodes[0]......
KDB(0)> rxnode 715AEF00 //radix node address from rn_l; can also use rn_r or rn_p
312 AIX Version 6.1: KDB kernel debugger and kdb command
rn_flags..... 00000004 (ACTIVE)
rn_off....... 00000007
rn_l @....... 715AEF00 rn_r @....... 7095D200
Traverse radix_node tree :
parent - 1 rn_r - 2 rn_l - 3 quit - 0
Enter Choice : 2
KDB(0)>
tcpdbg subcommand
The tcpdbg subcommand displays the tcp_debug structures. The amount of information displayed
depends on the socket trace level set.
Format
Parameters
Item Description
tcpdbg Displays the last 10 tcp_debug entries at the current index.
-c count Defines how many entries to display. The default value is 10. The count specified must be lower than the
value defined by tcp_ndebug variable.
-i index Displays the last count (10 if count is not specified by the -c parameter) tcp_debug entries starting from the
one at the index specified in the index parameter.
-a address Displays the tcp_debug structures at the address specified with the address parameter.
-s Displays the socket details associated with the tcp_debug entries. It is available with -a, -i and -c options
only if the trace level >= normal.
Other
No aliases.
Examples
v The following example displays one structure of tcp_debug at index 31 for detail trace level.
KDB(0)> tcpdbg -i 31 -c 1
314 AIX Version 6.1: KDB kernel debugger and kdb command
rcv_nxt....... C8075EF0 rcv_up........ C8075667 irs........... C805ED8A
snd_wnd_scale. 00000002 rcv_wnd_scale. 00000002 req_scale_sent 00000002
req_scale_rcvd 00000002 last_ack_sent. C8075EF0 timestamp_rec. 420CF31A
timestamp_age. 00000004 rcv_adv....... C8096D50 snd_max....... 4E015C41
snd_cwnd............... 0003FFFC snd_ssthresh........... 3FFFC000
t_idle........ 00000004 t_rtt......... 00000000 t_rtseq....... 4E015C3F
t_srtt........ 00000007 t_rttvar...... 00000003 t_rttmin...... 00000002
max_rcvd............... 00000000 max_sndwnd............. 00020E60
t_peermaxseg.. 000041CC snd_in_pipe... 00000000
sack_data..............@00000000 snd_recover... 00000000
snd_high...... 4E015C41 snd_ecn_max... 4E015C41 snd_ecn_clear. 4E015C42
t_splice_with..........@00000000 t_splice_flags 00000000
MBUF LIST
etc...
v The following example displays one structure of tcp_debug at address 70293008 for detail trace level.
KDB(0)> tcpdbg -a 70293008
cla subcommand
The cla subcommand displays Workload Manager (WLM) class statistics and configuration information.
Format
cla * [select#]
cla [classid]
316 AIX Version 6.1: KDB kernel debugger and kdb command
Parameters
Item Description
* Displays the menu if the select# parameter is not specified.
select# Displays the class statistics for the selected number.
1 – CPU for all classes
2 – Mem for all classes
3 – Mem for superclasses
4 – CPU for all classes
5 – Mem for one superclass
6 – BIO use for all classes
7 – BIO use for active classes
8 – BIO use, per-disk, for all classes
9 – Totals for all classes and all resources
classid Displays configuration information for the specified class identifier.
Other
class
Examples
The following is an example of how to use the cla subcommand completed by using the menu:
KDB(0)> cla *
WLM CLASSes
Select the criteria to display by:
1) CPU use
2) MEM use
3) MEM use over superclasses
4) Superclasses only
5) MEM use inside a superclass
6) BIO use
7) BIO use (show actives classes for all disks)
8) BIO use (show classes for all disks)
9) Total Resources
Enter your choice: 1
(wlm is ON)
TIER %% MIN SHA SMAX HMAX DES RAP URAPH URAP URAPL PRI NT TB TOTALTB
[ 0]: Unclassified 0 0 0 -1 100 100 100 100 0 0 194 10 0 0x00000000 0x00000000
[ 64]: Unmanaged 0 0 0 -1 100 100 100 100 0 0 194 10 0 0x00000000 0x00000000
[128]: Default 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[129]: Default.Default 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[130]: Default.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[192]: Shared 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[193]: Shared.Default 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[194]: Shared.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[256]: System 0 1 0 -1 100 100 100 100 0 0 194 0 0 0x000043A8 0x00000000
[257]: System.Default 0 1 0 -1 100 100 100 100 0 0 97 0 1 0x000043A8 0x00001DB5
[258]: System.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[320]: Test1 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[321]: Test1.Default 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
[322]: Test1.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 1 0x00000000 0x00000000
KDB(0)> cla * 1
(wlm is ON) TIER %% MIN SHA SMAX HMAX DES RAP URAPH URAP URAPL PRI NT TB TOTALTB
[ 0]: Unclassified 0 0 0 -1 100 100 100 100 0 0 194 10 0 0x00000000 0x00000000
[ 64]: Unmanaged 0 0 0 -1 100 100 100 100 0 0 194 10 0 0x00000000 0x00000000
[128]: Default 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[129]: Default.Default 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[130]: Default.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[192]: Shared 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[193]: Shared.Default 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[194]: Shared.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[256]: System 0 7 0 -1 100 100 100 86 0 13 194 13 0 0x0000648F 0x00000000
[257]: System.Default 0 7 0 -1 100 100 100 86 6 13 103 13 6 0x0000648F 0x00000F1F
[258]: System.Shared 0 0 0 -1 100 100 100 100 6 6 103 6 6 0x00000000 0x00000000
[320]: Test1 0 58 0 3 100 100 55 -2 0 98 194 98 0 0x000508DA 0x00000000
[321]: Test1.Default 0 0 0 -1 100 100 100 100 49 49 146 49 6 0x00000000 0x00000000
[322]: Test1.Shared 0 0 0 -1 100 100 100 100 49 49 146 49 6 0x00000000 0x00000000
[323]: Test1.Sub1 0 42 0 8 100 100 80 2 49 96 146 96 4 0x0002C44A 0x00004373
[324]: Test1.Sub2 0 16 0 2 100 100 20 -18 49 106 146 106 4 0x00024490 0x00003740
[384]: Test2 0 34 0 2 100 100 37 4 0 93 194 93 0 0x0000AC61 0x00000000
[385]: Test2.Default 0 0 0 -1 100 100 100 100 46 46 143 46 6 0x00000000 0x00000000
[386]: Test2.Shared 0 0 0 -1 100 100 100 100 46 46 143 46 6 0x00000000 0x00000000
[387]: Test2.Sub1 0 21 0 7 100 100 70 11 46 89 143 89 6 0x0000AC61 0x000012D3
[388]: Test2.Sub2 0 13 0 3 100 100 30 -7 46 98 143 98 6 0x00000000 0x00000000
[448]: Test3 0 0 0 1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[449]: Test3.Default 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[450]: Test3.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[512]: Test4 0 0 0 -1 100 100 100 100 0 0 194 0 0 0x00000000 0x00000000
[513]: Test4.Default 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
[514]: Test4.Shared 0 0 0 -1 100 100 100 100 0 0 97 0 6 0x00000000 0x00000000
Column Description
First column The first column is the class ID. The superclass IDs are a multiple of 64, with
subclass IDs following numerically.
Second column The second column is the class name. Subclass names have the format <Supername.Subname>.
TIER The tier number for the class. The tier for a superclass is the supertier. The tier
for a subclass is the subtier.
%% The current consumption percentage for the class for the resource being displayed.
MIN The user-defined minimum limit for the class (default is 0).
SHA The user-defined number of shares for the class. (default is -1, unregulated)
SMAX The user-defined soft maximum limit for the class. (default is 100)
HMAX The user-defined hard maximum limit for the class. (default is 100)
DES The desired or target percentage for the class.
RAP The Resource Access Priority for the class. This is a value in the range [-100..100].
URAPH The highest URAP value the class can attain.
URAP The current URAP value for the class.
URAPL The lowest URAP value the class can attain.
PRI The class priority.
NT Index of next available table entry for CPU consumption samples.
TB Timebase units of consumption for the last second.
TOTALTB Decayed total timebase units of consumption.
318 AIX Version 6.1: KDB kernel debugger and kdb command
bdev subcommand
The bdev subcommand displays Workload Manager (WLM) I/O statistics for block devices.
Format
Parameters
Item Description
a Displays detailed (all) I/O statistics.
c Displays I/O statistics for each class.
s Displays I/O statistics for each device. This is the default.
* Displays I/O statistics for all managed devices.
-d Displays I/O statistics for a device specified by the major and minor numbers.
major Specifies the major number. This is a hexadecimal value.
minor Specifies the minor number. This is a hexadecimal value.
effectiveaddress Specifies the effective or virtual address for a device with a control block. Symbols, hexadecimal values, or
hexadecimal expressions can be used to specify the address.
Other
wlm_bdev
Examples
KDB(0)> bdev *
33507000: ~ dev: 14,0 in_queue: 0 classes: 0 rq/s: 0 act: 0
33459000: ~ dev: 14,1 in_queue: 0 classes: 0 rq/s: 0 act: 0
334B0000: + dev: 14,2 in_queue: 2 classes: 7 rq/s: 157 act: 100
Column Description
1 eaddr of bdev control block
2 status of device
"-" = uregulated
"~" = no activity
"+" = active
3 dev: device major, minor number
4 in_queue: number of requests enqueued
5 classes: number of active classes for the device
6 rq/s: number of requests per second for the device
7 act: the percent active for the device
KDB(0)> bdev s -d 14 2
334B0000: + dev: 14,2 in_queue: 2 classes: 7 rq/s: 157 act: 100
flags 0x00000000 lock 0x00000000
next 00000000 nb_cntrl 4416
cntrl 334B00F0 reguls 334C14F0
delayed 32AEE000 in_use 0
ev_want_free 0xFFFFFFFF wbd_active_cntrl 7
wbd_in_queue 2 wbd_max_queued 6
dkstat 32AD5274 prev_dk_time 919418
¤t 334B00CC &info.wbd_last 334B0024
&info.wbd_max 334B003C &info.wbd_av 334B0054
KDB(0)> cla * 6
(wlm is ON) TIER %% MIN SHA SMAX HMAX DES RAP URAPH URAP URAPL
[ 0]: Unclassified 0 0 0 -1 100 100 100 100 0 0 511
[ 64]: Unmanaged 0 0 0 -1 100 100 100 100 0 0 511
[128]: Default 0 0 0 -1 100 100 100 100 0 0 511
[129]: Default.Default 0 0 0 -1 100 100 100 100 0 0 255
[130]: Default.Shared 0 0 0 -1 100 100 100 100 0 0 255
[192]: Shared 0 0 0 -1 100 100 100 100 0 0 511
[193]: Shared.Default 0 0 0 -1 100 100 100 100 0 0 255
[194]: Shared.Shared 0 0 0 -1 100 100 100 100 0 0 255
[256]: System 0 0 0 -1 100 100 100 100 0 0 511
[257]: System.Default 0 0 0 -1 100 100 100 100 0 0 255
[258]: System.Shared 0 0 0 -1 100 100 100 100 0 0 255
[320]: Test1 0 25 0 -1 100 100 100 58 0 106 511
[321]: Test1.Default 0 25 0 -1 100 100 100 58 53 106 308
[322]: Test1.Shared 0 0 0 -1 100 100 100 100 53 53 308
[384]: Test2 0 3 0 -1 10 100 10 53 0 119 511
[385]: Test2.Default 0 3 0 -1 100 100 100 53 59 119 315
[386]: Test2.Shared 0 0 0 -1 100 100 100 100 59 59 315
[448]: Test3 0 3 0 -1 10 100 10 53 0 119 511
[449]: Test3.Default 0 3 0 -1 100 100 100 53 59 119 315
[450]: Test3.Shared 0 0 0 -1 100 100 100 100 59 59 315
[512]: Test4 1 0 0 -1 100 100 100 100 512 512 1023
[513]: Test4.Default 0 0 0 -1 100 100 100 100 512 512 767
[514]: Test4.Shared 0 0 0 -1 100 100 100 100 512 512 767
KDB(0)> cla * 7
(wlm is ON) TIER %% MIN SHA SMAX HMAX DES RAP URAPH URAP URAPL RTHR WTHR DELAY VERSION
[320]: Test1 0 25 0 -1 100 100 100 58 0 106 511
hdisk1 0 77 0 -1 100 100 100 12 0 224 511 0 0 0 2
[321]: Test1.Default 0 25 0 -1 100 100 100 58 53 106 308
hdisk1 0 77 0 -1 100 100 100 12 112 224 367 0 496 0 1
[384]: Test2 0 3 0 -1 10 100 10 53 0 119 511
hdisk1 0 10 0 -1 10 100 11 0 0 254 511 0 0 39 5
[385]: Test2.Default 0 3 0 -1 100 100 100 53 59 119 315
hdisk1 0 10 0 -1 100 100 100 5 127 247 382 0 80 28 1
[448]: Test3 0 3 0 -1 10 100 10 53 0 119 511
hdisk1 0 11 0 -1 10 100 12 -100 0 509 511 0 0 35 4
[449]: Test3.Default 0 3 0 -1 100 100 100 53 59 119 315
hdisk1 0 11 0 -1 100 100 100 4 254 376 510 0 96 24 1
KDB(0)> cla * 8
(wlm is ON) TIER %% MIN SHA SMAX HMAX DES RAP URAPH URAP URAPL RTHR WTHR DELAY VERSION
[ 0]: Unclassified 0 0 0 -1 100 100 100 100 0 0 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
[ 64]: Unmanaged 0 0 0 -1 100 100 100 100 0 0 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 1
[128]: Default 0 0 0 -1 100 100 100 100 0 0 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk1 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
[129]: Default.Default 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[130]: Default.Shared 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
320 AIX Version 6.1: KDB kernel debugger and kdb command
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[192]: Shared 0 0 0 -1 100 100 100 100 0 0 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk1 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
[193]: Shared.Default 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[194]: Shared.Shared 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[256]: System 0 0 0 -1 100 100 100 100 0 0 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk1 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
[257]: System.Default 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[258]: System.Shared 0 0 0 -1 100 100 100 100 0 0 255
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
[320]: Test1 0 25 0 -1 100 100 100 58 0 106 511
cd0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk0 0 0 0 -1 100 100 10 100 0 0 511 0 0 0 2
hdisk1 0 77 0 -1 100 100 100 12 0 224 511 0 0 0 2
[321]: Test1.Default 0 25 0 -1 100 100 100 58 53 106 308
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 77 0 -1 100 100 100 12 112 224 367 0 496 0 1
[322]: Test1.Shared 0 0 0 -1 100 100 100 100 53 53 308
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 112 112 367 0 0 0 1
[384]: Test2 0 3 0 -1 10 100 10 53 0 119 511
cd0 0 0 0 -1 10 100 10 100 0 0 511 0 0 0 5
hdisk0 0 0 0 -1 10 100 10 100 0 0 511 0 0 0 5
hdisk1 0 10 0 -1 10 100 11 0 0 254 511 0 0 39 5
[385]: Test2.Default 0 3 0 -1 100 100 100 53 59 119 315
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 10 0 -1 100 100 100 5 127 247 382 0 80 28 1
[386]: Test2.Shared 0 0 0 -1 100 100 100 100 59 59 315
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 127 127 382 0 0 0 1
[448]: Test3 0 3 0 -1 10 100 10 53 0 119 511
cd0 0 0 0 -1 10 100 10 100 0 0 511 0 0 0 4
hdisk0 0 0 0 -1 10 100 10 100 0 0 511 0 0 0 4
hdisk1 0 11 0 -1 10 100 12 -100 0 509 511 0 0 35 4
[449]: Test3.Default 0 3 0 -1 100 100 100 53 59 119 315
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 11 0 -1 100 100 100 4 254 376 510 0 96 24 1
[450]: Test3.Shared 0 0 0 -1 100 100 100 100 59 59 315
cd0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 0 0 255 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 254 254 510 0 0 0 1
[512]: Test4 1 0 0 -1 100 100 100 100 512 512 1023
cd0 1 0 0 -1 100 100 10 100 512 512 1023 0 0 0 1
hdisk0 1 0 0 -1 100 100 10 100 512 512 1023 0 0 0 1
hdisk1 1 0 0 -1 100 100 0 100 512 512 1023 0 0 0 1
[513]: Test4.Default 0 0 0 -1 100 100 100 100 512 512 767
cd0 0 0 0 -1 100 100 10 100 512 512 767 0 0 0 1
hdisk0 0 0 0 -1 100 100 10 100 512 512 767 0 0 0 1
hdisk1 0 0 0 -1 100 100 10 100 512 512 767 0 0 0 1
[514]: Test4.Shared 0 0 0 -1 100 100 100 100 512 512 767
bqueue subcommand
The bqueue subcommand displays a queue of delayed Workload Manager I/O requests.
Format
bqueue effectiveaddress
Parameters
Item Description
effectiveaddress Specifies the address of the head of the queue. This address can be obtained from the delay field from the
output of the bdev subcommand.
Other
wlm_bq
Examples
Description of output
rules subcommand
The rules subcommand displays the currently-loaded Workload Manager (WLM) assignment rules.
Format
rules
Parameters
Other
rule
322 AIX Version 6.1: KDB kernel debugger and kdb command
Examples
wp subcommand
The wp subcommand prints a summary of the kernel data associated with workload partitions (WPARs).
Format
Flags
Item Description
-? Displays a usage statement for the wp subcommand.
-n Displays all WPARs with a non-empty name assigned. When you specify a name_string, the -n flag displays
all WPARs whose names contain the name_string.
-k Displays the WPAR that is associated with a given key.
Parameters
Item Description
cid Specifies the cid number that is associated with the WPAR to be displayed. This value must be a decimal
number.
cname Specifies the name of the WPAR to be displayed.
key Specifies the key associated with the WPAR to be displayed. This value must be a decimal number.
name_string Specifies a string that must be contained within the WPAR name to be displayed.
If you do not specify any flags or parameters, summary information is displayed for each active WPAR in
the kernel. You can display detailed WPAR information by specifying either the key or the cid parameter.
Other
No aliases.
kdb command
Allows examining of a system dump or a running kernel.
Syntax
kdb -h
kdb [-c CommandFile] [-cp] [-i HeaderFile] [-l] [-script] [-v] [SystemImageFile [KernelFile [KernelModule ...]]]
kdb [-c CommandFile] [-cp] [-i HeaderFile] [-l] [-script] [-v] [-m SystemImageFile] [-u KernelFile] [-k
KernelModule]
Description
The kdb command is an interactive utility for examining an operating system image or the running
kernel. The kdb command interprets and formats control structures in the system and provides
miscellaneous functions for examining a dump.
The SystemImageFile parameter specifies the file that contains the system image. The value can indicate a
system dump, the name of a dump device, or the /dev/pmem special file. The default SystemImageFile is
/dev/pmem.
The KernelFile parameter specifies the AIX kernel that kdb will use to resolve kernel symbol definitions. A
kernel file must be available. When examining a system dump it is imperative that the kernel file be the
same as the kernel that was used to take the system dump. The default for the KernelFile is /unix.
The KernelModule parameters specify the file names of any additional kernel modules which the kdb
command uses to resolve symbol definitions not found in the kernel file itself.
324 AIX Version 6.1: KDB kernel debugger and kdb command
Root permissions are required for use of the kdb command on the active system. This is required because
the special file /dev/pmem is used. To run the kdb command on the active system, type the following:
kdb
Note: Stack tracing of the current process on a running system does not work.
When kdb starts, it looks for a .kdbinit file in the user's home directory and in the current working
directory. If a .kdbinit file exists in either of these locations, kdb runs all the commands inside the file as
if they were entered at the interactive kdb prompt. If a .kdbinit file exists in both of these locations, the
file in the home directory will be processed first followed by the file in the current working directory
(unless the current directory is the home directory, in which case the file is processed only once).
Flags
Item Description
-c CommandFile Specifies a different name for the startup script file. If this option is used, then kdb will search for the
CommandFile parameter in the home and current directories, instead of the .kdbinit file.
-cp Causes kdb to print out each command in the startup script files as that command is run This may
be used to aid in the debugging of .kdbinit files (or any other file specified with the -c flag). Each
command will be printed with a + (plus) sign in front of it.
-h Displays a short help message in regard to command line usage and a brief listing of the available
command line options.
-i HeaderFile Makes all of the C structures defined in the HeaderFile parameter available for use with the kdb print
subcommand. This option requires a C compiler to be installed on the system. If the HeaderFile
variable needs additional .h files to compile, these may have to be specified with separate -i options
as well.
-k Module Instructs kdb to use the Module parameter as an additional kernel module for resolving symbol
definitions not found in the kernel itself. Using this option is equivalent to specifying the kernel
module with the KernelModule parameter.
-l Disables the inline pager (that is, the more (^C to quit) ? prompt) in kdb. In this case the set scroll
subcommand in kdb has no effect, and the inline pager is always disabled regardless of the scroll
setting.
-m Image Instructs kdb to use the Image parameter as the system image file. Using this option is equivalent to
specifying the system image file with the SystemImageFile parameter.
-script Disables the inline pager (that is, the more (^C to quit) ? prompt) and disables printing of most
status information when kdb starts. This option facilitates parsing of the output from the kdb
command by scripts and other programs that act as a front end for kdb.
-u Kernel Instructs kdb to use the Kernel as the kernel file for resolving symbol definitions. Using this option is
equivalent to specifying the kernel with the KernelFile parameter.
-v Displays a list of all Component Dump Tables (CDTs) in the system dump file when kdb starts. CDTs
list which memory regions are actually included in the system dump. If kdb is used on a live system,
this option is ignored.
-w Examines a kernel file directly instead of a system image. All kdb subcommands which normally
display memory locations from the system image file will instead read data directly from KernelFile.
Subcommands which write memory are not available.
Examples
The following examples demonstrate invocation options for the kdb command
1. To invoke the kdb command with the default system image and kernel image files, type:
kdb
The kdb program returns a (0)> prompt and waits for entry of a subcommand.
Files
Item Description
/usr/sbin/kdb Contains the kdb command.
/dev/pmem Default system image file
/unix Default kernel file
Note: The default prompt at this time is the dollar sign ($)
2. Stop the demonstration program by pressing the Ctrl+Z key sequence.
3. Put the demonstration program in the background by typing the following:
bg
4. Activate the KDB kernel debugger using the Ctrl+\ key sequence.
A KDB command prompt should appear. The default KDB prompt isKDB(0)>.
326 AIX Version 6.1: KDB kernel debugger and kdb command
Generating map and list files
Assembler listing and map files are useful tools for debugging with the KDB kernel debugger.
To create the assembler list file during compilation, use the -qlist option. Also use the -qsource option to
get the C source listing in the same file. To create the assembler list file with these options, type the
following:
cc -c -DEBUG -D_KERNEL -DIBMR2 demokext.c -qsource -qlist
In order to obtain a map file, use the -bmap:FileName option for the link editor. The following example
creates a map file named demokext.map:
ld -o demokext demokext.o -edemokext -bimport:/lib/syscalls.exp \
-bimport:/lib/kernex.exp -lcsys -bexport:demokext.exp -bmap:demokext.map
The following is a portion of the list file, created by the cc command, for the demonstration kernel
extension. This information is included in the compilation listing because the -qsource option for the cc
command was used. The left column is the line number in the following source code:
.
.
63 | case 1: /* Increment */
64 | sprintf(buf, "Before increment: j=%d demokext_j=%d\n",
65 | j, demokext_j);
66 | write_log(fpp, buf, &bytes_written);
67 | demokext_j++;
68 | j++;
69 | sprintf(buf, "After increment: j=%d demokext_j=%d\n",
70 | j, demokext_j);
71 | write_log(fpp, buf, &bytes_written);
72 | break;
.
.
The assembler listing for the corresponding C code included in the compilation listing because the -qlist
option was used with the cc command is as follows:
.
.
64| 0000B0 l 80BF0030 2 L4A gr5=j(gr31,48)
64| 0000B4 l 83C20008 1 L4A gr30=.demokext_j(gr2,0)
64| 0000B8 l 80DE0000 2 L4A gr6=demokext_j(gr30,0)
64| 0000BC ai 30610048 1 AI gr3=gr1,72
64| 0000C0 ai 309F005C 1 AI gr4=gr31,92
64| 0000C4 bl 4BFFFF3D 0 CALL gr3=sprintf,4,buf",gr3,""5",gr4-gr6,sprintf",gr1,cr[01567]",gr0",gr4"-gr12",fp0"-fp13"
64| 0000C8 cror 4DEF7B82 1
66| 0000CC l 80610040 1 L4A gr3=fpp(gr1,64)
66| 0000D0 ai 30810048 1 AI gr4=gr1,72
66| 0000D4 ai 30A100AC 1 AI gr5=gr1,172
66| 0000D8 bl 4800018D 0 CALL gr3=write_log,3,gr3,buf",gr4,bytes_written",gr5,write_log",gr1,cr[01567]",gr0",gr4"-gr12",fp0"-fp13"
66| 0000DC cal 387E0000 2 LR gr3=gr30
67| 0000E0 l 80830000 1 L4A gr4=demokext_j(gr3,0)
67| 0000E4 ai 30840001 2 AI gr4=gr4,1
67| 0000E8 st 90830000 1 ST4A demokext_j(gr3,0)=gr4
68| 0000EC l 809F0030 1 L4A gr4=j(gr31,48)
68| 0000F0 ai 30A40001 2 AI gr5=gr4,1
68| 0000F4 st 90BF0030 1 ST4A j(gr31,48)=gr5
69| 0000F8 l 80C30000 1 L4A gr6=demokext_j(gr3,0)
69| 0000FC ai 30610048 1 AI gr3=gr1,72
69| 000100 ai 309F0084 1 AI gr4=gr31,132
69| 000104 bl 4BFFFEFD 0 CALL gr3=sprintf,4,buf",gr3,""6",gr4-gr6,sprintf",gr1,cr[01567]",gr0",gr4"-gr12",fp0"-fp13"
69| 000108 cror 4DEF7B82 1
71| 00010C l 80610040 1 L4A gr3=fpp(gr1,64)
71| 000110 ai 30810048 1 AI gr4=gr1,72
71| 000114 ai 30A100AC 1 AI gr5=gr1,172
71| 000118 bl 4800014D 0 CALL gr3=write_log,3,gr3,buf",gr4,bytes_written",gr5,write_log",gr1,cr[01567]",gr0",gr4"-gr12",fp0"-fp13"
72| 00011C b 48000098 1 B CL.8,-1
.
.
The offsets of these instructions within the demonstration kernel extension (demokext) are 0000E0,
0000E4, and 0000E8.
The binder map file is a symbol map in address order format. Each symbol listed in the map file has a
storage class (CL) and a type (TY) associated with it.
Storage classes correspond to the XMC_TY variables defined in the syms.h file. Each storage class
belongs to one of the following section types:
.text Contains read-only data (instructions). Addresses listed in this section use the beginning of the
.text section as origin. The .text section can contain one of the following storage class (CL) values:
DB Debug Table. Identifies a class of sections that has the same characteristics as read only
data.
GL Glue Code. Identifies a section that has the same characteristics as a program code. This
type of section has code to interface with a routine in another module. Part of the
interface code requirement is to maintain the table of contents data structure (TOC)
addressability across the call.
PR Program Code. Identifies the sections that provide executable instructions for the module.
R0 Read Only Data. Identifies the sections that contain constants that are not modified while
the program is running.
TB Reserved for future use.
TI Reserved for future use.
XO Extended Operations code. Identifies a section of code that is to be treated as a
pseudo-machine instruction.
.data Contains read-write initialized data. Addresses listed in this section use the beginning of the .data
section as the origin. The .data section can contain one of the following storage class (CL) value
types:
DS Descriptor. Identifies a function descriptor. This information is used to describe function
pointers in languages such as C and Fortran.
RW Read Write Data. Identifies a section that contains data that is known to require change
while the program is running.
SV SVC. Identifies a section of code that is to be treated as a supervisory call.
T0 TOC Anchor. Used only by the predefined TOC symbol. Identifies the TOC special
symbol that is used only by the TOC header.
TC TOC Entry. Identifies address data that will reside in the TOC.
TD TOC Data Entry. Identifies data that will reside in the TOC.
328 AIX Version 6.1: KDB kernel debugger and kdb command
UA Unclassified. Identifies data that contains data of an unknown storage class.
.bss Contains read-write data that is not initialized. Addresses listed in this section use the beginning
of the .data section as origin. The .bss section contains one of the following storage class (CL)
values:
BS BSS class. Identifies a section that contains data that is not initialized.
UC Unnamed Fortran Common. Identifies a section that contains read/write data.
Types correspond to the XTY_TY variables defined in the syms.h file. The type (TY) can be one of the
following values:
Item Description
ER External Reference
LD Label Definition
SD Section Definition
CM BSS Common Definition
The following is the map file for the demonstration kernel extension. This file was created because of the
-bmap:demokext.map option of the ld command.
1 ADDRESS MAP FOR demokext SOURCE-FILE(OBJECT) or
2 *IE ADDRESS LENGTH AL CL TY Sym# NAME IMPORT-FILE{SHARED-OBJECT}
3 --- -------- ------ -- -- -- ----- --------------------- ---------------------------
4 I ER S1 _system_configuration /lib/syscalls.exp{/unix}
5 I ER S2 fp_open /lib/kernex.exp{/unix}
6 I ER S3 fp_close /lib/kernex.exp{/unix}
7 I ER S4 fp_write /lib/kernex.exp{/unix}
8 I ER S5 sprintf /lib/kernex.exp{/unix}
9 00000000 000360 2 PR SD S6 <> demokext.c(demokext.o)
10 00000000 PR LD S7 .demokext
11 00000210 PR LD S8 .close_log
12 00000264 PR LD S9 .write_log
13 000002F4 PR LD S10 .open_log
14 00000360 000108 5 PR SD S11 .strcpy strcpy.s(/usr/lib/libcsys.a[strcpy.o])
15 00000468 000028 2 GL SD S12 <.sprintf> glink.s(/usr/lib/glink.o)
16 00000468 GL LD S13 .sprintf
17 00000490 000028 2 GL SD S14 <.fp_close> glink.s(/usr/lib/glink.o)
18 00000490 GL LD S15 .fp_close
19 000004C0 0000F8 5 PR SD S16 .strlen strlen.s(/usr/lib/libcsys.a[strlen.o])
20 000005B8 000028 2 GL SD S17 <.fp_write> glink.s(/usr/lib/glink.o)
21 000005B8 GL LD S18 .fp_write
22 000005E0 000028 2 GL SD S19 <.fp_open> glink.s(/usr/lib/glink.o)
23 000005E0 GL LD S20 .fp_open
24 00000000 0000F9 3 RW SD S21 <_$STATIC> demokext.c(demokext.o)
25 E 000000FC 000004 2 RW SD S22 demokext_j demokext.c(demokext.o)
26 * 00000100 00000C 2 DS SD S23 demokext demokext.c(demokext.o)
27 0000010C 000000 2 T0 SD S24 <TOC>
28 0000010C 000004 2 TC SD S25 <_$STATIC>
29 00000110 000004 2 TC SD S26 <_system_configuration>
30 00000114 000004 2 TC SD S27 <demokext_j>
31 00000118 000004 2 TC SD S28 <sprintf>
32 0000011C 000004 2 TC SD S29 <fp_close>
33 00000120 000004 2 TC SD S30 <fp_write>
34 00000124 000004 2 TC SD S31 <fp_open>
In the above map file, the .data section begins at the statement for line 24:
24 00000000 0000F9 3 RW SD S21 <_$STATIC> demokext.c(demokext.o)
main(argc,argv)
int argc;
char *argv[];
{
char path[NAME_SIZE];
char libpath[LIBPATH_SIZE];
char buf[BUFLEN];
struct cfg_kmod cfg_kmod;
struct extparms extparms = {argc,argv,buf,BUFLEN};
int option = 1;
int status = 0;
/*
* Load the demo kernel extension.
*/
memset(path, 0, sizeof(path));
memset(libpath, 0, sizeof(libpath));
strcpy(path, "./demokext");
cfg_load.path = path;
cfg_load.libpath = libpath;
if (sysconfig(SYS_KLOAD, &cfg_load, sizeof(cfg_load)) == CONF_SUCC)
{
printf("Kernel extension ./demokext was succesfully loaded, kmid=%x\n",
cfg_load.kmid);
}
else
{
printf("Encountered errno=%d loading kernel extension %s\n",
errno, cfg_load.path);
exit(1);
}
/*
* Loop alterantely allocating and freeing 16K from memory.
*/
option = 1;
while (option != 0)
330 AIX Version 6.1: KDB kernel debugger and kdb command
{
printf("\n\n");
printf("0. Quit and unload kernel extension\n");
printf("1. Configure kernel extension - increment counter\n");
printf("2. Configure kernel extension - decrement counter\n");
printf("\n");
printf("Enter choice: ");
scanf("%d", &option);
switch (option)
{
case 0:
break;
case 1:
bzero(buf,BUFLEN);
strcpy(buf,"sample string");
cfg_kmod.kmid = cfg_load.kmid;
cfg_kmod.cmd = 1;
cfg_kmod.mdiptr = (char *)&extparms;
cfg_kmod.mdilen = sizeof(extparms);
if (sysconfig(SYS_CFGKMOD,&cfg_kmod, sizeof(cfg_kmod))==CONF_SUCC)
{
printf("Kernel extension %s was successfully configured\n",
cfg_load.path);
}
else
{
printf("errno=%d configuring kernel extension %s\n",
errno, cfg_load.path);
}
break;
case 2:
bzero(buf,BUFLEN);
strcpy(buf,"sample string");
cfg_kmod.kmid = cfg_load.kmid;
cfg_kmod.cmd = 2;
cfg_kmod.mdiptr = (char *)&extparms;
cfg_kmod.mdilen = sizeof(extparms);
if (sysconfig(SYS_CFGKMOD,&cfg_kmod, sizeof(cfg_kmod))==CONF_SUCC)
{
printf("Kernel extension %s was successfully configured\n",
cfg_load.path);
}
else
{
printf("errno=%d configuring kernel extension %s\n",
errno, cfg_load.path);
}
break;
default:
printf("\nUnknown option\n");
break;
}
}
/*
* Unload the demo kernel extension.
*/
if (sysconfig(SYS_KULOAD, &cfg_load, sizeof(cfg_load)) == CONF_SUCC)
{
printf("Kernel extension %s was successfully unloaded\n", cfg_load.path);
}
else
{
printf("errno=%d unloading kernel extension %s\n", errno, cfg_load.path);
}
}
/* Unexported symbol */
int demokext_i = 9;
/* Exported symbol */
int demokext_j = 99;
/*
* Kernel extension entry point, called at config. time.
*
* input:
* cmd - unused (typically 1=config, 2=unconfig)
* uiop - points to the uio structure.
*/
int
demokext(int cmd, struct uio *uiop)
{
int rc;
char *bufp;
struct file *fpp;
int fstat;
char buf[100];
int bytes_written;
static int j = 0;
/*
* Open the log file.
*/
strcpy(buf, "./demokext.log");
fstat = open_log(buf, &fpp);
if (fstat != 0) return(fstat);
/*
* Put a message out to the log file.
*/
strcpy(buf, "demokext was called for configuration\n");
fstat = write_log(fpp, buf, &bytes_written);
if (fstat != 0) return(fstat);
/*
* Increment or decrement j and demokext_j based on
* the input value for cmd.
*/
{
switch (cmd)
{
case 1: /* Increment */
sprintf(buf, "Before increment: j=%d demokext_j=%d\n",
j, demokext_j);
write_log(fpp, buf, &bytes_written);
demokext_j++;
332 AIX Version 6.1: KDB kernel debugger and kdb command
j++;
sprintf(buf, "After increment: j=%d demokext_j=%d\n",
j, demokext_j);
write_log(fpp, buf, &bytes_written);
break;
case 2: /* Decrement */
sprintf(buf, "Before decrement: j=%d demokext_j=%d\n",
j, demokext_j);
write_log(fpp, buf, &bytes_written);
demokext_j--;
j--;
sprintf(buf, "After decrement: j=%d demokext_j=%d\n",
j, demokext_j);
write_log(fpp, buf, &bytes_written);
break;
/*
* Close the log file.
*/
fstat = close_log(fpp);
if (fstat !=0 ) return(fstat);
return(0);
}
/***************************************************
* Routines for logging debug information: *
* open_log - Opens a log file *
* write_log - Output a string to a log file *
* close_log - Close a log file *
***************************************************/
int open_log (char *path, struct file **fpp)
{
int rc;
rc = fp_open(path, O_CREAT | O_APPEND | O_WRONLY,
S_IRUSR | S_IWUSR, 0, SYS_ADSPACE, fpp);
return(rc);
}
#endif /* _demo */
334 AIX Version 6.1: KDB kernel debugger and kdb command
Notices
This information was developed for products and services that are offered in the USA.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program,
or service that does not infringe any IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or
service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can send
license inquiries, in writing, to:
For license inquiries regarding double-byte character set (DBCS) information, contact the IBM Intellectual
Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some
states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this
statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in
any manner serve as an endorsement of those websites. The materials at those websites are not part of
the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
IBM Corporation
Dept. LRAS/Bldg. 903
11501 Burnet Road
Austin, TX 78758-3400
USA
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this document and all licensed material available for it are provided
by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or
any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be the
same on generally available systems. Furthermore, some measurements may have been estimated through
extrapolation. Actual results may vary. Users of this document should verify the applicable data for their
specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without
notice. Dealer prices may vary.
This information is for planning purposes only. The information herein is subject to change before the
products described become available.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be
liable for any damages arising out of your use of the sample programs.
336 AIX Version 6.1: KDB kernel debugger and kdb command
Each copy or any portion of these sample programs or any derivative work, must include a copyright
notice as follows:
Portions of this code are derived from IBM Corp. Sample Programs.
© Copyright IBM Corp. _enter the year or years_. All rights reserved.
This Software Offering does not use cookies or other technologies to collect personally identifiable
information.
If the configurations deployed for this Software Offering provide you as the customer the ability to collect
personally identifiable information from end users via cookies and other technologies, you should seek
your own legal advice about any laws applicable to such data collection, including any requirements for
notice and consent.
For more information about the use of various technologies, including cookies, for these purposes, see
IBM’s Privacy Policy at http://www.ibm.com/privacy and IBM’s Online Privacy Statement at
http://www.ibm.com/privacy/details the section entitled “Cookies, Web Beacons and Other
Technologies” and the “IBM Software Products and Software-as-a-Service Privacy Statement” at
http://www.ibm.com/software/info/product-privacy.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the web at
Copyright and trademark information at www.ibm.com/legal/copytrade.shtml.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Notices 337
338 AIX Version 6.1: KDB kernel debugger and kdb command
Index
Special characters breakpoints (continued)
subcommands (continued)
! 40 lcl 78
? 7 r 79
* 9 return 79
[ 84 brk 76
@ 7, 9 brkpoint subroutine 3
bt 83
btac 88
A bucket 226
address translation buf 233
subcommands buffer 233
ibat 177 building
mdbat 178 demonstration program 326
mibat 179 buserr 93
mslb 176 businfo 95
slb 175
tr 174, 177
tv 174 C
ames 122 c 78
apt 123 ca 78
assembler listing 327 calculator
subcommands 49
cal 49
B conv 50
b 76 dcal 49
B 80 hcal 49
basic display cat 85
subcommands 51 cc 327
f 52 cdt 276
pr 56 change context
print 56 subcommands 43
stack 52 context 46
stat 55 cpu 45
status 55 ctx 46
symptom 59 runcpu 48
where 52 sw 43
bdev 319 switch 43
bmb 261 check 279
bmblk 261 cl 78
bmblock 261 cla 316
bosboot 3 class 316
bqueue 322 clk 288
branch target command line
subcommands 87 editing 10
btac 88 commands
ctac 88 entering
lbtac 88 KDB kernel debugger 3
lcbtac 88 compiler
breakpoint list file 327
setting 18 context 46
breakpoints context information, display
subcommands 76 subcommands 186
b 76 cr 206
brk 76 cred 210
c 78 crid 206
ca 78 lastbackt 191
cl 78 lockq 206
gt 79 lq 206
lb 77 meml 209
lc 78 memlock 209
340 AIX Version 6.1: KDB kernel debugger and kdb command
display general file system information (continued) display memory allocation information
subcommands (continued) subcommands
hno 251 bucket 226
hnode 251 hp 219
hvcache 243 kmbucket 226
hvnc 243 kmstats 227
icache 241 xm 223
ino 238 xmalloc 223
inode 238 display NFS information
jfsnode 252 subcommands
jno 252 cupboard 267
kfs 253 sockcup 268
kfset 253 sockpint 268
kvn 232 svcxprt 269
mount 245 display storage subsystem information
ncache 229 subcommands
specno 247 lvol 215
specnode 247 pbuf 212
vcache 242 pvol 215
vfs 245 scd 216
vnc 242 scdisk 216
vno 244 volgrp 213
vnode 244 display VMM
display j2 file system information subcommands
subcommands ames 122
bmb 261 apt 123
bmblk 261 drl 172
bmblock 261 drlist 172
dt 256 framset 125
dtree 256 free 126
i2 254 freelist 126
inode2 254 frs 125
j2log 264 ipc 127
j2logbuf 263 ksp 153
j2logx 264 lka 131
j2no 262 lkh 132
jfs2node 262 lkw 132
pgbuf 258 lockanch 131
pgobj 258 lockhash 132
pile 265 lockword 132
slab 266 lrustate 173
tree 255 memp 133
txblk 259 mempool 133
txblki 260 pdt 135
txblock 259 pfhdata 136
txblocki 260 pft 138
txlck 260 pta 144
txlock 260 pte 145
xt 257 pvlist 142
xtree 257 pvt 142
display kernel data structures rmap 146
subcommands rtipc 128
dev 100 rtipcd 129
devsw 100 rvsid 147
drvars 98 scb 148
intr 101 segst64 151
ipl 99 sidd 170
iplcb 99 sidm 170
var 97 sr64 151
zproc 171 ste 154
display key mappings information swhat 141
subcommands tblk 131
hkeymap 211 vl 163
hkeyset 211 vmaddr 157
kkeymap 210 vmbufst 156
kkeyset 212 vmdmap 158
vmint 159
Index 341
display VMM (continued) editing
subcommands (continued) command line 10
vmker 161 emacs 10
vmlock 163 gmacs 10
vmlocks 163 vi 11
vmlog 165 emacs 10
vmpool 165 enabling KDB kernel debugger
vmstat 167 AIX 5.1 3
vmthrpgio 168 end user
vmwait 168 subcommands 32
vrld 169 ! 40
vsidd 170 dbgopt 36
vsidm 170 debug 39
display_stack_frames 16 h 32
display, basic hi 38
subcommands 51 his 38
f 52 hist 38
pr 56 set 33
print 56 setup 33
stack 52 varlist 37
stat 55 varrm 38
status 55 varset 36
symptom 59 error log
where 52 subcommands 272
displaying system images cdt 276
for examining a dump check 279
using kdb command 324 ctctrl 280
dla 289 errlg 284
dlk 288 errpt 278
dmptrc 287 trace 273
dnlc 229 trc 282
dp 60 errpt 278
dpc 62 example files
dpcib 91 kernel extension 326
dpcih 91 exp 185
dpciw 91 expressions 9
dpd 60 ext 69
dpw 60 extp 69
dr 13, 63 extract
drl 172 subcommands 67
drlist 172
drvars 98
dt 256
dtree 256
F
f 52
dump 60
fb 235
subcommands 272
fbuffer 235
cdt 276
fifono 250
check 279
fifonode 250
ctctrl 280
file 236
dmptrc 287
find 67
errpt 278
findp 67
ldmp 284
fino 241
trace 273
frameset 125
trc 282
free 126
dump time trace
freelist 126
subcommands
frs 125
dmptrc 287
dump, examining
displaying system images
using kdb command 324 G
dw 4, 60 g 3, 13, 41
dw demokext_j 11 general file system information, display
subcommands
buf 233
E buffer 233
devno 248
e 41
devnode 248
342 AIX Version 6.1: KDB kernel debugger and kdb command
general file system information, display (continued) help
subcommands (continued) online 6
dnlc 229 hi 38
fb 235 hino 240
fbuffer 235 hinode 240
fifono 250 his 38
fifonode 250 hist 38
file 236 hkeymap 211
fino 241 hkeyset 211
gfs 236 HMC 4
gno 235 hno 251
gnode 235 hnode 251
hb 234 hvcache 243
hbuffer 234 hvnc 243
hdnlc 230
hino 240
hinode 240
hno 251
I
i2 254
hnode 251
ibat 177
hvcache 243
icache 241
hvnc 243
ifnet 290
icache 241
information, display context
ino 238
subcommands 186
inode 238
cr 206
jfsnode 252
cred 210
jno 252
crid 206
kfs 253
lastbackt 191
kfset 253
lockq 206
kvn 232
lq 206
mount 245
meml 209
ncache 229
memlock 209
specno 247
mst 189
specnode 247
pnda 187
vcache 242
ppda 188
vfs 245
ppid 199
vnc 242
pr_pid 199
vno 244
pr_tid 200
vnode 244
ptid 200
general information, display file system
rq 203
subcommands 229
rqa 204
generating
rqi 204
list files 327
runq 203
map files 327
svmon 207
gfs 236
th_pid 202
global data
th_tid 201
modifying 11
tpid 202
map file 14
ttid 201
symbol name 11
information, display general file system
TOC and map file 12
subcommands 229
viewing 11
buf 233
map file 14
buffbuffer 235
symbol name 11
buffer 233
TOC and map file 12
devno 248
gmacs 10
devnode 248
gno 235
dnlc 229
gnode 235
fb 235
gt 79
fifono 250
fifonode 250
file 236
H fino 241
h 32, 33 gfs 236
halt 42 gno 235
hb 234 gnode 235
hbuffer 234 hb 234
hcal 13, 49 hbuffer 234
hdnlc 230 hdnlc 230
hino 240
Index 343
information, display general file system (continued) information, display storage subsystem (continued)
subcommands (continued) lvol 215
hinode 240 pbuf 212
hno 251 pvol 215
hnode 251 scd 216
hvcache 243 scdisk 216
hvnc 243 volgrp 213
icache 241 information, memory allocation subsystem
ino 238 subcommands
inode 238 bucket 226
jfsnode 252 hp 219
jno 252 kmbucket 226
kfs 253 kmstats 227
kfset 253 xm 223
kvn 232 xmalloc 223
mount 245 ino 238
ncache 229 inode 238
specno 247 inode2 254
specnode 247 intr 101
vcache 242 introduction
vfs 245 kdb command 4
vnc 242 KDB kernel debugger 2
vno 244 invoking
vnode 244 kdb command 5
information, display j2 file system ipc 127
subcommands 254 ipl 99
bmb 261 iplcb 99
bmblk 261
bmblock 261
dt 256
dtree 256
J
j2 file system information, display
i2 254
subcommands 254
inode2 254
bmb 261
j2log 264
bmblk 261
j2logbuf 263
bmblock 261
j2logx 264
dt 256
j2no 262
dtree 256
jfs2node 262
i2 254
pgbuf 258
inode2 254
pgobj 258
j2log 264
pile 265
j2logbuf 263
slab 266
j2logx 264
tree 255
j2no 262
txblk 259
jfs2node 262
txblki 260
pgbuf 258
txblock 259
pgobj 258
txblocki 260
pile 265
txlck 260
slab 266
txlock 260
tree 255
xt 257
txblk 259
xtree 257
txblki 260
information, display key mappings
txblock 259
subcommands
txblocki 260
hkeymap 211
txlck 260
hkeyset 211
txlock 260
kkeymap 210
xt 257
kkeyset 212
xtree 257
information, display memory allocation
j2log 264
subcommands 219
j2logbuf 263
information, display NFS
j2logx 264
subcommands 267
j2no 262
cupboard 267
jfs2node 262
sockcup 268
jfsnode 252
sockpint 268
jno 252
svcxprt 269
information, display storage subsystem
subcommands 212
344 AIX Version 6.1: KDB kernel debugger and kdb command
K lkh 132
lkw 132
kdb command 324 lle 183
introduction 1 loader
KDB Debugger trace subcommands 179
subcommands 82 exp 185
KDB kernel debugger lke 180
example files 330, 332, 333, 334 lle 183
introduction 1 rmst 180
subcommands 22 stbl 180
kernel data structures, display loading KDB kernel debugger
subcommands 97 AIX 5.1 3
drvars 98 lock
var 97 subcommands 288
kernel extension example files 326 clk 288
kernel process table dla 289
subcommands dlk 288
proc 192 lk 288
thread 195 slk 288
user 198 lockanch 131
key lockhash 132
sequence 10 lockq 206
key mappings information, display lockword 132
subcommands lq 206
hkeymap 211 lru 173
hkeyset 211 lrustate 173
kkeymap 210 lvol 215
kkeyset 212 lwr 86
kfs 253 lwrw 86
kfset 253 lww 86
kkeymap 210
kkeyset 212
kmbucket 226
kmid 20 M
kmstats 227 m 70
ksp 153 map file 328
kvn 232 map files
generating 327
mathematical
L operators 9
mbuf 300
lastbackt 191 md 70
lb 77 mdbat 178
lbrk 77 mdpb 73
lbtac 88 mdpd 73
lc 78 mdph 73
lcbtac 88 mdvb 73
lcl 78 mdvd 73
lcw 86 mdvh 73
ld 329 mdvw 73
ldmp 284 meml 209
leave kdb memlock 209
subcommands 41 memory allocation information, display
e 41 subcommands 219
g 41 bucket 226
halt 42 hp 219
q 41 kmbucket 226
reboot 42 kmstats 227
list file xm 223
compiler 327 xmalloc 223
list files memory modification 12
generating 327 subcommands 70, 73
live dump m 70
subcommands md 70
ldmp 284 mdpb 73
lk 288 mdpd 73
lka 131 mdph 73
lke 18, 180 mdpw 73
Index 345
memory modification (continued) mode
subcommands (continued) edit 10
mdvb 73 modifying
mdvd 73 global data 11
mdvh 73 map file 14
mdvw 73 symbol name 11
miob 73 TOC and map file 12
miod 73 more 6
mioh 73 mount 245
miow 73 mp 70
mp 70 mpcib 92
mpd 70 mpcih 92
mpw 70 mpciw 92
mr 74 mpd 70
mtrace 274 mpw 70
mw 70 mr 74
st 72 mslb 176
stc 72 mst 189
sth 72 mtrace 274
memory register multiprocessor
subcommands 60 system
d 60 number 11
dc 62 mw 70
dd 60
ddpb 66
ddpd 66
ddph 66
N
n 80
ddpw 66
namelist
ddvb 66
subcommands 89
ddvd 66
ncache 229
ddvh 66
ndd 304
ddvw 66
net
decode 63
subcommands
di 63
ifnet 290, 304
diob 66
mbuf 300
diod 66
netm 301
dioh 66
netstat 306
diow 66
nsdbg 305
dis 62
route 307
dp 60
rtentry 310
dpc 62
rxnode 311
dpd 60
sctpcb 297
dpw 60
si 302
dr 63
sock 295
dump 60
sockinfo 302
dw 60
tcb 292
m 70
tcpcb 299
md 70
tcpdbg 313
mp 70
udb 293
mpd 70
netm 301
mpw 70
netstat 306
mw 70
network
memory, extract
subcommands 290
subcommands
NFS information, display
ext 69
subcommands 267
extp 69
cupboard 267
memory, search
sockcup 268
subcommands
sockpint 268
find 67
svcxprt 269
findp 67
nm 89
memp 133
ns 90
mempool 133
nsdbg 305
mibat 179
miob 73
miod 73
mioh 73
miow 73
346 AIX Version 6.1: KDB kernel debugger and kdb command
O runcpu 48
runq 203
offsets 328 rvsid 147
online help 6 rxnode 311
P S
pause 10 s 80
pbuf 212 S 80
PCI scb 148
subcommands scd 216
buserr 93 scdisk 216
businfo 95 screen size 6
dpcib 91 scroll 6
dpcih 91 sctpcb 297
dpciw 91 search
mpcib 92 subcommands 67
mpcih 92 segst64 151
mpciw 92 sequence
pdt 135 key 10
pfhdata 136 set 10, 33
pft 138 setting
pgbuf 258 breakpoint 18
pgobj 258 setup 33
pile 265 si 302
pnda 187 sidd 170
ppda 188 sidm 170
ppid 199 slab 266
pr 56 slb 175
pr_pid 199 slk 288
pr_tid 200 sock 295
print 56 sockcup 268
prompt sockinfo 302
debugger 6 sockpint 268
pta 144 specno 247
pte 145 specnode 247
ptid 200 sr64 151
pvlist 142 st 72
pvol 215 stack 52
pvt 142 stack frame format 15
stack trace
view 15
Q start 50
q 41 starting KDB kernel debugger
AIX 5.1 3
stat 55
R status 55
stbl 180
r 79 stc 72
reboot 42 ste 154
recursive steps
dereference 9 subcommands 76
registers 7 b 80
repeat count 10 B 80
resume 10 s 80
return 79 S 80
rmap 146 sth 72
rmst 180 stop 50
route 307 storage class 328
rq 203 storage subsystem information, display
rqa 204 subcommands 212
rqi 204 lvol 215
rtentry 310 pbuf 212
rtipc 128 pvol 215
rtipcd 129 scd 216
rule 322 scdisk 216
rules 322 volgrp 213
Index 347
strlen 15 symbols (continued)
subcommand category subcommands (continued)
address translation 174 ns 90
basic display 51 ts 89
branch target 87 wf 90
breakpoints 76 which 90
calculator 49 symptom 59
change context 43 system dump
convertor 49 subcommands 272
CPU 50 cdt 276
DABR 86 check 279
display ctctrl 280
context information 186 errpt 278
general information 229 trace 273
information, context 186 trc 282
information, general file system 229 system error log
information, j2 file system 254 subcommands 272
information, memory allocation 219 cdt 276
information, NFS 267 check 279
information, storage subsystem 212 ctctrl 280
j2 file system information 254 errpt 278
kernel data structures 97 trace 273
memory allocation information 219 trc 282
NFS information 267 system hang 4
storage subsystem information 212 system images, displaying
VMM 122 for examining a dump
dump 272 using kdb command 324
end user 32 system trace
error log 272 subcommands 272
extract 67 cdt 276
KDB Debugger trace check 279
[ 84 ctctrl 280
bt 83 errpt 278
cat 85 trace 273
ct 85 trc 282
test 84
KDB Debugger trace points 82
leave 41
loader 179
T
tblk 131
lock 288
tcb 292
memory modification 70
tcpcb 299
memory register 60
tcpdbg 313
namelist 89
terminal 4
network 290
test 84
PCI 91
th_pid 202
search 67
th_tid 201
steps 76
time 270
symbols 89
subcommands 270
system dump 272
time 270
system error log 272
trb 271
system trace 272
tpid 202
time 270
tr 174
trace points 82
trace 273
trc 272
subcommands
watch 86
cdt 276
WLM 316
check 279
WPAR 323
ctctrl 280
subcommands
errpt 278
errlg 284
trace 273
svcxprt 269
trace points
svmon 207
subcommands 82
sw 43
translation, address
swhat 141
subcommands 174
switch 43
trb 271
symbols
trc 282
subcommands 89
subcommands 272
nm 89
trc 282
348 AIX Version 6.1: KDB kernel debugger and kdb command
tree 255 VMM, display (continued)
ts 89 subcommands (continued)
ttid 201 mempool 133
tv 174 pdt 135
txblk 259 pfhdata 136
txblki 260 pft 138
txblock 259 pta 144
txblocki 260 pte 145
txlck 260 pvlist 142
txlock 260 pvt 142
rmap 146
rtipc 128
U rtipcd 129
rvsid 147
udb 293
scb 148
unload
segst64 151
demokext 334
sidd 170
user-defined
sidm 170
variables 9
sr64 151
ste 154
swhat 141
V tblk 131
values vl 163
register 7 vmaddr 157
var 97 vmbufst 156
variables vmdmap 158
user-defined 9 vmint 159
varlist 9, 37 vmker 161
varrm 9, 38 vmlock 163
varset 9, 36, 37 vmlocks 163
vcache 242 vmlog 165
vfs 245 vmpool 165
vi 11 vmstat 167
viewing vmthrpgio 168
global data 11 vmwait 168
map file 14 vrld 169
symbol name 11 vsidd 170
TOC and map file 12 vsidm 170
vl 163 vmpool 165
vmaddr 157 vmstat 167
vmbufst 156 vmthrpgio 168
vmdmap 158 vmwait 168
vmint 159 vnc 242
vmker 161 vno 244
vmlock 163 vnode 244
vmlocks 163 volgrp 213
vmlog 165 vrld 169
VMM, display vsidd 170
subcommands 122 vsidm 170
ames 122
apt 123
drl 172
drlist 172
W
watch
frameset 125
subcommands 86
free 126
cw 86
freelist 126
lcw 86
frs 125
lwr 86
ipc 127
lwrw 86
ksp 153
lww 86
lka 131
wr 86
lkh 132
wrw 86
lkw 132
ww 86
lockanch 131
wf 90
lockhash 132
where 52
lockword 132
which 90
lrustate 173
WLM
memp 133
subcommands 316
Index 349
WLM (continued)
bdev 319
bqueue 322
cla 316
class 316
rule 322
rules 322
wlm_bdev 319
wlm_bq 322
wlm_bdev 319
wlm_bq 322
workload partitions
subcommands
wp 323
wp 323
WPAR
subcommands 323
wr 86
wrw 86
ww 86
X
xm 223
xmalloc 223
xt 257
xtree 257
Z
zproc 171
350 AIX Version 6.1: KDB kernel debugger and kdb command
Printed in USA