To find out if threads are suspended, use one or all of these methods:
When you know the number of the session that spawned the suspended thread, you can also run onstat -g ses session_number.
The following output examples show a suspended thread. In all output, the word defunct marks the suspended thread.
The onstat -u output shows the following user-thread information:
Userthreads address flags sessid user tty wait tout locks nreads nwrites b3a4018 ---P--D 9 root - 0 0 0 40 21 ... b3a7244 DEFUNCT 18 informix - - - - - - 14 active, 128 total, 15 maximum concurrent
The onstat -g ath output shows the following list of threads:
Threads: tid tcb rstcb prty status vp-class name 2 b336730 0 2 running 2adm adminthd ... 45 b93b670 b3a6a8c 2 sleeping secs: 27 1cpu bum_sched 47 b93be88 0 2 yield forever 1cpu bum_rcv 52 b990278 b3a66b0 2 cond wait sm_read 1cpu sqlexec_1.15 53 b9906b8 b3a6e68 2 yield forever 1cpu x_exec_1.15 54 b990c68 b3a7244 2 cond wait defunct 1cpu x_update_0
The onstat -g con output shows the following waiting conditions:
Conditions with waiters: cid addr name waiter waittime 271 b990230 sm_read 52 105 273 b990f70 defunct 54 110
When you run onstat -g ses 18 to examine
session 18,
you see the following output:
local #RSAM total used Start Accum sessid sessid user tty pid hostname threads memory memory Time Time 1.15 18 informix - 8925 - 2 90112 61592 08:32:00 - tid tcb rstcb flags curstk status name 53 b9906b8 b3a6e68 ---P--- 912 yield forever x_exec_1.15 54 b990c68 b3a7244 DEFUNCT 5560 cond wait(defunct) x_update_0 Memory pools count 1 name class addr totalsize freesize #allocfrag #freefrag 18 V ba85018 90112 28520 180 10 name free used name free used overhead 0 128 scb 0 96 ... sqtcb 0 1016 fragman 0 1232 |--Session ID--| SQL Current Iso Lock SQL ISAM F.E. Submit Admit Current Global Local Stmt type Database Lvl Mode ERR ERR Vers Time Time Role 1.24 24 SELECT sales CR Not Wait 0 0 8.50 08:32:00 - - No current SQL statement.
After the session that spawned the suspended thread exits, you see the following output for onstat -u, which shows that no session is associated with the suspended thread:
Userthreads address flags sessid user tty wait tout locks nreads nwrites b3a4018 ---P--D 9 root - 0 0 0 40 21 ... b3a7244 DEFUNCT - informix - - - - - - 12 active, 128 total, 15 maximum concurrent
For more information on these onstat options, see the chapter on the Resource Grant Manager in your IBM Informix: Performance Guide and onstat: Monitor Database Server Operations.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]