RE: Number of Active user sessions
Posted in 2006
Topics: Server Administration
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
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.