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

Kernel Extensions and Device Support Programming Concepts

System Table Subcommands

var Subcommand

The var subcommand prints the var structure and the system configuration of the machine.

Syntax

 

var

Example

   KDB(7)> var print var information
   var_hdr.var_vers..... 00000000 var_hdr.var_gen...... 00000045
   var_hdr.var_size..... 00000030
   v_iostrun............ 00000001 v_leastpriv.......... 00000000
   v_autost............. 00000001 v_memscrub........... 00000000
   v_maxup..............      200
   v_bufhw..............       20 v_mbufhw.............    32768
   v_maxpout............        0 v_minpout............        0
   v_clist..............    16384 v_fullcore........... 00000000
   v_ncpus..............        8 v_ncpus_cfg..........        8
   v_initlvl............  0  0  0  0
   v_lock...............      200 ve_lock.............. 00D3FA18 flox+003200
   v_file...............     2303 ve_file.............. 0042EFE8 file+01AFD0
   v_proc...............   131072 ve_proc.............. E305D000 proc+05D000
   vb_proc.............. E3000000 proc+000000
   v_thread.............   262144 ve_thread............ E6046F80 thread+046F80
   vb_thread............ E6000000 thread+000000

   VMM Tunable Variables:

   minfree..............      120 maxfree..............      128
   minperm..............    12872 maxperm..............    51488
   pfrsvdblks...........    13076
   (7)> more (^C to quit) ? continue
   npswarn..............      512 npskill..............      128
   minpgahead...........        2 maxpgahead...........        8
   maxpdtblks...........        4 numsched.............        4
   htabscale............ FFFFFFFF aptscale............. 00000000
   pd_npages............ 00080000

   _SYSTEM_CONFIGURATION:

   architecture..... 00000002 POWER_PC
   implementation... 00000010 POWER_604
   version.......... 00040004
   width............ 00000020 ncpus............ 00000008
   cache_attrib..... 00000001 CACHE separate I and D
   icache_size...... 00004000 dcache_size...... 00004000
   icache_asc....... 00000004 dcache_asc....... 00000004
   icache_block..... 00000020 dcache_block..... 00000020
   icache_line...... 00000040 dcache_line...... 00000040
   L2_cache_size.... 00100000 L2_cache_asc..... 00000001
   tlb_attrib....... 00000001 TLB separate I and D
   itlb_size........ 00000040 dtlb_size........ 00000040
   itlb_asc......... 00000002 dtlb_asc......... 00000002
   priv_lck_cnt..... 00000000 prob_lck_cnt..... 00000000
   resv_size........ 00000020 rtc_type......... 00000002
   virt_alias....... 00000000 cach_cong........ 00000000
   model_arch....... 00000001 model_impl....... 00000002
   Xint............. 000000A0 Xfrac............ 00000003

devsw Subcommand

The devsw subcommand display device switch table entries.

Syntax

 

If no argument is specified, all entries are displayed. A major number can be specified to view the device switch table entry for the device; or an effective address can be specified to find the device switch table entry and driver that is closest to the address.

Aliases: dev

Example

   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

   Slot address 054F5080
   MAJ#002  OPEN            CLOSE           READ            WRITE
            .nulldev        .nulldev        .mmread         .mmwrite
            IOCTL           STRATEGY        TTY             SELECT
            .nodev          .nodev          00000000        .nodev
            CONFIG          PRINT           DUMP            MPX
            .nodev          .nodev          .nodev          .nodev
            REVOKE          DSDPTR          SELPTR          OPTS
            .nodev          00000000        00000000        00000002

   (0)> more (^C to quit) ? ^C quit
   KDB(0)> devsw 4 device switch of major 0x4
   Slot address 05640100
   MAJ#004  OPEN            CLOSE           READ            WRITE
            .conopen        .conclose       .conread        .conwrite
            IOCTL           STRATEGY        TTY             SELECT
            .conioctl       .nodev          00000000        .conselect
            CONFIG          PRINT           DUMP            MPX
            .conconfig      .nodev          .nodev          .conmpx
            REVOKE          DSDPTR          SELPTR          OPTS
            .conrevoke      00000000        00000000        00000006        

