onstat -g stk command: Print thread stack

Use the onstat -g stk tid command to display the stack of the thread specified by thread ID.

This option is not supported on all platforms and is not always accurate.

Read syntax diagramSkip visual syntax diagram
Syntax:

>>-onstat-- -g--stk -tid---------------------------------------><

Example output

Figure 1. onstat -g stk tid command output
Stack for thread: 2 adminthd
 base: 0x000000010aad5028
  len:   33280
   pc: 0x00000001002821e8
  tos: 0x000000010aadc621
state: running
   vp: 2

0x1002821e8 oninit :: yield_processor + 0x260 sp=0x10aadce20(0x10ac834d0, 0x0, 0x1, 
   0x100000000, 0xc8a000, 0x100c8a000)
0x100274e38 oninit :: wake_periodic + 0xdc sp=0x10aadced0 delta_sp=176(0x41b0, 0xc7a024bc, 
   0x0, 0x41c4, 0x10aacf598, 0x90)
0x100274fcc oninit :: admin_thread + 0x108 sp=0x10aadcf80 delta_sp=176(0x0, 0x2328, 
   0xd26c00, 0x5, 0xc8a000, 0x156c)
0x1002484ec oninit :: startup + 0xd8 sp=0x10aadd050 delta_sp=208(0xa, 0x10aad47d0, 
   0x10aad47d0, 0x100db1988, 0xd1dc00, 0x1)