Search Box

Google

Sunday, December 10, 2006

Number of Active user sessions
All 6 messages in topic - view as tree
From: in4mixDBA - view profile
Date: Fri, Aug 25 2006 2:53 pm
Email: "in4mixDBA"


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
In4Mix...@gmail.com


Reply Rate this post:


From: Hamilton, Jerry - view profile
Date: Fri, Aug 25 2006 2:57 pm
Email: "Hamilton, Jerry"


Am I missing something here??? How about:

"onstat -u|grep active"



- Hide quoted text -
- Show quoted text -

-----Original Message-----
From: informix-list-boun...@iiug.org

[mailto:informix-list-boun...@iiug.org] On Behalf Of in4mixDBA
Sent: Friday, August 25, 2006 7:54 AM
To: informix-l...@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
In4Mix...@gmail.com


_______________________________________________
Informix-list mailing list
Informix-l...@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list



Reply Rate this post: Text for clearing space


From: in4mixDBA - view profile
Date: Fri, Aug 25 2006 3:39 pm
Email: "in4mixDBA"

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



- Hide quoted text -
- Show quoted text -

Hamilton, Jerry wrote:
> Am I missing something here??? How about:

> "onstat -u|grep active"


> -----Original Message-----
> From: informix-list-boun...@iiug.org
> [mailto:informix-list-boun...@iiug.org] On Behalf Of in4mixDBA
> Sent: Friday, August 25, 2006 7:54 AM
> To: informix-l...@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
> In4Mix...@gmail.com


> _______________________________________________
> Informix-list mailing list
> Informix-l...@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list



Reply Rate this post: Text for clearing space


From: Eric Rowell - view profile
Date: Fri, Aug 25 2006 6:12 pm
Email: "Eric Rowell"

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 wrote:



- Hide quoted text -
- Show quoted text -

> 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-boun...@iiug.org
> > [mailto:informix-list-boun...@iiug.org] On Behalf Of in4mixDBA
> > Sent: Friday, August 25, 2006 7:54 AM
> > To: informix-l...@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
> > In4Mix...@gmail.com


> > _______________________________________________
> > Informix-list mailing list
> > Informix-l...@iiug.org
> > http://www.iiug.org/mailman/listinfo/informix-list


> _______________________________________________
> Informix-list mailing list
> Informix-l...@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list



Reply Rate this post: Text for clearing space


From: har...@yahoo.com - view profile
Date: Mon, Aug 28 2006 2:57 am
Email: har...@yahoo.com


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.


Reply Rate this post: Text for clearing space


From: SaltTan - view profile
Date: Mon, Aug 28 2006 7:52 am
Email: "SaltTan"


May be this query can help you
It shows sessions that are not waiting for condition

select s.sid
from sysscblst s, sysrstcb r, systcblst t
where s.sid = r.sid and t.address=r.mttcb
and wtcondp = 0



- Hide quoted text -
- Show quoted text -

in4mixDBA wrote:
> 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
> In4Mix...@gmail.com



Reply Rate this post: Text for clearing space


End of messages

No comments: