Oninit Logo
The Down System Specialists
Partnerships Contact
Onstat -a -b/-B -C -c -d/-D -F -f -G -h -i -j -k/-K -L -l -m -o -P -p -R -r -s -t/-T -u -X -x -z

onstat -g wai Waiting Threads

The onstat -g wai command displays a list of the threads, in the system, that are currently on the wait queue. The output is sorted by thread ID.

Waiting 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() 
 10      14276800 0        3    sleeping forever        1cpu        sm_listen   
 11      1424ad58 0        2    sleeping secs: 1        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)
 16      142e42b8 140d4158 2    sleeping forever        1cpu        flush_sub(2)

Output Description

Heading Description Format See Also
tid The thread ID. Dec onstat -g ath
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 priority of the thread in the system. Dec  
status The current status of the thread (i.e. the reason it is on the wait queue). Str  
vp-class The virtual processor class upon which the thread runs. Str  
name The name of the thread. Str  


  • Threads on the wait queue are either waiting on condition such as a mutex, condition or join, or they are sleeping, either for a specific number of seconds or forever.

Monitoring and Tuning

  • Threads will wait for a variety of reasons. For sqlexec threads, the most common reasons are SM_READ and NETNORM, which indicate the server is waiting for a request from the front end program.

To discuss how Oninit ® can assist please call on +1-913-674-0360 or alternatively just send an email specifying your requirements.