Home | Previous Page | Next Page   Administrative Utilities > The onstat Utility > onstat -g Monitoring Options >

The onstat -g ses Option

The onstat -g ses option prints session-related information. You can specify one of the following invocations.

Invocation
Explanation
onstat -g ses
Displays a one-line summary for each session
onstat -g ses sessionid
Displays information for a specific session

Figure 90 shows the output of the onstat -g ses option.

Figure 90. onstat -g ses Output
onstat -g ses

IBM Informix Dynamic Server Version 10.00.UC3     -- On-Line -- Up 7 days 18:43:13 --
 38912 Kbytes

session                                      #RSAM    total      used       dynamic
id       user     tty      pid      hostname threads  memory     memory     explain
24       informix -        0        -        0        12288      7936       off
23       informix -        17602    carson   1        57344      48968      off
3        informix -        0        -        0        12288      9168       off
2        informix -        0        -        0        12288      7936       off

Figure 91 shows the output of the onstat -g ses sessionid option.

Figure 91. onstat -g ses sessionid Output
IBM Informix Dynamic Server Version 10.00.UC3     -- On-Line -- Up 2 days 19:42:
11 -- 38912 Kbytes

session                                      #RSAM    total      used       dynamic
id       user     tty      pid      hostname threads  memory     memory     explain
16       sitaramv 1        18523    carson   1        81920      71720      off

tid      name     rstcb    flags    curstk   status
35       sqlexec  a7ed9f4  Y--P---  5488     cond wait(netnorm)

Memory pools    count 1
name         class addr     totalsize freesize #allocfrag #freefrag
16           V     afea020  81920     10200    119        13

name           free       used           name           free       used
overhead       0          1648           scb            0          96
opentable      0          1768           filetable      0          336
log            0          21880          temprec        0          16200
keys           0          680            ralloc         0          5120
gentcb         0          1208           ostcb          0          2528
sqscb          0          13216          sql            0          40
rdahead        0          184            hashfiletab    0          280
osenv          0          1920           sqtcb          0          2024
fragman        0          208            udr            0          312
xatm           0          2072

sqscb info
scb      sqscb    optofc   pdqpriority sqlstats optcompind  directives
adff580  af93018  0        0           0        2           1

Sess  SQL            Current            Iso Lock       SQL  ISAM F.E.
Id    Stmt type      Database           Lvl Mode       ERR  ERR  Vers Explain
16    -              xabasicdb          RR  Not Wait   0    0    9.03 Off


Last parsed SQL statement :
  EXECUTE FUNCTION xa2pc_mi_unregister("xads_t2_i2")

Xadatasources participated in this session :
Xadatasource name                                    RMID       Active
xabasicdb@atmol10:sitaramv.xads_t3_i1                   6        YES
xabasicdb@atmol10:sitaramv.xads_t2_i1                   4        YES
xabasicdb@atmol10:sitaramv.xads_t1_i3                   3        YES
xabasicdb@atmol10:sitaramv.xads_t1_i2                   2        YES
xabasicdb@atmol10:sitaramv.xads_t1_i1                   1        YES
xabasicdb@atmol10:sitaramv.xads_t2_i2                   5        NO

You can interpret the output from this option as follows:

Session section

Session id
The session ID
user
The username who started the session
tty
The tty associated with the front-end for this session
pid
The process ID associated with the front-end for this session
hostname
The hostname from which this session has connected
#RSAM threads
The number of RSAM thread allocated for this session
total memory
The amount of memory allocated for this session
used memory
The amount of memory actually used by this session
dynamic explain
Generate explain output of the sql statements of the session (on or off)

Threads section

tid
The thread ID
name
The name of the thread
rstcb
RSAM control block
flags
Describes the status of the thread using the following codes:

Position 1

B
Waiting on a buffer
C
Waiting on a checkpoint
G
Waiting on a logical-log buffer write
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 in this position means that the thread encountered an I/O failure in the middle of a transaction

Position 3

A
Archive thread
B
Begin work
P
Begin Prepare or Prepared work
X
XA prepared
C
Committing or committed
R
Aborting or aborted
H
Heuristically aborted or heuristically rolling back

Position 4

P
Primary thread

Position 5

R
Reading
X
Critical section

Position 6

R
Recovery thread

Position 7

M
Monitor thread
D
Daemon thread
C
Cleaner
F
Flusher
B
btcleaner
curstk
Current stack size
status
Current thread status

Memory pools header section. The information is repeated for each session pool.

name
Name of pool
class
Class of the memory where the pool is allocated from. R is for Resident, V is for Virtual, and M is for Message
addr
Address of the pool structure
totalsize
Total size of the memory acquired by the pool in bytes
freesize
Number of bytes free in the pool
#allocfrag
Number of allocated memory fragments in the pool
#freefrag
Number of free fragments in the pool

The memory pool section

name
Name of a component which has allocated memory from the pool
free
Number of bytes freed
used
Number of bytes allocated

The sqscb information section

scb
The session control block. This is the address of the main session structure in shared memory.
sqscb
SQL level control block of the session
optofc
The current value of the OPTOFC environment variable or onconfig setting.
pdqpriority
The current value of the PDQPRIORITY environment variable or onconfig setting.
sqlstats
The current value of the SQLSTATS environment variable or onconfig setting.
optcompind
The current value of the OPTCOMPIND environment variable or onconfig setting.
directives
The current value of the DIRECTIVES environment variable or onconfig setting.

The Last parsed SQL statement section has the same information as the onstat -g sql option. See The onstat -g sql Option.

Xadatasources participated in this session section shows information about the XA data sources that are available during the session, their resource manager identifiers, and whether they are currently active.

Xdatasource name
The XA data source that participated in the session
RMID
The identifier of the resource manager for the corresponding XA data source
Active
Whether the XA data source is still active
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]