<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Systematic application troubleshooting in Unix</title>
	<atom:link href="http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Wed, 10 Mar 2010 08:52:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: metin2 hileleri</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-3953</link>
		<dc:creator>metin2 hileleri</dc:creator>
		<pubDate>Mon, 01 Mar 2010 00:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-3953</guid>
		<description>Thanks Hemant, i wrote a another quick blog entry about it!</description>
		<content:encoded><![CDATA[<p>Thanks Hemant, i wrote a another quick blog entry about it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 8 Useful Technical Posts &#8230; - Sinoptix</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-249</link>
		<dc:creator>8 Useful Technical Posts &#8230; - Sinoptix</dc:creator>
		<pubDate>Sat, 02 Feb 2008 06:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-249</guid>
		<description>[...] my pockets, so to speak. First of all, I liked both the technical content of Tanel Poder&#039;s blog on Systematic application troubleshooting in Unix and also the rants, despite the fact he tried not to spend too much time on the latter  I hope he [...]</description>
		<content:encoded><![CDATA[<p>[...] my pockets, so to speak. First of all, I liked both the technical content of Tanel Poder&#8217;s blog on Systematic application troubleshooting in Unix and also the rants, despite the fact he tried not to spend too much time on the latter  I hope he [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virag Sharma</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-248</link>
		<dc:creator>Virag Sharma</dc:creator>
		<pubDate>Sat, 19 Jan 2008 03:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-248</guid>
		<description>Thanks Tanel , your script sw.sql is very useful.</description>
		<content:encoded><![CDATA[<p>Thanks Tanel , your script sw.sql is very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-242</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Tue, 15 Jan 2008 09:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-242</guid>
		<description>Hi Virag,

Note the context of my post, I deliberately mentioned &quot;first round session troubleshooting&quot; in italic in my post.

E.g. the first thing you check when you want to troubleshoot a specific session.

You can get there both ways, either start from v$session_wait or OS level stats.

The difference is that the v$session_wait will give you better, narrower focus (in other words it rules out more potential causes).

When you check for CPU usage of a process, then no matter what result you get (either the process is sleeping, is 50% on CPU or 100% on CPU), you still have to log on to database and continue your investigation there.

If you start from logging on to database and look into v$session_wait, then it can rule out many things which would require logging on to OS and using OS tools. For example (again) if you see the session waiting for TX enqueue for last 30minutes or for &quot;log file switch (archiving needed&quot;) then you probably do not care about the current CPU usage of the problem session.

Of course, checking &quot;environmental factors&quot; like current CPU runqueue lengths, disk IO queuing and service times, can very well be necessary in many cases - but it&#039;s worth taking your time to check these only when a simple query against v$session_wait has ruled out many other &quot;usual suspects&quot;.

Note that after I wrote Snapper, I use sw.sql much less. Depending on the type of problem (and previous experience regarding that environment) I may start with Snapper instead as it gives a better overview of what&#039;s going on when a session is actually doing something and not hung.</description>
		<content:encoded><![CDATA[<p>Hi Virag,</p>
<p>Note the context of my post, I deliberately mentioned &#8220;first round session troubleshooting&#8221; in italic in my post.</p>
<p>E.g. the first thing you check when you want to troubleshoot a specific session.</p>
<p>You can get there both ways, either start from v$session_wait or OS level stats.</p>
<p>The difference is that the v$session_wait will give you better, narrower focus (in other words it rules out more potential causes).</p>
<p>When you check for CPU usage of a process, then no matter what result you get (either the process is sleeping, is 50% on CPU or 100% on CPU), you still have to log on to database and continue your investigation there.</p>
<p>If you start from logging on to database and look into v$session_wait, then it can rule out many things which would require logging on to OS and using OS tools. For example (again) if you see the session waiting for TX enqueue for last 30minutes or for &#8220;log file switch (archiving needed&#8221;) then you probably do not care about the current CPU usage of the problem session.</p>
<p>Of course, checking &#8220;environmental factors&#8221; like current CPU runqueue lengths, disk IO queuing and service times, can very well be necessary in many cases &#8211; but it&#8217;s worth taking your time to check these only when a simple query against v$session_wait has ruled out many other &#8220;usual suspects&#8221;.</p>
<p>Note that after I wrote Snapper, I use sw.sql much less. Depending on the type of problem (and previous experience regarding that environment) I may start with Snapper instead as it gives a better overview of what&#8217;s going on when a session is actually doing something and not hung.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virag Sharma</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-243</link>
		<dc:creator>Virag Sharma</dc:creator>
		<pubDate>Sun, 13 Jan 2008 13:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-243</guid>
		<description>&quot;Whenever you diagnose a single session hang or performance problem in Oracle, you should first look into V$SESSION_WAIT&quot; ..

I think DBA still need to see OS level stats before peeping into V$SESSION_WAIT / v$session because it was noticed some time other processes consume most of CPU i.e. CPU usage 100% ... and oracle processes not getting enough CPU resource .... Some time found sql execution plan changed due to stats collection / DB upgrade and session start  consuming 70-80 % CPU ......  in that case also OS command like top / ps help to immediately find out PID-&gt;SID-&gt; SQL_ID -&gt; execution plan and if needed set event on session and get all wait event details

As Old oracle Performance document suggest , if you are on production go left to right

OS-&gt; Wait-&gt; Lock/latch etc-&gt; Design

Correct me , if am wrong :-)</description>
		<content:encoded><![CDATA[<p>&#8220;Whenever you diagnose a single session hang or performance problem in Oracle, you should first look into V$SESSION_WAIT&#8221; ..</p>
<p>I think DBA still need to see OS level stats before peeping into V$SESSION_WAIT / v$session because it was noticed some time other processes consume most of CPU i.e. CPU usage 100% &#8230; and oracle processes not getting enough CPU resource &#8230;. Some time found sql execution plan changed due to stats collection / DB upgrade and session start  consuming 70-80 % CPU &#8230;&#8230;  in that case also OS command like top / ps help to immediately find out PID-&gt;SID-&gt; SQL_ID -&gt; execution plan and if needed set event on session and get all wait event details</p>
<p>As Old oracle Performance document suggest , if you are on production go left to right</p>
<p>OS-&gt; Wait-&gt; Lock/latch etc-&gt; Design</p>
<p>Correct me , if am wrong :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-245</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Tue, 08 Jan 2008 15:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-245</guid>
		<description>Thanks Hemant,

I forgot to upload the most recent version. it&#039;s done now + i wrote a another quick blog entry about it!</description>
		<content:encoded><![CDATA[<p>Thanks Hemant,</p>
<p>I forgot to upload the most recent version. it&#8217;s done now + i wrote a another quick blog entry about it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant K Chitale</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-246</link>
		<dc:creator>Hemant K Chitale</dc:creator>
		<pubDate>Tue, 08 Jan 2008 07:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-246</guid>
		<description>Neat !  Couldn&#039;t find &quot;P1TRANSL&quot; in the code in sw.sql</description>
		<content:encoded><![CDATA[<p>Neat !  Couldn&#8217;t find &#8220;P1TRANSL&#8221; in the code in sw.sql</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-244</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Sun, 06 Jan 2008 05:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-244</guid>
		<description>Thanks Bas, yes 10g makes life easier thanks to v$session_wait contnts being in v$session.

I&#039;m using this script in addition to Snapper for checking session wait info:

http://www.tanelpoder.com/files/scripts/sw.sql

My script works on 9i and 10g/11g. It also decodes the enqueue and latch names the session is waiting on, on 9i.

&lt;code&gt;
SQL&gt; @sw 16

       SID STATE   EVENT                        SEQ# SECONDS_IN_WAIT         P1         P2         P3 P1TRANSL
---------- ------- ------------------- ---------- --------------- ---------- ---------- ---------- ----------------------
        16 WAITING enqueue                     26              18 1415053318     262156       5249 0x54580006: &lt;strong&gt;TX mode 6&lt;/strong&gt;

&lt;/code&gt;


I&#039;ve written the script the waythat you can write the SID parameter as a subquery. This gives pretty good flexibility, especially when you want to report a group of sessions at a time:


&lt;code&gt;
SQL&gt; @sw &quot;select sid from v$session where status = &#039;ACTIVE&#039;&quot;

       SID STATE   EVENT                     SEQ# SECONDS_IN_WAIT         P1         P2         P3 P1TRANSL
---------- ------- ------------------- ---------- --------------- ---------- ---------- ---------- -------------------------
         1 WAITING pmon timer                 113             305        300          0          0
         2 WAITING rdbms ipc message          147             296        300          0          0
         3 WAITING rdbms ipc message         2029             159        300          0          0
         4 WAITING rdbms ipc message          261               0        300          0          0
         5 WAITING smon timer                 208             239        300          0          0
         6 WAITING rdbms ipc message            5             242     180000          0          0
         7 WAITING rdbms ipc message           74             278        500          0          0
        13 WORKING On CPU / runqueue           53               0 1413697536          1          0
        16 WAITING enqueue                     74             162 1415053318     262156       5249 0x54580006: TX mode 6

9 rows selected.
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks Bas, yes 10g makes life easier thanks to v$session_wait contnts being in v$session.</p>
<p>I&#8217;m using this script in addition to Snapper for checking session wait info:</p>
<p><a href="http://www.tanelpoder.com/files/scripts/sw.sql" rel="nofollow">http://www.tanelpoder.com/files/scripts/sw.sql</a></p>
<p>My script works on 9i and 10g/11g. It also decodes the enqueue and latch names the session is waiting on, on 9i.</p>
<p><code><br />
SQL&gt; @sw 16</p>
<p>       SID STATE   EVENT                        SEQ# SECONDS_IN_WAIT         P1         P2         P3 P1TRANSL<br />
---------- ------- ------------------- ---------- --------------- ---------- ---------- ---------- ----------------------<br />
        16 WAITING enqueue                     26              18 1415053318     262156       5249 0x54580006: <strong>TX mode 6</strong></p>
<p></code></p>
<p>I&#8217;ve written the script the waythat you can write the SID parameter as a subquery. This gives pretty good flexibility, especially when you want to report a group of sessions at a time:</p>
<p><code><br />
SQL&gt; @sw "select sid from v$session where status = 'ACTIVE'"</p>
<p>       SID STATE   EVENT                     SEQ# SECONDS_IN_WAIT         P1         P2         P3 P1TRANSL<br />
---------- ------- ------------------- ---------- --------------- ---------- ---------- ---------- -------------------------<br />
         1 WAITING pmon timer                 113             305        300          0          0<br />
         2 WAITING rdbms ipc message          147             296        300          0          0<br />
         3 WAITING rdbms ipc message         2029             159        300          0          0<br />
         4 WAITING rdbms ipc message          261               0        300          0          0<br />
         5 WAITING smon timer                 208             239        300          0          0<br />
         6 WAITING rdbms ipc message            5             242     180000          0          0<br />
         7 WAITING rdbms ipc message           74             278        500          0          0<br />
        13 WORKING On CPU / runqueue           53               0 1413697536          1          0<br />
        16 WAITING enqueue                     74             162 1415053318     262156       5249 0x54580006: TX mode 6</p>
<p>9 rows selected.<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bas</title>
		<link>http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/comment-page-1/#comment-247</link>
		<dc:creator>Bas</dc:creator>
		<pubDate>Sat, 05 Jan 2008 13:57:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/01/05/systematic-application-troubleshooting-in-unix/#comment-247</guid>
		<description>From 10.1 and up most columns of v$session_wait can also be found in v$session, it saves a join. My first query when troubleshooting a current performance problem is:

SELECT   wait_class
,        event
,        COUNT (1) wait_count
FROM     v$session
WHERE    NOT username IS NULL
AND      wait_class  &#039;Idle&#039;
AND      audsid  SYS_CONTEXT (&#039;USERENV&#039;, &#039;SESSIONID&#039;)
GROUP BY event
,        wait_class
ORDER BY wait_class
,        event
/</description>
		<content:encoded><![CDATA[<p>From 10.1 and up most columns of v$session_wait can also be found in v$session, it saves a join. My first query when troubleshooting a current performance problem is:</p>
<p>SELECT   wait_class<br />
,        event<br />
,        COUNT (1) wait_count<br />
FROM     v$session<br />
WHERE    NOT username IS NULL<br />
AND      wait_class  &#8216;Idle&#8217;<br />
AND      audsid  SYS_CONTEXT (&#8216;USERENV&#8217;, &#8216;SESSIONID&#8217;)<br />
GROUP BY event<br />
,        wait_class<br />
ORDER BY wait_class<br />
,        event<br />
/</p>
]]></content:encoded>
	</item>
</channel>
</rss>
