Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Clive Eisen suspected session memory leaks on IDS 11.70FC4 with DBD::Informix clients and wanted SQL to read per-session memory. Art Kagel supplied a query returning memused and memtotal for a session. Kirit Rana shared a shell loop that runs onstat -g ses on the top five memory-hungry sessions, and Paul Watson suggested onstat -g afr. Clive's leak itself was not diagnosed.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Clive Eisen — source: IBM Community (ConnectedCommunity.org) Informix forum
IDS 11.70FC4
I seem to be having some serious session memory leaks.
Sadly it is intermittent.
All the clients are using DBD::Informix (perl) to access the database.
I have to run onmode -F quite frequently and restart some of the clients so it looks like something is not being closed correctly.
I'd like to examine the session memory use from inside the session -
so we can do things like
get session size
execute (for example) a stored procedure
get session size
Is there any sql I can run that will return the session memory information like you get from
onstat -g ses $sessionid?TIA
------------------------------
Clive Eisen
------------------------------
#Informix
↪ replying to Clive Eisen
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Try this one:
> select memused, memtotal from sysscblst where sid = 503;memused memtotal
252728 266240
1 row(s) retrieved.
Slightly different from the onstat output, but consistent:
onstat -g ses 503 | head -7
IBM Informix Dynamic Server Version 14.10.FC5DE -- On-Line -- Up 11:10:30 -- 2180172 Kbytes 2021-02-17 20:48:18session effective #RSAM total used dynamic
id user user tty pid hostname threads memory memory explain
503 art - 5 206295 localhost 1 245760 225384 off
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Clive Eisen — source: IBM Community (ConnectedCommunity.org) Informix forum
Too kind Art.
Long time no see.
Regards,
------------------------------
Clive Eisen
------------------------------
↪ replying to Clive Eisen
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Long time no see anyone these days! B^(
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Clive Eisen — source: IBM Community (ConnectedCommunity.org) Informix forum
Sadly true - maybe one day.
------------------------------
Clive Eisen
------------------------------
↪ replying to Clive Eisen
Kirit Rana — source: IBM Community (ConnectedCommunity.org) Informix forum
Clive
When investigating a suspected memory leak, I run something like this...
for i in $(onstat -g ses | grep -v informix | awk '{print $8":"$5":"$1}' | sort -nr | head -5)
do
sessID=$(echo $i | cut -d ":" -f 3)
onstat -g ses $sessID
done >> /tmp/mySessIDs.txt
...and that gives me the
onstat -g sesoutput for the top 5 memory hungry user sessions.
I'm not touching the system tables, but it's useful when you don't know which sessions to initially target.
------------------------------
Kirit Rana
------------------------------
↪ replying to Kirit Rana
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.