onstat -g ses Session information

The onstat -g ses command displays a list of the sessions currently running in the system. The command takes an optional session ID as a parameter. The output is sorted in reverse order by session ID.

For a description of the SQL section see onstat -g sql

onstat -g ses

session                                   #RSAM    total      used        
id       user     tty      pid   hostname threads  memory     memory      
4523     informix -        0     -        0        12288      7640        
4522     informix -        14156 oninit   1        45056      33960       
3915     informix -        0     -        0        12288      7640        
1458     informix -        23399 oninit   1        782336     735584      
125      informix -        236   oninit   1        761856     717704      
124      informix -        27920 oninit   1        598016     559760      
123      informix -        11172 oninit   1        548864     501808      
112      informix -        22005 oninit   1        233472     181840      
101      informix -        3900  oninit   1        815104     765664      
100      informix -        29761 oninit   1        221184     166728      
98       informix -        27010 oninit   1        819200     753552      

onstat -g ses 21673556

session           effective                            #RSAM    total      used       dynamic
id       user     user      tty      pid      hostname threads  memory     memory     explain
21673556 wwbe     -         -        8598     saruman. 1        540672     455688     off

Program :
-

tid      name     rstcb            flags    curstk   status
21674501 sqlexec  3d8005588        Y--P---  6256     cond wait  netnorm   -

Memory pools    count 2
name         class addr              totalsize  freesize   #allocfrag #freefrag
21673556     V     3e8b51040        536576     84176      621        90
21673556*O0  V     3da7ab040        4096       808        1          1

name           free       used           name           free       used
overhead       0          6576           mtmisc         0          944
resident       0          128            scb            0          144
opentable      0          21768          filetable      0          4592
log            0          16536          temprec        0          37024
keys           0          176            ralloc         0          285520
gentcb         0          1592           ostcb          0          2944
sqscb          0          26792          sql            0          4856
hashfiletab    0          552            osenv          0          2952
buft_buffer    0          14976          sqtcb          0          14880
fragman        0          9448           sapi           0          64
rsam_seqscan   0          3144

sqscb info
scb              sqscb            optofc   pdqpriority optcompind  directives
3d64bb1c0        3e462f028        0        0           2           1

Sess       SQL            Current            Iso Lock       SQL  ISAM F.E.
Id         Stmt type      Database           Lvl Mode       ERR  ERR  Vers  Explain
21673556   -              wbe                DR  Wait 60    0    0    9.35  Off

Last parsed SQL statement :
  SELECT webexplode(object,?::html) FROM wbPages WHERE ID='faq7' AND
      path='/help' AND extension='html' ;

Output Description

Heading Description Format See Also
session id The session ID. Dec onstat -u
user The username who started this session. Str  
tty The tty associated with the front-end for this session. Str  
pid The process ID associated with the front-end for this session. Dec  
hostname The hostname from which this session has connected. Str  
#RSAM threads The number of RSAM threads allocated for this session. Dec  
total memory The amount of memory allocated for this session. Dec  
used memory The amount of memory actually used by this session. Dec  

Thread Status

Heading Description Format See Also
tid The thread ID Dec  
name The name of the thread Str  
rstcb The in-memory address of the RSAM thread control block Hex  
flags Describes the status of the thread using the following coded values:

Position 1:
   B Waiting on a buffer
   C Waiting on a checkpoint
   G Waiting on write of the Logical Log buffer
   L Waiting on a lock
   S Waiting on a mutex
   T Waiting on a transaction
   X Waiting on a transaction cleanup
   Y Waiting on a condition
Position 2: An asterisk means the thread had an I/O problem during a transaction

Position 3:
   A DBSpace backup thread
   B Begin work
   C Commiting/committed
   H Heuristic aborting/aborted
   P Preparing/prepared
   R Aborting/aborted
   X XA prepare
Position 4:
   P Primary thread for a session
Position 5:
   R Reading (RSAM Call)
   X Critical Write
Position 6:
   R Recovery thread
Position 7:
   B BTree clean thread
   C Terminated user thread waiting for    cleanup
   D Daemon thread
   F Page cleaner thread (flusher)
   M On-Monitor thread
Str onstat -u
curstk The current stack size Bytes  
status The current status of the thread Str onstat -g con

Memory Pool Status

Heading Description Format See Also
name The name of the pool. Str onstat -g mem
class The shared memory segment type in which the pool has been created (R, V, or M). Str onstat -g seg
addr The in-memory address of the pool. Hex  
totalsize The total size of the pool in bytes. Dec  
freesize The number of bytes of free memory within this pool. Bytes  
#allocfrag The number of allocated fragments within this pool. Dec  
#freefrag The number of free fragments within this pool. Dec  

Memory Pool Breakdown

Heading Description Format See Also
name The name of the pool. Str onstat -g mem
free The number of bytes available Dec  
used The number of bytes used Dec  

sqscb Info Section

Heading Description Format See Also
scb The session control block. This is the address of the main session structure in shared memory Dec  
sqscb SQL level control block of the session Dec  
optofc The current value of the OPTOFC environment variable or ONCONFIG configuration file setting Int  
pdqpriority The current value of the PDQPRIORITY environment variable or ONCONFIG configuration file setting Int  
optcompind The current value of the OPTCOMPIND environment variable or ONCONFIG configuration file setting Int  
directives The current value of the DIRECTIVES environment variable or ONCONFIG configuration file setting Int  

Notes

    There will always be an 'extra' session with a PID of zero at the top of the list. This is a placeholder for the next request for a new session.