Hey Roger
The
Last 20 Sessions Terminated section of the output from the
onstat -g ses command was introduced at
IDS 12.10 but I am not certain at which patch version ...
[ informix@informix-01 ] ~ > onstat -g ses
HCL Informix Dynamic Server Version 12.10.FC13XT -- On-Line (Prim) -- Up 85 days 02:51:07 -- 115646856 Kbytes
session #RSAM total used dynamic
id user tty pid hostname threads memory memory explain
8430398 informix - 0 - 0 16384 12416 off
8430397 informix - 64492 informix-01 1 1638400 1599720 off
:
4 informix - 0 - 0 16384 12416 off
3 informix - 0 - 0 16384 12416 off
Last 20 Sessions Terminated
Ses ID Username Hostname PID Time Reason
8429988 informix informix-01 61805 01/05/2023.03:50 onmode z
8430242 informix informix-01 63689 01/05/2023.03:52 onmode z
Total Terminated 2
As far as I know, there
isn't a parameter that can be set to suppress this section of the output. Restarting the Instance will yield the desired result but that may not be feasible if your system is in Production. I haven't tested whether or not
onstat -z has any effect but you may upset a few people if you wiped out the statistics gathered over the Instance uptime.
I prefer to use what follows; Employing
sed, I search for the first occurrence of the string:
Last 20 and once pattern matched I delete from that line number to the end of the piped output resulting in...
[ informix@informix-01 ] ~ > onstat -g ses | sed '/^Last 20 /,$d'
HCL Informix Dynamic Server Version 12.10.FC13XT -- On-Line (Prim) -- Up 85 days 02:52:09 -- 115646856 Kbytes
session #RSAM total used dynamic
id user tty pid hostname threads memory memory explain
8430477 informix - 0 - 0 16384 12416 off
8430474 openbet - 21098 siteserver-02 1 73728 64344 off
:
5 informix - 0 - 0 16384 12416 off
4 informix - 0 - 0 16384 12416 off
3 informix - 0 - 0 16384 12416 off
------------------------------
Kirit Rana
------------------------------