trb Subcommand

The trb subcommand displays Timer Request Block (TRB) information.

Syntax

 

trb

If this subcommand is entered without arguments a menu is displayed allowing selection of the data to be displayed. The data displayed in this case is for the current CPU.

The trb subcommand provides arguments to specify that data is to be displayed for all CPUs (*) or for a specific CPU (cpu x). If data is to be displayed for all CPUs, the display might be a summary, depending on the option selected.

Note
To display TRB data for a specific CPU, the argument must consist of the string cpu followed by the CPU number.

Aliases: timer

Example

   KDB(4)> trb timer request block subcommand usage
   Usage: trb [CPU selector] [1-9]
    CPU selector is '*' for all CPUs, 'cpu n' for CPU n, default is current CPU

   Timer Request Block Information Menu
     1. TRB Maintenance Structure - Routine Addresses
     2. System TRB
     3. Thread Specified TRB
     4. Current Thread TRB's
     5. Address Specified TRB
     6. Active TRB Chain
     7. Free TRB Chain
     8. Clock Interrupt Handler Information
     9. Current System Time - System Timer Constants
   Please enter an option number: <CR/LF>
   KDB(4)> trb * 6 print all active timer request blocks

   CPU #0 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689080 0000 0005 FFFFFFFE 00003BBA 23C3B080 05689080 sys_timer+000000
   05689600 0000 0003 FFFFFFFE 00003BBA 27DAC680 00000000 pffastsched+000000
   05689580 0000 0003 FFFFFFFE 00003BBA 2911BD80 00000000 pfslowsched+000000
   0B05A600 0000 0005 00001751 00003BBA 2ADBC480 0B05A618 rtsleep_end+000000
   05689500 0000 0003 FFFFFFFE 00003BBB 23186B00 00000000 if_slowsched+000000
   0B05A480 0000 0003 FFFFFFFE 00003BBF 2D5B4980 00000000 01B633F0

   CPU #1 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689100 0001 0005 FFFFFFFE 00003BBA 23C38E80 05689100 sys_timer+000000

   CPU #2 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689180 0002 0005 FFFFFFFE 00003BBA 23C37380 05689180 sys_timer+000000
   0B05A500 0002 0005 00001525 00003BE6 0CFF9500 0B05A518 rtsleep_end+000000

   CPU #3 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689200 0003 0005 FFFFFFFE 00003BBA 23C39F80 05689200 sys_timer+000000
   (4)> more (^C to quit) ? continue
   05689880 0003 0005 00000003 00003BBB 01B73180 00000000 sched_timer_post+000000
   0B05A580 0003 0005 00000001 00003BBB 0BCA7300 0000000E interval_end+000000

   CPU #4 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689280 0004 0005 FFFFFFFE 00003BBA 23C3A980 05689280 sys_timer+000000

   CPU #5 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689300 0005 0005 FFFFFFFE 00003BBA 23C39800 05689300 sys_timer+000000
   05689780 0005 0005 FFFFFFFF 00003BBF 1B052C00 05C62C40 01ADD6FC

   CPU #6 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689380 0006 0005 FFFFFFFE 00003BBA 23C3C200 05689380 sys_timer+000000

   CPU #7 Active List
             CPU  PRI       ID    SECS     NSECS     DATA FUNC
   05689400 0007 0005 FFFFFFFE 00003BBA 23C38180 05689400 sys_timer+000000
   05689680 0007 0003 FFFFFFFE 00003BBA 2DDD3480 00000000 threadtimer+000000
   KDB(4)> trb cpu 1 6 print active list of processor 1
   CPU #1 TRB #1 on Active List
    Timer address......................05689100
    trb->to_next.......................00000000
    trb->knext.........................00000000
    trb->kprev.........................00000000
    Owner id (-1 for dev drv)..........FFFFFFFE
    Owning processor...................00000001
    Timer flags........................00000013   PENDING ACTIVE INCINTERVAL
    trb->timerid.......................00000000
    trb->eventlist.....................FFFFFFFF
    trb->timeout.it_interval.tv_sec....00000000
    trb->timeout.it_interval.tv_nsec...00000000
    Next scheduled timeout (secs)......00003BBA
    Next scheduled timeout (nanosecs)..23C38E80
    Completion handler.................000B3BA4  sys_timer+000000
    Completion handler data............05689100
    Int. priority .....................00000005
    Timeout function...................00000000  00000000
    KDB(4)>

