Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
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 sts Max and current stack sizes

The onstat -g sts command displays the maximum and current stack sizes for each thread. Output is sorted by thread ID.

Stack usage:                                                          
                                                                      
TID     Total   Max             Current         Thread Name           
                bytes   %       bytes   %                             
2       32768   1402    4       552     1       lio vp 0              
3       32768   973     2       552     1       pio vp 0              
4       32768   4462    13      552     1       aio vp 0              
5       131072  10419   7       552     0       msc vp 0              
6       32768   23748   72      2776    8       main_loop()           
7       32768   5715    17      664     2       sm_poll               
8       32768   4286    13      752     2       tlitcppoll            
9       32768   4443    13      960     2       tlitcppoll            
10      32768   10323   31      3280    10      sm_listen             
11      32768   2193    6       552     1       sm_discon             
12      32768   10323   31      4040    12      tlitcplst             
13      32768   10323   31      4040    12      tlitcplst             
14      32768   2880    8       600     1       flush_sub(0)          
15      32768   2263    6       600     1       flush_sub(1)          

Output Description

Heading Description Format
TID The thread ID. Dec
Total The total number of bytes allocated for the stack. Dec
Max bytes The maximum number of bytes used from the stack. Dec
% The maximum percent of stack used. Dec
Current bytes The current number of bytes used from the stack. Dec
% The current percent of stack used. Dec
Thread Name The name of the thread associated with this stack. Str

Notes

    The default stack size is 32768 bytes (32K) and is controlled by the STACKSIZE configuration parameter.

Monitoring and Tuning

    If the max bytes column consistently shows a value larger than the default of 32K for the sqlexec threads, it might be advisable to increase the amount of memory allotted for the default stack size by changing the value of STACKSIZE in the configuration file to a larger value.

    Although it might appear that sessions are not fully utilizing the default amount of stack space assigned (32K), it is not recommended to set the default stack size to any value less than 32768 (32K).

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