onstat -g ath All Threads

The onstat -g ath command displays a list of all threads in the system. The output is sorted by thread ID.

Threads:                                                                        
 tid     tcb      rstcb    prty status                vp-class      name        
 2       141c9270 0        2    sleeping forever        4lio        lio vp 0    
 3       141e3138 0        2    sleeping forever        5pio        pio vp 0    
 4       141f8138 0        2    sleeping forever        6aio        aio vp 0    
 5       1420d138 0        2    sleeping forever        7msc        msc vp 0    
 6       1423a228 140d3018 4    sleeping secs: 1        1cpu        main_loop() 
 7       1424abe8 0        2    running                 1cpu        sm_poll     
 8       14256e00 0        2    running                 8tli        tlitcppoll  
 9       14266800 0        2    running                 9tli        tlitcppoll  
 10      14276800 0        3    sleeping forever        1cpu        sm_listen   
 11      1424ad58 0        2    sleeping secs: 2        1cpu        sm_discon   
 12      142a1930 0        3    sleeping forever        1cpu        tlitcplst   
 13      142adba8 0        3    sleeping forever        1cpu        tlitcplst   
 14      142c2c20 140d35d8 2    sleeping forever        1cpu        flush_sub(0)
 15      142d92b8 140d3b98 2    sleeping forever        1cpu        flush_sub(1)
.....

141     148b99a8 0        4    sleeping forever        1cpu        kaio        
142     142fabb8 14a58018 3    sleeping forever        1cpu        aslogflush  
143     14aa0380 14a585d8 2    sleeping secs: 44       1cpu        btclean     
151     14c91d28 14a59158 4    sleeping secs: 1        1cpu        onmode_mon  
213     14c91ec0 14a58b98 2    cond wait  sm_read      1cpu        sqlexec     
349     14abae60 14a59718 2    cond wait  netnorm      1cpu        sqlexec     
357     1476f478 14a59cd8 2    cond wait  netnorm      1cpu        sqlexec     
358     1477b4c0 14a5a298 2    cond wait  netnorm      1cpu        sqlexec     
359     1477ba98 14a5a858 2    cond wait  netnorm      1cpu        sqlexec     

Output Description

Heading Description Format See Also
tid The thread id incrementally assigned by OnLine. Dec onstat -g tpf
tcb The in-memory address of the thread control block. Hex  
rstcb The in-memory address of the RSAM thread control block. Hex  
prty The internal priority of the thread. Dec  
status The current status of the thread. Str onstat -g con
vp-class The VP class and number on which the thread is running. The VP classes include the following:
  CPU CPU VP
  AIO Asynchronous I/O
  LIO Logical Log I/O
  PIO Physical Log I/O
  MSC Miscellaneous
  ADM Administrative
  ADT Auditing
  OPT Optical
  SOC Socket
  TLI TLI
  SHM Shared Memory
  USR User Define Routine VP
Str onstat -g glo
name The name of the thread. Str  

Notes

    A thread priority can range from 1 (lowest) to 4 (highest) with a default of 2.

    If more than one instance of a VP exists within a class, its name will be prefaced with its instance number.

    There is a flag which indicates that the thead is in a CPUVP private ready queue. The '*' simply means that the flag is not set - indicating either a hard bind to a CPUVP or that the thread is bound to the CPUVP class. There are several things which might cause the thread to bind to the CPUVP class; when the thread is bound to a class, then it is placed into the global ready queue rather than a CPUVP private queue. Some of the things which cause a thread to be bound to the CPUVP class would be exiting functionality such as encryption, optical blobs, PAM, etc... When a thread is in the global ready queue, it will be picked up by one of the CPUVPS and the '*' will be removed.

    The typical case is that the thread is hard bound to the VP, but it also means that the thread is returning from a hard bind and is now in the global ready queue

Monitoring and Tuning

    The onstat -g ath command provides a quick check for what threads are currently active in the system. A glance through the output will quickly reveal whether KAIO threads are running, if there are any sessions running via sqlexec threads, or if there are a large number of scan and exchange threads running to handle parallel operations.