RE: What's happening inside the oninit process ?
Posted in 2001
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C090A3.69044390
Content-Type: text/plain;
charset="ISO-8859-1"
-----Original Message-----
From: Mark D. Stock [mailto:mdstock@mydas.freeserve.co.uk]
Sent: Tuesday, February 06, 2001 4:11 PM
To: Dirk Moolman
Cc: informix-list
Subject: Re: What's happening inside the oninit process ?
> Dirk Moolman wrote:
>
> Hallo everyone, I'm not sure how to word this question.
>
> Regarding the oninit processes running on our machine, is it possible
> to see inside the process to see which users are causing the oninit to
> do so much work ?
>
> One thing we do is to run "top" to identify the top processes on the
> server. The oninit processes sit right on top - where they should
> be, but they don't always do the same amount of work. If we have
> badly written code, it will still be the oninit doing all the work, so
> how do I trace the problem from the oninit back to the "bad program" /
> user ?
Well, this may not be exactly what you are looking for, but you can identify
which sessions are running high cost SQL statements against the engine.
SQL:
database sysmaster;
select s.username,
s.pid unix_pid,
s.hostname,
s.tty,
q.sqx_estcost,
q.sqx_estrows,
q.sqx_sqlstatement
from syssessions s,
syssqexplain q
where s.sid = q.sqx_sessionid
and q.sqx_estcost > 500
order by q.sqx_estcost desc;
OUTPUT:
username jsmith
unix_pid 21506
hostname florida1
tty /dev/pts/3
sqx_estcost 525
sqx_estrows 8
sqx_sqlstatement
select * from customer, orders
where customer.customer_num = orders.customer_num
and ship_date > "01/01/1976"
Note on the output: This is only one of several rows that will be returned.
They will be in order from highest to lowest estimated cost.
I know this is not exactly what you were asking for, but it will give you
the UNIX pid for the processes that need to be looked at.
HTH
Harold Luse, Trainer
Informix Software, Inc.
------_=_NextPart_001_01C090A3.69044390
Content-Type: text/html;
charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DISO-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: What's happening inside the oninit process ?</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Mark D. Stock [<A =
HREF=3D"mailto:mdstock@mydas.freeserve.co.uk">mailto:mdstock@mydas.frees=
erve.co.uk</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, February 06, 2001 4:11 PM</FONT>
<BR><FONT SIZE=3D2>To: Dirk Moolman</FONT>
<BR><FONT SIZE=3D2>Cc: informix-list</FONT>
<BR><FONT SIZE=3D2>Subject: Re: What's happening inside the oninit =
process ?</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>> Dirk Moolman wrote:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Hallo everyone, I'm not sure how to word =
this question.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Regarding the oninit processes running on our =
machine, is it possible</FONT>
<BR><FONT SIZE=3D2>> to see inside the process to see which users =
are causing the oninit to</FONT>
<BR><FONT SIZE=3D2>> do so much work ?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> One thing we do is to run "top" to =
identify the top processes on the</FONT>
<BR><FONT SIZE=3D2>> server. The oninit processes sit =
right on top - where they should</FONT>
<BR><FONT SIZE=3D2>> be, but they don't always do the same amount of =
work. If we have</FONT>
<BR><FONT SIZE=3D2>> badly written code, it will still be the oninit =
doing all the work, so</FONT>
<BR><FONT SIZE=3D2>> how do I trace the problem from the oninit back =
to the "bad program" /</FONT>
<BR><FONT SIZE=3D2>> user ?</FONT>
</P>
<P><FONT SIZE=3D2>Well, this may not be exactly what you are looking =
for, but you can identify which sessions are running high cost SQL =
statements against the engine.</FONT></P>
<P><FONT SIZE=3D2>SQL:</FONT>
<BR><FONT SIZE=3D2>database sysmaster;</FONT>
<BR><FONT SIZE=3D2>select s.username,</FONT>
<BR><FONT =
SIZE=3D2> s.pid =
unix_pid,</FONT>
<BR><FONT =
SIZE=3D2> =
s.hostname,</FONT>
<BR><FONT =
SIZE=3D2> =
s.tty,</FONT>
<BR><FONT =
SIZE=3D2> =
q.sqx_estcost,</FONT>
<BR><FONT =
SIZE=3D2> =
q.sqx_estrows,</FONT>
<BR><FONT =
SIZE=3D2> =
q.sqx_sqlstatement</FONT>
<BR><FONT SIZE=3D2> from syssessions s, </FONT>
<BR><FONT =
SIZE=3D2> =
syssqexplain q</FONT>
<BR><FONT SIZE=3D2> where s.sid =3D q.sqx_sessionid</FONT>
<BR><FONT SIZE=3D2> and q.sqx_estcost =
> 500</FONT>
<BR><FONT SIZE=3D2> order by q.sqx_estcost desc;</FONT>
</P>
<P><FONT SIZE=3D2>OUTPUT:</FONT>
<BR><FONT =
SIZE=3D2>username =
jsmith</FONT>
<BR><FONT =
SIZE=3D2>unix_pid &=
nbsp; 21506</FONT>
<BR><FONT =
SIZE=3D2>hostname =
florida1</FONT>
<BR><FONT =
SIZE=3D2>tty =
/dev/pts/3</FONT>
<BR><FONT SIZE=3D2>sqx_estcost =
525</FONT>
<BR><FONT SIZE=3D2>sqx_estrows 8</FONT>
<BR><FONT SIZE=3D2>sqx_sqlstatement </FONT>
<BR><FONT SIZE=3D2>select * from customer, orders</FONT>
<BR><FONT SIZE=3D2> where customer.customer_num =3D =
orders.customer_num</FONT>
<BR><FONT SIZE=3D2> and ship_date > =
"01/01/1976"</FONT>
</P>
<P><FONT SIZE=3D2>Note on the output: This is only one of several rows =
that will be returned. They will be in order from highest to =
lowest estimated cost.</FONT></P>
<P><FONT SIZE=3D2>I know this is not exactly what you were asking for, =
but it will give you the UNIX pid for the processes that need to be =
looked at.</FONT></P>
<P><FONT SIZE=3D2>HTH</FONT>
</P>
<P><FONT SIZE=3D2>Harold Luse, Trainer</FONT>
<BR><FONT SIZE=3D2>Informix Software, Inc.</FONT>
</P>
</B