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.
in4mixDBA wanted to count truly active user sessions via the sysmaster SMI tables, not just connected ones. Jerry Hamilton suggested 'onstat -u|grep active', which the poster said counts connected users only. Eric Rowell offered 'onstat -g sql' filtering out idle sessions (IDS 9.40), and another poster gave an SMI query joining syssqexplain, sysscblst and sysopendb. No final confirmation.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Am I missing something here??? How about:
"onstat -u|grep active"
-----Original Message-----
From: informix-list-bounces@iiug.org
[mailto:informix-list-bounces@iiug.org] On Behalf Of in4mixDBA
Sent: Friday, August 25, 2006 7:54 AM
To: informix-list@iiug.org
Subject: Number of Active user sessions
Hello,
How can I query the sysmaster SMI tables to get the number of "Active"
user sessions. I know that I can get the total number of user sessions
from syssessions. However, I would like the "Active" sessions.
Thank you in advance,
Have a great day...
TGIF...
Dave
In4MixDBA@gmail.com
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
Thanx for all your help....
I would like to run an SQL query on the sysmaster databases..... to get
the number of sessions actively running a query.... we have many users
that may be connected but not necessarily doing anything....
Also, "onstat -u|grep active" gives the number of users connected to
the database not necessarily the sessions that are actively running a
sql command or waiting for a lock/buffer etc.....
Thank you,
Dave
Hamilton, Jerry wrote:
> Am I missing something here??? How about:
>
> "onstat -u|grep active"
>
> -----Original Message-----
> From: informix-list-bounces@iiug.org
> [mailto:informix-list-bounces@iiug.org] On Behalf Of in4mixDBA
> Sent: Friday, August 25, 2006 7:54 AM
> To: informix-list@iiug.org
> Subject: Number of Active user sessions
>
> Hello,
>
> How can I query the sysmaster SMI tables to get the number of "Active"
> user sessions. I know that I can get the total number of user sessions
> from syssessions. However, I would like the "Active" sessions.
>
> Thank you in advance,
>
> Have a great day...
>
> TGIF...
>
> Dave
> In4MixDBA@gmail.com
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
↪ replying to in4mixDBA
Eric Rowell — — source: Usenet: comp.databases.informix
on IDS 9.40 the following will give you users that are running
"things" but this is not using the SMI tables in a query.
onstat -g sql |grep -v "-"
Users that are idle at the second of the check would have a "-" in the
second column of the "onstat -g sql"
On 25 Aug 2006 06:39:18 -0700, in4mixDBA <In4MixDBA@gmail.com> wrote:
> Thanx for all your help....
>
> I would like to run an SQL query on the sysmaster databases..... to get
> the number of sessions actively running a query.... we have many users
> that may be connected but not necessarily doing anything....
>
> Also, "onstat -u|grep active" gives the number of users connected to
> the database not necessarily the sessions that are actively running a
> sql command or waiting for a lock/buffer etc.....
>
>
> Thank you,
>
> Dave
>
> Hamilton, Jerry wrote:
> > Am I missing something here??? How about:
> >
> > "onstat -u|grep active"
> >
> > -----Original Message-----
> > From: informix-list-bounces@iiug.org
> > [mailto:informix-list-bounces@iiug.org] On Behalf Of in4mixDBA
> > Sent: Friday, August 25, 2006 7:54 AM
> > To: informix-list@iiug.org
> > Subject: Number of Active user sessions
> >
> > Hello,
> >
> > How can I query the sysmaster SMI tables to get the number of "Active"
> > user sessions. I know that I can get the total number of user sessions
> > from syssessions. However, I would like the "Active" sessions.
> >
> > Thank you in advance,
> >
> > Have a great day...
> >
> > TGIF...
> >
> > Dave
> > In4MixDBA@gmail.com
> >
> > _______________________________________________
> > Informix-list mailing list
> > Informix-list@iiug.org
> > http://www.iiug.org/mailman/listinfo/informix-list
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
What about this -
select CURRENT YEAR TO SECOND,
sqx_sessionid,username,sd.odb_dbname,sqx_seqscan,sqx_sqlstatement
from syssqexplain sq, sysscblst sc , sysopendb sd
where sq.sqx_sessionid = sc.sid
and sc.sid = sd.odb_sessionid
and sd.odb_dbname <> 'sysmaster'
and length(sqx_sqlstatement) > 0
and sqx_sqlstatement not like "%tabid = 1%"
Have fun.
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.