Can we get the same output as onstat -g spa from SQL queries against sysmaster
Posted in 2025
Milan Rafaj wanted an sysmaster SQL equivalent of onstat -g spf to find currently running long queries for an InformixHQ sensor. Henri Cujass warned SQL trace on has production impact; Art Kagel had seen only a couple of percent at LOW/MEDIUM. Andreas Legner suggested the syssqltrace tables, but Milan said they only show finished queries. No equivalent was found.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: SQL Development & Query Writing
Hello community, does anybody tried to get the same or similar output as an SQL query from sysmaster? Thanks a lot Milan Rafaj Unless stated otherwise above: Kyndryl Česká republika, spol. s r. o. Sídlo: V Parku 2308/8, Chodov, 148 00 Praha 4, IČ: 096 28 886 Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277) Registered address: V Parku 2308/8, Chodov, 148 00 Prague 4 Company ID: 096 28 886 Registered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277)
Hi Milan,
onstat -g spa, quite expectedly, gives me the onstat syntax overview, so likely not what you're after ;-)What exact information is it that you want to get to?
BR,
Andreas
------------------------------
Andreas Legner
Informix Dev
HCL Software
------------------------------
Hello Andreas, mispelling. Onstat -g spf i meant Milan Rafaj Kyndryl Česká Republika/Czech Republic Odesláno z/Sent from Outlook / iOS
Hi Milan, What is the motivation for "tracing on" and monitoring the SQL behavior against sysmaster ( -g spf)? Regards, Henri ------------------------------ Henri Cujass leolo IT, CTO Germany IBM Champion henri.cujass@leolo.com ------------------------------
Hello Henri,
Main motivation is to create a sensor/custom report in InformixHQ on currently long-running SQL queries – which is easily visible from onstat -g spf output if columns tottime and runtime are not 0 and have almost the same values and column execs has value of 0.
SQL tracing gives me info only on already finished queries.
Milan Rafaj
Senior Lead, Infrastructure/Cloud Architecture
Kyndryl Consult
+420 737 264 248
www.kyndryl.cz
Planned absence/Plánovaná nepřítomnost:
Kyndryl Česká republika, spol. s r. o.
Sídlo: Praha 4, Chodov, V Parku 2308/8, PSČ: 148 00,
IČ: 14890992
Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277)
Registered address: Prague 4, Chodov, V Parku, 2308/8, Zip code: 148 00
Company ID: 14890992
Entered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277)
--
Hi Milan, nice idea, but you need to set SQL trace on to get these counts. A large impact on production systems - I don't recommend it. Regards, Henri ------------------------------ Henri Cujass leolo IT, CTO Germany IBM Champion henri.cujass@leolo.com ------------------------------
Hello Henri – I know this, Tracing is enabled and most of time trace buffer is on defaults, increasing when looking for reason of current performance leaks. Milan Rafaj Senior Lead, Infrastructure/Cloud Architecture Kyndryl Consult +420 737 264 248 www.kyndryl.cz Planned absence/Plánovaná nepřítomnost: Kyndryl Česká republika, spol. s r. o. Sídlo: Praha 4, Chodov, V Parku 2308/8, PSČ: 148 00, IČ: 14890992 Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277) Registered address: Prague 4, Chodov, V Parku, 2308/8, Zip code: 148 00 Company ID: 14890992 Entered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277) --
Henri: Honestly, if you set SQLTRACE to LOW or MEDIUM and have a reasonable number of reasonably sized buffers configured, I have not seen any significant performance hit from turning SQLTRACE on. The single incident I did see was a client who crashed their host be configuring a million 1 MB buffers on a production server which, of course, caused the server's host to totally lock up trying to allocate a TB of memory. Otherwise, I have never seen more than a couple of percent of performance hit. What have you experienced that is different? Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
So, to get back to the original question: in how far are sysmaster:syssqltrace[_*] SMI tables not good enough as equivalent to onstat -g spf?
------------------------------
Andreas Legner
Informix Dev
HCL Software
------------------------------
Hello Andreas,
SMI tables
sysmaster:syssqltrace[_*] show me „the past" and are very useful for history analyses and similar.
When I am trying to find reasons why systém is „slow" currently, onstat -g ses [Aa]ctive, onstat -g ses [Rr]unning, onstat -g spf and in 14.10 onstat -g top give me quick overview
where the problem can be – so I would like to have similar SQL equivalent to customize output and integrate with InformixHQ as well
Milan Rafaj
--
Hi, This may sound silly but I don’t hear a lot about containers for Informix (developer ed). I use it and it’s very easy to install, tear apart, and use, and it’s fast! I run Ifx containers “natively” on my laptop as well as via ssh from my iPad/laptops... on my Synology NAS (as a “server”) for personal education. I’d like to hear more folks espousing its virtues/tips/drawbacks. I used to run it as a VMWare VM but it was clunky and I’ve never renewed VMware as a result.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g