Monitor session resources with onstat -g ses output

Use the onstat -g ses command to monitor the resources allocated for and used by a session, in particular, a session that is running a decision-support query. The onstat -g ses command also shows information on recently terminated sessions.

For example, in onstat -g ses output, session number 49 is running five threads for a decision-support query.

Figure 1: onstat -g ses output
session                                   #RSAM    total      used
id       user     tty      pid   hostname threads  memory     memory
57       informix -        0     -        0        8192       5908
56       user_3   ttyp3    2318  host_10  1        65536      62404
55       user_3   ttyp3    2316  host_10  1        65536      62416
54       user_3   ttyp3    2320  host_10  1        65536      62416
53       user_3   ttyp3    2317  host_10  1        65536      62416
52       user_3   ttyp3    2319  host_10  1        65536      62416
51       user_3   ttyp3    2321  host_10  1        65536      62416
49       user_1   ttyp2    2308  host_10  5        188416     178936
2        informix -        0     -        0        8192       6780
1        informix -        0     -        0        8192       4796
session                                   #RSAM    total      used
id       user     tty      pid   hostname threads  memory     memory
57       informix -        0     -        0        8192       5908
56       user_3   ttyp3    2318  host_1   1        65536      62404
55       user_3   ttyp3    2316  host_1   1        65536      62416
54       user_3   ttyp3    2320  host_1   1        65536      62416
53       user_3   ttyp3    2317  host_1   1        65536      62416
52       user_3   ttyp3    2319  host_1   1        65536      62416
51       user_3   ttyp3    2321  host_1   1        65536      62416
49       user_1   ttyp2    2308  host_1   5        188416     178936
2        informix -        0     -        0        8192       6780
1        informix -        0     -        0        8192       4796

Last 20 Sessions Terminated

Ses ID  Username  Hostname  PID    Time              Reason
36      user_1    host_1    2122   01/19/2015.15:20  session limit txn time (60s)
40      user_1    host_1    2134   01/19/2015.15:14  session limit memory (5124 KB)
47      user_1    host_1    2140   01/19/2015.15:04  session limit logspace (10242 KB)
50      user_1    host_1    2145   01/19/2015.15:02  session limit txn time (39548 KB)