YIKES! 12.x documentation for onstat -g opn does not match the output
Posted in 2020
Jacob Salomon noted that onstat -g opn output in 12.10.FC12 differs from the 12.0 manual: partnum shifted, a sub-heading per rstcb, and a new partp column. Paul Watson explained ucnt/ocnt (threads using / total opens), ra (readahead) and partp (address of the tablespace structure). Andreas Legner showed a newer version adding a name column. Jacob wrote his own Perl script.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Versions, Editions & End-of-Life
Hi Folks.
I'm tyink I've managed to work around my ignorance of the sysmaster tables in relation to onstat -g opn. However, I have another hurdle here. Not critical, I think, but someone need to update this. Here's the sample output in the 12.0 Administrator's Manual:
Even
Paul Watson's page
on the matter needs some updating. Because when *I* run it, here's what I see:
IBM Informix Dynamic Server Version 12.10.FC12 -- On-Line (Prim) -- Up 11:30:09 -- 186675748 Kbytes
...rstcb 0x274c847a8 tid 961
isfd op_mode op_flags partnum ucnt ocnt lk ra partp ocnt ucnt
0 0x400 0x317 0x1500002 2 2 1 0x277f68a38 152 152
1 0x2 0x3 0x1500002 2 2 0 0x277f68a38 152 152
2 0x400 0x317 0x100004 2 2 1 0x276e29890 731 731
3 0x2 0x3 0x100004 2 2 0 0x276e29890 731 731
rstcb 0x274c87458 tid 686
isfd op_mode op_flags partnum ucnt ocnt lk ra partp ocnt ucnt
0 0x400 0x317 0xe00002 2 2 1 0x2760b2028 1850 1850
1 0x2 0x3 0xe00002 2 2 0 0x2760b2028 1850 1850
rstcb 0x274c88638 tid 663
isfd op_mode op_flags partnum ucnt ocnt lk ra partp ocnt ucnt
0 0x400 0x317 0xc00002 2 2 41 0x275508700 5 5
1 0x2 0x3 0xc00002 2 2 0 0x275508700 5 5
As y'all can see, the partnum column has shifted left, there is a sub-heading under each rstcb line and there is a new column, partp. I got not a clue on what these columns mean but the manual sure ain't the place to seek this no-doubt valuable information.
Anybody else out there does got a clue, please educate the rest of us. Fortunately for *me*, all I really needed was the the partnum, which takes me to systamnames and systabinfo. Andit might be helpful to know what those counts are (ocnt and ucnt), if they ever differ. I do hope that those two flag words are still still correctly documented.
Education, anyone? Hasn't anyone else noticed this?
Thanks much, folks!
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
#Informix
The new output is a lot easier to read but hard to parser via a script.
The u and o counts are the number of threads currently using the partnum
(u) and the total times the partnum (o) has been opened.
The partp is new one on me, the ra (guess) will tally back to the onstat
-g rah. The lk was the old lockmode
The op_mode, lk, op_flags should the same as before. I have not seen any
new ones, but I haven't bothered looking
Cheers
Paul
> Hi Folks.
>
> I'm tyink I've managed to work around my ignorance of the sysmaster tables
> in relation to onstat -g opn. However, I have another hurdle here. Not
> critical, I think, but someone need to update this. Here's the sample
> output in the 12.0 Administrator's Manual:
>
>
>
> Even Paul Watson's page
>
#Informix
Hi Jacob.
You may find this useful:
https://sourceforge.net/projects/iiug-software-repository/files/DBAdmin-Tools/partn-2.0.tgz/download
It's used to filter onstat output, appending to each line the object name decoded from a part number in a specified column number.
Regards,
Doug
------------------------------
Doug Lawry
------------------------------
For what it's worth, here's what this looks like in 12.10.xC13/14.10.xC2: rstcb 0x44c09c68 tid 47 isfd op_mode op_flags partnum ucnt ocnt lk ra partp ocnt ucnt name 0 0x400 0x297 0x1000c0 2 2 X 1 0x47951028 4 5 sysadmin:informix.systables 1 0x2 0x117 0x1000c0 2 2 X 0 0x47951028 4 5 sysadmin:informix.systables 2 0x1000402 0x403 0x100108 2 0 IX 0 0x47ab4250 0 7 sysadmin:informix.ph_task 3 0x1000442 0x403 0x10010a 2 0 X 0 0x47afcb30 0 3 sysadmin:informix.ix_ph_task_01 4 0x1000400 0x403 0x100108 2 0 IX 0 0x47ab4250 0 7 sysadmin:informix.ph_task 5 0x1000440 0x403 0x10010a 2 0 X 0 0x47afcb30 0 3 sysadmin:informix.ix_ph_task_01 6 0x1000400 0x403 0x10010d 4 0 IX 0 0x47afc650 0 3 sysadmin:informix.ph_run 7 0x1000440 0x403 0x100110 3 0 IX 1 0x474af028 0 2 sysadmin:informix.ix_ph_run_03 So object (table/index) names already readily available. ------------------------------ Andreas Legner ------------------------------
Thanks, Andreas - that's much easier! ------------------------------ Doug Lawry ------------------------------
ra column is the current readahead for the instance
partp is the memory address of the structure that describes the tablespace
i.e. partnum
Cheers
Paul
> Hi Folks.
>
> I'm tyink I've managed to work around my ignorance of the sysmaster tables
> in relation to onstat -g opn. However, I have another hurdle here. Not
> critical, I think, but someone need to update this. Here's the sample
> output in the 12.0 Administrator's Manual:
>
>
>
> Even Paul Watson's page
>
#Informix
Thanks, Doug.
I see this was written by
Richard Harnden, to give credit to his hard work.
However, my
Fragments script
(written in Perl) does the same and more. What I needed was a script to reverse the new onstat -g opn output. The onstat lists the tables (ugh - partitions numbers) open by each user. I am currently writing a Perl script to reverse that - List all the users that have a table open. And it will display the complete table names, pulled from systabinfo, as well as session information so I can track down who has a table open.
Yes it's in Perl also. Struggling a bit with two-dimensional hashes but that's for a different forum.
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
OK, Folks.
My solution was to write a Perl script that reverses the master-detail relationship: For every table [that is open] list all users. Starting from the rstcb, find my way to the session (onstat -u) and with the session id, find my way to the host and the actual program executing via onstat -g ses nnnn. And from the partnum, get to the juicy information about the table, using my oooooold utility, partition-list.sh.
I can't publish that right now and, in any case, would have preferred to use newer newer Perl package DBspaces.pm, which has been available on IIUG for at least 1 year.
Paul posted some info about the other columns but, fortunately, I didn't need them. The line is wide enough as it is. :-)
Thanks all who gave me a hand. Paul's was the most helpful.
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
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