Hi, Y'all.
No, I have not forgotten the discussion; I just had to put it aside for a little. But here's what I *think* I can do, since everyone seems to be stumped on the original question. (Remember, that was: What sysmaster table holds the partition-related data for onstat -g opn?)
Suppose I give up (for the moment) getting it all from sysmaster and start with onstat -g opn. The heading for each thread has a tid and an rstcb address. The latter, in retrospect, seems less important. But maybe I can use the tid to peek into systhreads, where column th_id does indeed match the tid in the section header. From there I thought I could look into sysrstcb and match up to syssesions. Alas, this deck is stacked against me.
Here's the problem, at risk of opening a whole new can of worms:
onstat -g opn
IBM Informix Dynamic Server Version 12.10.FC12 -- On-Line (Prim) -- Up 5 days 10:20:34 -- 186675748 Kbytes
rstcb 0x274c213e8 tid 451
isfd op_mode op_flags partnum ucnt ocnt lk ra partp ocnt ucnt
0 0x70000 0x403 0x2a000e5 1 0 0 0x28e7d8a38 0 2
1 0x70000 0x403 0x2a000ea 1 0 0 0x27c9d1028 0 3
2 0x70000 0x403 0x2a00065 1 0 0 0x27bfc45d0 0 3
3 0x70000 0x403 0x2b0012e 1 0 0 0x2829836e0 0 4
4 0x70000 0x403 0x2300010 1 0 0 0x27922d738 0 1
5 0x70000 0x403 0x2f0071f 1 0 0 0x2c9780028 0 1
....
Sure enough, that tid and address show up on onstat -g ath:
$ onstat -g ath | grep 274e3f028
451 274e3f028 274c213e8 3 cond wait ReadAhead 1cpu readahead_0
And indeed, I can find that TID in systhreads:
select th_id, hex(th_addr) th_addr
from systhreads
where th_id = 451
th_id th_addr
451 0x0000000274e3f028
Now, the th_addr does not match the rstrcb address on the -g opn output. However, the third column of onstat -g ath *does* match the rstcb of the opn output. But when I try to find that TID in sysrstcb, I'm outaluck:
select tid, uid, sid, hex(address) address, hex(txp) txp
from sysrstcb
where tid = 451
No rows found.
That is truly unfortunate, because I had thought I could use sysrstcb to tie together the TID with the session and chase that up to the pid of the client program and, stepping out to Shell commands, get the command line.
SO the TID is sysrstcb seems unrelated to the th_id in systhreads.
Bummer, unless someone has an insight that can unbummer this turn of events!
Hey, I'm still open to suggestions. This has been an eye-opener!
By the way, it's pretty d**n awkward trying to run a query to match a hex value provided in an onstat command. Is there an SQL built-in function that would match up the numeric values of hex values?
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
Original Message:
Sent: Thu January 16, 2020 04:49 PM
From: Paul Watson
Subject: onstat -g opn: What sysmaster tables will get me this info?
My bad – doing it from memory – isfd (sysrstcb) and sdb_isfd (sysdbsblock)
Original Message------
Paul:
I don't find any column in sysmaster named filefd.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
#Informix