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.
A user asked how to see which Informix session is consuming how much CPU. John Miller suggested 'onstat -g cpu' (version 11+) or the cpu_time column in sysmaster:systcblst, and, to tie CPU time to a session, the query: select sid, trunc(cpu_time,4), username from sysrstcb R, systcblst T where R.mttcb = T.address. Art Kagel added that thread CPU in systcblst links via sysrstcb (tid/sid) to syssessions, and gave a broader join across syssessions, syssesprof, sysrstcb, sysscblst and systcblst. Question answered.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
If you are using version 11 or higher just run
onstat -g cpu
or look in the table sysmaster:systcblst the column called cpu_time.
John F. Miller III
STSM, Support Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 08/24/2010 11:19:50 PM:
> From:
>
> "KHURRAM SHAHZAD" <kshahzad02@i2cinc.com>
>
> To:
>
> ids@iiug.org
>
> Date:
>
> 08/24/2010 11:20 PM
>
> Subject:
>
> monitoring CPU [21052]
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Hi,
>
> I want to monitor which session id using how much CPU?
>
> Please guide me in this regard.
>
> thanks,
>
> Khurram Shahzad.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Run the following query from sysmaster database.
select sid, trunc(cpu_time,4), username
from sysrstcb R, systcblst T
where R.mttcb = T.address
John F. Miller III
STSM, Support Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 08/24/2010 11:59:08 PM:
> From:
>
> "KHURRAM SHAHZAD" <kshahzad02@i2cinc.com>
>
> To:
>
> ids@iiug.org
>
> Date:
>
> 08/25/2010 12:00 AM
>
> Subject:
>
> Re: monitoring CPU [21054]
>
> Sent by:
>
> ids-bounces@iiug.org
>
> how can we map the out put with session id?
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
CPU usage is kept by thread in the SMI (sysmaster database) table
systcblst. You can relate that to the session using the thread id column
(tid) in sysrstcb which links to syssessions by the sid column. Other
session and thread level information is in SMI tables syssessions,
syssesprof, sysscblst, and sysrstcb. A query to get it all would be:
select *
from syssessions ss, syssesprof sp, sysrstcb sr, sysscblst sc, systcblst st
where ss.sid = sp.sid
and ss.sid = sr.sid
and ss.sid = sc.sid
and sr.tid = st.tid;
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, 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.
On Wed, Aug 25, 2010 at 2:19 AM, KHURRAM SHAHZAD <kshahzad02@i2cinc.com>wrote:
> Hi,
>
> I want to monitor which session id using how much CPU?
>
> Please guide me in this regard.
>
> thanks,
>
> Khurram Shahzad.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016e68ea0e5f1971c048ea4d493
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.