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.
User asked how "onstat -u" calculates max concurrent sessions in Informix 7.3. The sysmaster table columns sh_curmaxcons and sh_ovlmaxcons were not available in that version. An expert confirmed the values are stored in shared memory but only accessible via onstat -u command itself; no alternative SQL query or file path provides direct access to this metric.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
ANKAN KANUNGO — — source: IIUG Forums & Mailing Lists
hi all,
I have a query on usage of command "onstat -u".
How exactly does the command "onstat -u" calculates the Max concurrent
sessions??
I checked and found that it is stored in some sysmaster table with this query-
select sh_curmaxcons CURRENT_USERS,
sh_ovlmaxcons MAX_USERS from
sysmaster:sysshmvals
But in my version of IDS (am using 7.3) this 2 columns are not there in that
table.
Can someone suggest from where this value is fetched??
thanks in advance...
Ankan
AFAIK In that old version those values were not exposed to the sysmaster
tables. Sorry.
Art
On Jul 6, 2012 6:27 AM, "ANKAN KANUNGO" <kanungo.ankan@gmail.com> wrote:
> hi all,
> I have a query on usage of command "onstat -u".
> How exactly does the command "onstat -u" calculates the Max concurrent
> sessions??
> I checked and found that it is stored in some sysmaster table with this
> query-
>
> select sh_curmaxcons CURRENT_USERS,
>
> sh_ovlmaxcons MAX_USERS from
>
> sysmaster:sysshmvals
>
> But in my version of IDS (am using 7.3) this 2 columns are not there in
> that
> table.
>
> Can someone suggest from where this value is fetched??
>
> thanks in advance...
> Ankan
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae93405258494a204c427ceaf
thanks for the updates...
is there any other why from where I can get this value ?
I mean as this value is being the same since the system/IDS is re-initialized.
so it should have been stored somewhere on some path or may be on shared
memory.
can you share some information on that front?
Try & customise this SQL Stmt:
select count(*) concurrentsessions
from sysmaster:sysrstcb
where sysmaster:bitval(flags,1)>0 { only count busy threads }
and sysmaster:bitval(flags,'0x80000')!=0 { only count primary threads }
and sysmaster:bitval(flags,'0x200')==0 { remove daemon threads}
and sysmaster:bitval(flags,'0x40')==0 { remove log backup users }
and sysmaster:bitval(flags,'0x80')==0 { remove onmonitor users }
and sysmaster:bitval(flags,'0x2000')==0 { remove page cleaners}
and sysmaster:bitval(flags,'0x00000400')==0 { remove archive threads}
and sysmaster:bitval(flags,'0x00004000')==0 { remove recovery threads}
and sysmaster:bitval(flags,'0x00100000')==0 { remove idx blder }
and sysmaster:bitval(flags,'0x00200000')==0 { remove btree scanner }
and sysmaster:bitval(flags,'0x04000000')==0 { remove main loop}
and flags < "0x20000000"; {add quotes around 0x20000000 (e.g. flags <'0x2000000}
Hope it help
On Fri, Jul 6, 2012 at 8:05 PM, ANKAN KANUNGO <kanungo.ankan@gmail.com>wrote:
> thanks for the updates...
> is there any other why from where I can get this value ?
> I mean as this value is being the same since the system/IDS is
> re-initialized.
> so it should have been stored somewhere on some path or may be on shared
> memory.
> can you share some information on that front?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8f2344751f1a5e04c428f291
thanks for the information...
Yes I tried running this query...and gives me the active user count currently
on my system which matches with "onstat -u" output for active users.
But as "onstat -u" gives 3 counts
1) current active users.
2) total users allowed
3) the max. concurrent since server is initialized.
And for my requirement am trying to find the source from where the 2nd and
specially the third vales are fetched.
I need specially the the max. concurrent users (the 3rd output )....
if we have any similar sql/script/some $INFORMIXDIR path which can fetch me
this 3rd value , so that I can compare/validate it with 3rd output value of of
this onstat command??
Thanks
Ankan
Stored in sharedemory, but only accessible using onstat -u.
Art
On Jul 6, 2012 8:05 AM, "ANKAN KANUNGO" <kanungo.ankan@gmail.com> wrote:
> thanks for the updates...
> is there any other why from where I can get this value ?
> I mean as this value is being the same since the system/IDS is
> re-initialized.
> so it should have been stored somewhere on some path or may be on shared
> memory.
> can you share some information on that front?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec5186da04f9e1e04c42a19a3
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.