How to monitor wait conditions and times
Posted in 2017
Topics: General Discussion
Have a complex application. Want to monitor when a thread has a wait condition and for how long it lasts. systhreads table has the below columns. The th_startwait column allows the wait time to be calculated. Have not been able to determine how th_conwait can be interpreted. Does anyone know? Thanks in advance. th_conwait INTEGER The address of the condition that this thread is waiting for. th_waketime INTEGER The time of the expiration of the last sleep. The time is calculated by an internal clock. A value of -1 means that the time value is indeterminate. th_startwait INTEGER The time when the last wait began. The time is calculated by an internal clock. th_startrun INTEGER The time when the last execution began. The time is calculated by an internal clock.
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.70.0/com.ibm.adref.doc/ ids_adr_0264.htm th_conwait "The address of the condition that this thread is waiting for." This would then resumably join to sysconditions.con_address. The systhreads table only contains the current wait and there is no way you will be able to sample it fast enough to catch all waits. You could use https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.70.0/com.ibm.adref.doc/ ids_adr_0592.htm but that would have too much overhead for production. Why do you want to monitor when a thread has a wait condition? For performance monitoring you probably want sql tracing. https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.admin.doc/ids_ admin_1129.htm Or more lightweight periodically polling sysesprof for dsksorts/high bufreads and syslocks for blocking. Regards, David. > On 02 August 2017 at 01:37 JOSEPH FREEMAKER <joseph_freemaker@yahoo.com> wrote: > > > Have a complex application. Want to monitor when a thread has a wait condition > and for how long it lasts. > > systhreads table has the below columns. The th_startwait column allows the > wait time to be calculated. Have not been able to determine how th_conwait can > be interpreted. > > Does anyone know? Thanks in advance. > > th_conwait INTEGER The address of the condition that this thread is waiting > for. > th_waketime INTEGER The time of the expiration of the last sleep. The time is > calculated by an internal clock. A value of -1 means that the time value is > indeterminate. > th_startwait INTEGER The time when the last wait began. The time is calculated > by an internal clock. > th_startrun INTEGER The time when the last execution began. The time is > calculated by an internal clock. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
Look about QSTAT WSTAT and monitor with onstat -g qst / wst do not give
the information you need.
Em ter, 1 de ago de 2017 22:22, david@smooth1.co.uk <david@smooth1.co.uk>
escreveu:
>
>
>
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.70.0/com.ibm.adref.doc/
ids_adr_0264.htm
>
> th_conwait "The address of the condition that this thread is waiting for."
>
> This would then resumably join to sysconditions.con_address.
>
> The systhreads table only contains the current wait and there is no way you
> will be able to sample it fast enough to catch all waits.
>
> You could use
>
>
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.70.0/com.ibm.adref.doc/
ids_adr_0592.htm
> but that would have too much overhead for production.
>
> Why do you want to monitor when a thread has a wait condition?
>
> For performance monitoring you probably want sql tracing.
>
>
>
>
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.admin.doc/ids_
admin_1129.htm
>
> Or more lightweight periodically polling sysesprof for dsksorts/high
> bufreads
> and syslocks for blocking.
>
> Regards,
> David.
>
> > On 02 August 2017 at 01:37 JOSEPH FREEMAKER <joseph_freemaker@yahoo.com>
> wrote:
> >
> >
> > Have a complex application. Want to monitor when a thread has a wait
> condition
> > and for how long it lasts.
> >
> > systhreads table has the below columns. The th_startwait column allows
> the
> > wait time to be calculated. Have not been able to determine how
> th_conwait
> can
> > be interpreted.
> >
> > Does anyone know? Thanks in advance.
> >
> > th_conwait INTEGER The address of the condition that this thread is
> waiting
> > for.
> > th_waketime INTEGER The time of the expiration of the last sleep. The
> time
> is
> > calculated by an internal clock. A value of -1 means that the time value
> is
> > indeterminate.
> > th_startwait INTEGER The time when the last wait began. The time is
> calculated
> > by an internal clock.
> > th_startrun INTEGER The time when the last execution began. The time is
> > calculated by an internal clock.
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
QSTAT and WSTAT add a ton of overhead when they are enabled. Not for the
faint of heart! Only to be turned on to diagnose specific problems and only
for a fairly short time!
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on 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 2, 2017 at 3:50 PM, Cesar Martins <
cesar.inacio.martins@gmail.com> wrote:
> Look about QSTAT WSTAT and monitor with onstat -g qst / wst do not give
> the information you need.
>
> Em ter, 1 de ago de 2017 22:22, david@smooth1.co.uk <david@smooth1.co.uk>
> escreveu:
>
> >
> >
> >
> https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.
> 70.0/com.ibm.adref.doc/ids_adr_0264.htm
> >
> > th_conwait "The address of the condition that this thread is waiting
> for."
> >
> > This would then resumably join to sysconditions.con_address.
> >
> > The systhreads table only contains the current wait and there is no way
> you
> > will be able to sample it fast enough to catch all waits.
> >
> > You could use
> >
> >
> https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.
> 70.0/com.ibm.adref.doc/ids_adr_0592.htm
> > but that would have too much overhead for production.
> >
> > Why do you want to monitor when a thread has a wait condition?
> >
> > For performance monitoring you probably want sql tracing.
> >
> >
> >
> >
> https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/
> com.ibm.admin.doc/ids_admin_1129.htm
> >
> > Or more lightweight periodically polling sysesprof for dsksorts/high
> > bufreads
> > and syslocks for blocking.
> >
> > Regards,
> > David.
> >
> > > On 02 August 2017 at 01:37 JOSEPH FREEMAKER <
> joseph_freemaker@yahoo.com>
> > wrote:
> > >
> > >
> > > Have a complex application. Want to monitor when a thread has a wait
> > condition
> > > and for how long it lasts.
> > >
> > > systhreads table has the below columns. The th_startwait column allows
> > the
> > > wait time to be calculated. Have not been able to determine how
> > th_conwait
> > can
> > > be interpreted.
> > >
> > > Does anyone know? Thanks in advance.
> > >
> > > th_conwait INTEGER The address of the condition that this thread is
> > waiting
> > > for.
> > > th_waketime INTEGER The time of the expiration of the last sleep. The
> > time
> > is
> > > calculated by an internal clock. A value of -1 means that the time
> value
> > is
> > > indeterminate.
> > > th_startwait INTEGER The time when the last wait began. The time is
> > calculated
> > > by an internal clock.
> > > th_startrun INTEGER The time when the last execution began. The time is
> > > calculated by an internal clock.
> > >
> > >
> > >
> >
> >
> ************************************************************
> *******************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> >
> >
> >
> >
> ************************************************************
> *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>