[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3


iadb Command

Purpose

Dump file Analyzer and live system probe.

Syntax

iadb [ -u File ] [ -d Dump_File ]

Description

The iadb command provides dump analysis to help in diagnosing system crashes and can also be used to probe a live system. When a system crash occurs, the dump module creates a dump file (if configured). Later, users identify the dump file and use iadb to analyze the dump causes and environment. iadb works as an interactive tool providing a prompt. User can type in the various iadb subcommands to perform the necessary debugging operations.

Note: The iadb subcommands and the their syntax are similar to Kernel debugger IADB. Not all IADB subcommands are implemented in iadb. Also there are new subcommands in iadb(related to dump file) which do not exist in IADB.

The default kernel file used for symbol processing is /unix. The iadb retrieves symbols from /unix and also from the loaded kernel extensions.

Note: In the case of dump file, symbol searches on the loaded kernel extension modules takes time (due to delays in file accesses). So a command in iadb provides you with an opportunity to cache in the symbols for a loaded kernel extension. Similarly you can remove the module's symbols from symbol resolve sequence.

Differences between IADB and iadb

Relation between iadb, kdb or crash

iadb is a different from the kdb command and crash. iadb supports commands, which achieve functionality, which may also be present in kdb and crash. iadb subcommands follow the syntax of commands in IADB, the kernel debugger in AIX/Itanium-based environment.

Flags


-u File Specifies the File to use for system analysis. If this flag is not specified the default file is used for analysis.
-d Dump_File Specifies the Dump_File to be used for analysis. The Dump_Fileis a valid dump file and is taken on the AIX/Itanium-based system corresponding to the File specified with the -u flag.

Subcommand Arguments

The following table describes the most common argument types referenced in the subcommand syntax diagrams that follow.

Argument Description
* A wildcard used to select all entries.
count A hex constant specifying the number of times to perform a specific operation.
cpu A decimal value specifying a cpu number in a SMP machine.
eaddr Effective address. This may be a hex constant or an expression.
paddr A physical address.
pid A hex constant or expression specifying a process ID.
selection Indicates that a menu is displayed from which a selection must be made.
slot A decimal constant specifying a slot number within a table.
symb A symbolic reference to a value. Symbols from the kernel and/or kernel extensions may be used.
tid A hex constant or expression specifying a thread ID.
tslot A decimal constant specifying a slot number within the thread table.

iadb Subcommands

Summary

Memory Display


d Display Virtual Memory.
dis Disassemble memory.

Register Display


b Display branch registers.
cfm Display Current Stacked Register
fpr Display FPR(s) (f0 - f127)
iip Display Instruction Pointer
iipa Display Instruction Previous Address
ifa Display fault address
p Display Predicate register(s)
r Display General registers
rse Display Register Stack Registers

Status


cpu Switch context to a cpu.
reason Display Reason for command iadb invocation.
stat Display System information/Crash information
sw Switch to a Thread
sys Display System Information
t Stack traceback

Structures Display/Modification


dev Display Device Switch Table
heap Heap Structures Display
intrh Display Interrupt Handler Table/Structures
iplcb Display IPL Control Block
kext Display Loaded Kernel Extensions
mltrace Dump Internal Per-CPU Trace Buffer
mst Display Machine State Stack
lock Display Lock Structures/List
pnda Display pnda structure
ppda Display Per Processor Descriptor Area
pr Process Display
pvpr PvProcess Structure Display
pvth PvThread Structure Display
th Thread Display
us User Structure Display
ut Uthread Structure Display
xm Xmalloc Internal Structures Display

Symbols and Translation


map Map Address to Symbol or Symbol to Address
nm Map a Symbol to an effective address
ns Map an address to the closest Symbol
ldsyms Load symbols for a module
unldsyms Unload symbols for a module

Dump File Access/Display


cdt Display CDT and its data areas.

General


! Shell escape
dcal Decimal Calculator
hcal Hex Calculator
help Command Listing/Command Help (help [command])
his Command history
quit Quit command iadb. Aliases are : go, q
set Display/Set Debugger Parameters

Detailed Information:

Detailed information about the various commands supported by command iadb follows in the next section. These commands are described in an ascending order w.r.t. command names.

! Command

Shell Escape. User can invoke system commands from the iadb command prompt using this support. command is an operating system supported CLI based command. For example:
! ls ! cat /.rhosts
b [ reg_no ]

Display/Set Branch Register(s). regno is the branch register number (0 - 7) and value is a new value to set. For example:

To display all Branch Registers.

b

To display Branch Register b6.

b6
cdt [ [ -d ] cdt_number [cdt_entry] ]

The cdt subcommand displays information about Component Dump Tables (CDTs) or views the data for a component dump entry for a dump. The dump routines must be located in the directory indicated in the directory /usr/lib/ras/dmprtns/. The name of the dump formatter executable should be the same as the component being dumped. If the executable by the component's name is not found then the default dump formatter is invoked (dmpfmt executable in /usr/lib/ras/dmprtns/ directory). cdt_ number is the CDT index to display, and cdt_entry is the data area in the CDT index to display. For example:

To display the 5th data areas of the component entry 4

cdt 4 5
 
cfm 
  Display Current Stacked Register. For example:
cfm
cpu [ num ]
  Display CPU status or Change debugging CPU. num is the cpu number to switch to. For example:

To switch back to the original/base cpu

cpu

To switch to the current thread on cpu 2

cpu 2
d address | ordinal [ number ]

Display Virtual Memory. address is the address or symbol to dump, ordinal is the number of byte access (1,2,4,or 8), and number is the number of elements to dump (of size ordinal ). For example:

To display 20 4-byte words from address foo-20:

d foo-20 4 20

To display single 8-byte doubleword from address 0x1234:

d (r32) 8 2
dcal expression_in_decimal

Decimal Calculator. For example:
dcal 2+3*4
dev [ major_number ]

Display Device Switch Table. major_number is the major number slot to display. For example:

To display entire switch table:

dev

To display switch table entries for major 21:

dev 21
dis symbol | address [ count ]
  Disassemble instructions from address of the input symbol or from the provided address. symbol and address is the address or symbol to disassemble, count is the number of bundles to disassemble. For example:

To disassemble 20 Bundles From 'foo':

dis foo 20

To disassemble 20 Bundles from 'foo':

dis (b0)-10
fpr [ regno ]

Display FPR(s) (f0 - f121). regno is the fpr register number (0 - 127). For example:

To display all low FP Registers:

fpr

To display f15:

fpr 15
hcal expression_in_hexa_decimal

Decimal Calculator. For example:
hcal 2+3*a
heap [ -n { srad } [ address ] ] | [address ]

Display heap Information. n is the srad (or numa node) number. For example:

To display detailed info for default heap (numa kernel heap):

heap

To display detailed information for default numa heap for srad 1:

heap -n 1

To display detailed information for a heap at an address:

heap E000009710000000

To display detailed info for a numa heap at an address:

heap E0000000083849A8 

To display detailed info for numa heap for a node:

heap -n 0 kernel_heap
heap -n 0 E0000000083849A8
help [ cmd ]

Display a list of commands with short descriptions.cmd is the Command for which help is needed. For example:

To display debugger command List:

help

To display Help on the mltrace command:

 help mltrace
his [ ? ] [ count ]

Prints history of commands. count is the number of lines to display. For example:
his
ifa 
  Display fault address. For example:
ifa
iip 

Display or modify instruction pointer. For example:

To display instruction pointer:

 iip

To set the instruction pointer to foo:

iip foo

To increment current iip by 0x10:

iip (iip)+0x10
iipa

Display instruction previous address. For example:
iipa
intrh [ -l { level } ] | [-p { priority } ] | [-s { slot } ] | [-v { address } ]

Display interrupt handler information and table.-l specifies the interrupt level, -p specifies the interrupt priority level, -s specifies the slot of the interrupt handler, and -v specifies the address of the interrupt handler structure. For example:

To display interrupt handler table:

intrh 

To display interrupt handler table for level of 16 (0x10):

intrh -l 0x10

To display interrupt handler table for priority of 5:

intrh -p 5 

To display interrupt handler table for slot 16:

intrh -s 16

To display detailed info about an interrupt handler entry:

 intrh -v 0xE0000000085850B0
itc 

Display Time Registers ITC ITM and ITV. For example:
itc
 
iplcb 

Display IPL control block. For example:
iplcb
 
kext

Display loaded kernel extensions. For example:

To display all loaded kernel extensions and their text and data load addresses:

kext
kr [ regno ]
  Display kernel register(s). regno is the kernel register number (0 - 7). For example:

To display all kernel registers:

kr

To display kernel register 7:

kr 7
lock [ -c ] | [-i ] | [ -l ] | [ -s ] | [ -v { address } ]

Display Complex, Simple, and Lockl Locks List and Structure. The -c flag specifies a complex lock , -l specifics a simple (v3 style) lock, -i specifics instrumentation information about the lock (applies only to simple and complex locks), -s specifies a simple lock, and -v specifies the address of the lock.

Examples:

  1. To display list of all types (complex, simple, lockl) of locks:
    lock
    
  2. To display list of complex locks:
    lock -c
    
  3. To display list of lockl locks:
    lock -l
    
  4. To display list of simple locks:
    lock -s
    
  5. To display list of complex locks along with instrumentation information:
    lock -c -i 
    
  6. To display list of simple locks along with instrumentation information:
    lock -s -i
    
  7. To display a complex lock at an address:
    lock -c -v 0xE0000000085D1F30
    
  8. To display a lockl lock at an address:
    lock -l -v cons_lock
    
  9. To display a simple lock along with instrumentation information at an address:
    lock -s -i -v 0xE0000000083E1D70
    
ldsyms [ -p kernext_full_path ] kernext

Caches all the symbols related to the loaded kernel extension. kernext is the name of the kernel extension, and kernext_full_path is the name of the kernel extension including the complete path.

Examples:

  1. To load symbols for kernel extension module /usr/lib/drivers/lft_loadpin, use either:
     ldsyms lft_loadpin
    

    or

    ldsyms -p /usr/lib/drivers/lft_loadpin
    
map { symbol | address }

Map Address to Symbol or Symbol to Address. symbol is the symbol to show address for and address is the address to show symbol for.

Examples:

  1. To look up the symbol for address in r34:
    map (r34)
    
  2. To look up symbol for address 0xe000000000000000:
    map 0xe000000000000000
    
  3. To lookup address for symbol 'foo' + 0x100:
    map foo+0x100
    
mltrace [ p<cpu ] [ entries ]
  Dump Internal Per-CPU Trace Buffer. cpu specifies the CPU (logical numbering) to dump the trace buffer for, and entries specifies the number of most recent entries to dump.

Examples:

  1. To dump the most recent 20 entries for the current CPU:
     mltrace 20
    
  2. To dump the entire trace buffer for logical CPU 5:
    mltrace p5
    
  3. To the dump last 10 entries for CPU 1:
    mltrace p1 10
    

Note: This feature is only available on development kernels (compiled with DEBUG).
mst [ addr ]

Display Machine State Stack. addr is the address of an MST to display.

Examples:

  1. To display current context being debugged:
     mst 
    
  2. To format the mst after 2 de-references off the contents of kr6, equivalent to csa-prev-prev
    mst (((kr6)))
    
  3. To format the contents of address as an mst:
    mst 0x3ff002ff3b400
    
p [ regno ]

Display/Set Predicate Register(s). regno is the predicate register number (0 - 63).

Examples:

  1. To display all predicate registers:
    P
    
  2. To display predicate register p6:
    p 6
    
pnda [ srad ]

Display Per Node Descriptor Area. srad specifies which srad's Per Node Descriptor Area (pnda) to display 

Examples:

  1. To display current srad's PNDA:
    pnda
    
  2. To display srad 3's PNDA:
    pnda 3
    
ppda [ cpu ]

Display Per Processor Descriptor Area. cpu specifies which CPU's ppda to display (logical numbering)

Examples:

  1. To display current CPU's PPDA:
    ppda
    
  2. To display CPU 3's PPDA:
    ppda 3
    
pr [ -p | -s | -v { value } ] [-a] [* ]

Display Process Structure information. -p { value } specifies process where PID = {value}, -s {value} specifies the process in slot {value}, -v {value} specifies the proc struct pointer = {value}, -aspecifies a detailed display for all processes, and * specifies a process table display.

Examples:

  1. To display the pv structure detail for current process:
    pr
    
  2. To display process table:
    pr *
    
  3. To display details for process in slot 3:
    pr -s 3
    
  4. To display details for process PID 0x204:
    pr -p 0x204
    
pvpr [ -p | -s | -v { value ] [ -a] [* ]
  Display PvProcess Structure information. -p { value } specifies process where PID = {value}, -s {value} specifies the process in slot {value}, -v {value} specifies the proc struct pointer = {value}, -aspecifies a detailed display for all processes, and * specifies a process table display.

Examples:

  1. To display the pv structure detail for current process:
    pvpr
    
  2. To display the process table:
    pvpr *
    
  3. To display details for process in slot 3:
    pvpr -s 3
    
  4. To display details for process PID 0x204:
    pvpr -p 0x204
    
pvth [ -p | -s | -v { value ] [ -a] [* ]
  Display PvThread Structure information. -p { value } specifies process where PID = {value}, -s {value} specifies the process in slot {value}, -v {value} specifies the proc struct pointer = {value}, -aspecifies a detailed display for all processes, and * specifies a process table display.

Examples:

  1. To display pvthread structure detail for current thread:
    pvth 
    
  2. To display pvthread table:
    pvth *
    
  3. To display details for thread in slot 3:
    pvth -s 3
    
  4. To display details for thread PID 0x204:
    pvth -t 0x204
    
q or quit or go

Exits from the iadb command.
r [ regno ]
  Display/Set General Register(s). regno specifies the gpr register number (0 - 127).

Examples:

  1. To display all general registers:
    r
    
  2. To display register r12:
    r 12
    
reason

Display the reason why the iadb command was invoked.
rse 

Display Register Stack Registers.
set [ parameter=value ]

Lists and manipulates iadb parameters.parameter=value could be:

symbol_scope={1|2}
Set the scope of symbol search. 1-kernel file only, 2-all possible areas. The default is for a live system:2, for a dump file:1

edit={vi|emacs|gmacs}
Set the edit mode of the iadb command. The default is vi.

disp_syms={0|1}
Set the display symbols flag. Commands like d do not display symbol. Default isdisp_syms=0.

more= {on|off}
Set more Configuration. Default is on.

rows= number
Set Number of rows on Current Display. Default is 25.

sw [ -s ][ -t ] [value ]

Switches context to a particular thread. -s specifics a thread slot number, -t specifies a thread id number.

Examples:

  1. To switch to original thread:
    sw 
    
  2. To switch to thread in slot 4:
    sw -s 4 
    
  3. To switch to thread with thread id of 0x402:
    sw -t 0x402
    
sys

Display System Information, such as:
  • Build level and build date
  • Number and type of processors
  • Memory size
  • Processor Speed
  • Bus Speed
t [ -s thread_slot ] [ -t thread_id ] [ -vthread_structure_pointer ]

Call Stack Trace. thread_slot specifies the thread slot for the requested stack trace, thread_id specifies the thread id for the requested stack trace, and thread_structure_pointer specifies the pointer to pvthread.

Examples:

  1. To display stack traceback for current context:
    t
    
  2. To display traceback for thread slot 2:
    t -s 2
    

Note:
  • Stack tracebacks are shown for all prior MSTs in the stack as well, that is, mst-prev, mst-prev-prev,...
  • The Current Frame of each function in the traceback is displayed. These frames represent the current frame at the time of the call. Since output registers are volatile, their contents may not have been preserved.
th [ -s { slot } | -t { tid } | -v { thrdptr } ] [ -a ] [ * ]

Display pthread structure. -s { slot } provides detailed thread information for thread in slot, -t { tid } provides detailed thread information for thread in tid, -v { thrdptr } provides detailed thread information for thread pointer thrdptr, -a provides detailed thread information for all threads, and * = displays thread table.

Examples:

  1. To display detailed info for current thread:
    th
    
  2. To display the entire thread table:
     th *
    
  3. To display detailed info for thread 0x103:
    th -t 0x103
    
unldsyms kernext
  Removes all the symbols of kernel extension from the cache. kernext must be the same string supplied as kernext during ldsyms.

Examples:

 unldsyms /usr/lib/drivers/lft_loadpin
xm [ -a ] [ -A ] [ size ] ] [ -c ] [ -C ] [ -d ] [ -D] [ -f ] [ -F ] [addr ] ] [ -h ] [ -H ] [ 0 ] [ 1 ] [ -l ] [ -p ] [ -s ] [ -S ] [ -u ] [-v ] [addr ]

Display Xmalloc Information (if xmdbg is enabled).

Where:

-a
Displays all allocation records

-A
Displays all allocation records

-A size
Displays allocation records of specified size.

-c
Displays count of records of each size.

-C
Display count of records from each call path.

-d
Prints debug xmalloc kernel allocation record hash chain that is associated with the record hash value for addr.

-D
Prints debug information

-f
Displays all free records.

-F
Displays all free records.

-F addr
Displays free records matching specified addr.

-h
Prints records in debug xmalloc kernel free list associated with addr.

-H 1
Hides all existing allocation records.

-H 0
Unhides currently hidden allocation records.

-l
Prints verbose information.

-p
Prints page descriptor information for page pageno.

-s
Prints debug xmalloc allocation records matching associated with addr.

-S
Prints page summary

-u
Prints xmalloc usage histogram.

-v
Verifies allocation trailers of allocated records and free fill patterns of freed records.

Examples:

xm 0xE000009717AE6010 
xm -l 0xE000009717AE6010 
xm -D 0xE000009717AE6010 
xm -l -D 0xE000009717AE6010 
xm -a 
xm -l -a 
xm -d 200 
xm -f 
xm -l -f
xm -h 0xE000009714125D00 
xm -l -p 2 
 xm -p 2  
xm -p 2 0xE000009710000000 
xm -s 0xE000009714056680
xm -l -s 0xE000009714056680
xm -D -s 0xE000009714056680 
xm -S 
xm -u 
xm -v

See also:

sysdumpdev, sysdumpstart, crash, kdb, IADB (Kernel debugger)

Security

Root permissions are required to run iadb on the active system.

Files:


/usr/sbin/iadb Is the iadb command. This file exists as part of the package bos.sysmgt
/dev/mem Kernel memory access character special file.
/unix Default kernel file.

Related Information

The sysdumpdev command, sysdumpstart command, kdb command.

Information mod and kdb in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]