slk and clk Subcommands

The slk and clk subcommands print the specified simple or complex lock.

Syntax

 

slk [-q] [symbol | Address]

clk [-q] [symbol | Address]

If instrumentation is enabled at boot time, then instrumentation information is displayed. If either subcommand is entered without arguments, the current state of a predefined list of locks is displayed.

Aliases:

Example

   KDB(1)> slk B69F2DF0 print simple lock
   Simple Lock Instrumented: vmmdseg+69F2DF0
                     _slock: 00011C99  thread_owner: 0011C99
   .....acquisitions number:       16
   ...........misses number:        0
   ..sleeping misses number:        0
   ................lockname: 00FA097D  flox+206165
   ...link register of lock: 0007CFCC  .pfget+00023C
   ..........caller of lock: 00011C99
   ..........cpu id of lock: 00000002
   .link register of unlock: 0007D8EC  .pfget+000B5C
   ........caller of unlock: 00011C99
   ........cpu id of unlock: 00000002
   KDB(0)> clk ndd_lock print complex lock
   Complex Lock Instrumented: ndd_lock
   ...._clock.status: 20001553 _clock.flags 0000 _clock.rdepth 0000
   ...........status: WANT_WRITE
   .....thread_owner: 0001553
   .....acquisitions number:        2
   ...........misses number:        0
   ..sleeping misses number:        0
   ................lockname: 00D2FFFF  file+8BDFE7
   ...link register of lock: 00047874  .ns_init+00002C
   ..........caller of lock: 00000003
   ..........cpu id of lock: 00000000
   .link register of unlock: 00000000  00000000
   ........caller of unlock: 00000000
   ........cpu id of unlock: 00000000
   KDB(1)>

ipl Subcommand

The ipl subcommand displays information about IPL control blocks.

Syntax

 

ipl [* | cpu index]

If no argument is specified, detailed information is displayed for the current CPU. If a CPU number is specified, detailed information is displayed for that CPU. A summary for all CPUs can be displayed by using the * option.

Aliases: iplcb

Example

   KDB(4)> ipl * print ipl control blocks
            INDEX  PHYS_ID INT_AREA ARCHITEC IMPLEMEN  VERSION

   0038ECD0     0 00000000 FF100000 00000002 00000008 00010005
   0038ED98     1 00000001 FF100080 00000002 00000008 00010005
   0038EE60     2 00000002 FF100100 00000002 00000008 00010005
   0038EF28     3 00000003 FF100180 00000002 00000008 00010005
   0038EFF0     4 00000004 FF100200 00000002 00000008 00010005
   0038F0B8     5 00000005 FF100280 00000002 00000008 00010005
   0038F180     6 00000006 FF100300 00000002 00000008 00010005
   0038F248     7 00000007 FF100380 00000002 00000008 00010005
   KDB(4)> ipl print current processor information

   Processor Info 4 [0038EFF0]

   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

   System info [0038E534]
   num_of_procs...........00000008 coherency_size.........00000020
   resv_size..............00000020 arb_cr_addr............00000000
   phys_id_reg_addr.......00000000 num_of_bsrr............00000000
   bsrr_addr..............00000000 tod_type...............00000000
   todr_addr..............FF0000C0 rsr_addr...............FF62006C
   pksr_addr..............FF620064 prcr_addr..............FF620060
   sssr_addr..............FF001000 sir_addr...............FF100000
   scr_addr...............00000000 dscr_addr..............00000000
   nvram_size.............00022000 nvram_addr.............FF600000
   vpd_rom_addr...........00000000 ipl_rom_size...........00100000
   ipl_rom_addr...........07F00000 g_mfrr_addr............FF107F80
   g_tb_addr..............00000000 g_tb_type..............00000000
   g_tb_mult..............00000000 SP_Error_Log_Table.....0001C000
   pcccr_addr.............00000000 spocr_addr.............FF620068
   pfeivr_addr............FF00100C access_id_waddr........00000000
   loc_waddr..............00000000 access_id_raddr........00000000
   (4)> more (^C to quit) ? continue
   loc_raddr..............00000000 architecture...........00000001
   implementation.........00000002 pkg_descriptor.........rs6ksmp
   KDB(4)> 

trace Subcommand

The trace subcommand displays data in the kernel trace buffers or data in the trace buffers collected using the trcstart subcommand. For more information on the trcstart sucommand, see trcstart Subcommand.

Syntax

 

trace [-h] [hook[ :subhook]]... [#data]... [-c channel]

trace -K [-j event1, eventN -k event1, eventN]

Data is entered into these buffers using the shell subcommand trace. If the shell subcommand has not been invoked prior to using the trace subcommand then the trace buffers will be empty.

The trace subcommand is not meant to replace the shell trcrpt command, which formats the data in more detail. The trace subcommand is a facility for viewing system trace data in the event of a system crash before the data has been written to disk.

Example

KDB(0)> trcstart 
Kernel Trace initialiized successfully 
Quit out of kdb, for tracing to continue 
KDB(0)> q 
Debugger entered via keyboard. 
.waitproc_find_run_queue+00009C       li    r3,0                <0000000000000000> r3=0000000000000040 
KDB(0)> trcstop 
Kernel trace stopped successfully 
KDB(0)> trace -K 
Current entry is #1522 of 1522 at F100009E1460D088 
   Hook ID: KERN_SLIH (00000102)    Hook Type: 0 
   ThreadIdent: 0000A00B 
   Subhook ID/HookData: 0000 
   Data Length: 0008 bytes 
   D0: 0049BDF0 
Current entry is #1521 of 1522 at F100009E1460D068 
   Hook ID: KERN (00000100)    Hook Type: Timestamped 8000 
   ThreadIdent: 0000A00B 
   Subhook ID/HookData: 0005 
   Data Length: 0008 bytes 
   D0: 00028B10 
Current entry is #1520 of 1522 at F100009E1460D050 
   Hook ID: KERN_SLIH (00000102)    Hook Type: 0 
   ThreadIdent: 00008009 
   Subhook ID/HookData: 0000 
   Data Length: 0008 bytes 
   D0: 0049BDF0 
(0)> more (^C to quit) ? 
Current entry is #1519 of 1522 at F100009E1460D038 
   Hook ID: KERN_SLIH (00000102)    Hook Type: 0 
   ThreadIdent: 00006007 
   Subhook ID/HookData: 0000 
   Data Length: 0008 bytes 
   D0: 0049BDF0 
Current entry is #1518 of 1522 at F100009E1460D018 
   Hook ID: KERN (00000100)    Hook Type: Timestamped 8000 
   ThreadIdent: 00008009 
   Subhook ID/HookData: 0005 
   Data Length: 0008 bytes 
   D0: 00028BB8 
Current entry is #1517 of 1522 at F100009E1460CFF8 
   Hook ID: KERN (00000100)    Hook Type: Timestamped 8000 
   ThreadIdent: 00006007 
   Subhook ID/HookData: 0005 
   Data Length: 0008 bytes 
   D0: 00028BC0 
Current entry is #1516 of 1522 at F100009E1460CFB8 

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