<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; ass109.awk</title>
	<atom:link href="https://www.xifenfei.com/tag/ass109-awk/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 29 Oct 2026 15:31:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>使用ass109.awk分析systemstate</title>
		<link>https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8ass109-awk%e5%88%86%e6%9e%90systemstate.html</link>
		<comments>https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8ass109-awk%e5%88%86%e6%9e%90systemstate.html#comments</comments>
		<pubDate>Thu, 24 May 2012 08:52:29 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle性能优化]]></category>
		<category><![CDATA[ass109.awk]]></category>
		<category><![CDATA[systemstate]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=3214</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8ass109-awk%e5%88%86%e6%9e%90systemstate.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8ass109-awk%e5%88%86%e6%9e%90systemstate.html" target="_blank">使用ass109.awk分析systemstate</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>本篇介绍工具ass109.awk使用,大大节约分析systemstate dump文件时间.当然如果要获得详细信息,还是需要人工去读相关进程的dump文件.<br />
<strong>模拟会话被hang住</strong></p>
<pre class="brush: sql; title: ; notranslate">
--会话1
SQL&gt; select * from t_xifenfei;

        ID NAME
---------- ----------------------------------------
         1 xifenfei
         2 www.xifenfei

SQL&gt; delete from t_xifenfei where id=1;

1 row deleted.

--会话2
SQL&gt; delete from t_xifenfei where id=1;
--hang住
</pre>
<p><strong>做systemstate</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; oradebug setmypid
Statement processed.
SQL&gt;  oradebug unlimit
Statement processed.
SQL&gt; oradebug dump systemstate 10
Statement processed.
SQL&gt; oradebug tracefile_name
/u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_9976.trc
SQL&gt; exit
</pre>
<p><strong>使用ass109.awk分析dump文件</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xifenfei ~]$ awk -f ass109.awk /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_9976.trc

Starting Systemstate 1
..................................
Ass.Awk Version 1.0.9 - Processing /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_9976.trc

System State 1
~~~~~~~~~~~~~~~~
1:                                      
2:  0: waiting for 'pmon timer'         
3:  0: waiting for 'rdbms ipc message'  
4:  0: waiting for 'VKTM Logical Idle Wait' 
5:  0: waiting for 'rdbms ipc message'  
6:  0: waiting for 'DIAG idle wait'     
7:  0: waiting for 'rdbms ipc message'  
8:  0: waiting for 'DIAG idle wait'     
9:  0: waiting for 'rdbms ipc message'  
10: 0: waiting for 'rdbms ipc message'  
11: 0: waiting for 'rdbms ipc message'  
12: 0: waiting for 'rdbms ipc message'  
13: 0: waiting for 'smon timer'         
14: 0: waiting for 'rdbms ipc message'  
15: 0: waiting for 'rdbms ipc message'  
16: 0: waiting for 'rdbms ipc message'  
17:                                     
18:                                     
19: 0: waiting for 'Space Manager: slave idle wait' 
20: 0: waiting for 'SQL*Net message from client' 
21: 0: waiting for 'enq: TX - row lock contention'[Enqueue TX-000A0020-0000024F] 
     Cmd: Delete
22: 0: waiting for 'rdbms ipc message'  
23: 0: waiting for 'rdbms ipc message'  
24: 0: waiting for 'rdbms ipc message'  
25: 0: waiting for 'rdbms ipc message'  
26: 0: waiting for 'Streams AQ: qmn coordinator idle wait' 
27:                                     
28:                                     
30: 0: waiting for 'Streams AQ: qmn slave idle wait' 
31: 0: waiting for 'rdbms ipc message'  
33: 1: waited for 'Streams AQ: waiting for time management or cleanup tasks' 
35: 0: waiting for 'rdbms ipc message'  
41:                                     
44:                                     
Blockers
~~~~~~~~

        Above is a list of all the processes. If they are waiting for a resource
        then it will be given in square brackets. Below is a summary of the
        waited upon resources, together with the holder of that resource.
        Notes:
        ~~~~~
         o A process id of '???' implies that the holder was not found in the
           systemstate.

                    Resource Holder State
Enqueue TX-000A0020-0000024F    20: 0: waiting for 'SQL*Net message from client'

Object Names
~~~~~~~~~~~~
Enqueue TX-000A0020-0000024F                                                                 

30586 Lines Processed.
--从这里马上就可以知道pid 21 请求Enqueue TX被pid 20阻塞
</pre>
<p>下载:<a href='//www.xifenfei.com/wp-content/uploads/2012/05/ass109.zip'>ass109.awk</a></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/hanganalyze%e5%88%86%e6%9e%90%e4%bc%9a%e8%af%9d%e9%98%bb%e5%a1%9e-%e9%94%81%e8%a1%a8.html" rel="bookmark" class="crp_title">Hanganalyze分析会话阻塞&#8212;锁表</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/ogg%e4%b8%adtime-since-chkpt%e6%98%be%e7%a4%baunknown%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">ogg中Time Since Chkpt显示unknown解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/systemstates%e5%88%86%e6%9e%90%e4%bc%9a%e8%af%9d%e9%98%bb%e5%a1%9e-%e9%94%81.html" rel="bookmark" class="crp_title">Systemstates分析会话阻塞&#8212;锁表</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/07/crs-10-2-0-1-bug%ef%bc%88%e5%85%ac%e7%bd%91ip%e4%b8%ba%e7%a7%81%e6%9c%89ip%e6%97%b6%ef%bc%89.html" rel="bookmark" class="crp_title">crs 10.2.0.1 bug（公网ip为私有ip时）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/04/vsession_wait%e5%88%86%e6%9e%90.html" rel="bookmark" class="crp_title">V$SESSION_WAIT分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/09/%e8%af%af%e6%9d%80%e8%bf%9b%e7%a8%8b%e5%af%bc%e8%87%b4rac-hang%e4%bd%8f.html" rel="bookmark" class="crp_title">误杀进程导致rac hang住</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/06/ora-00230-operation-disallowed-snapshot-control-file-enqueue-unavailable.html" rel="bookmark" class="crp_title">ORA-00230: operation disallowed: snapshot control file enqueue unavailable</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/to-find-the-tx-enqueue-contention-in-a-rac-or-ops-environment.html" rel="bookmark" class="crp_title">To find the TX Enqueue contention in a RAC or OPS environment</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/07/%e6%9c%aa%e6%94%b6%e9%9b%86%e7%bb%9f%e8%ae%a1%e4%bf%a1%e6%81%af%e5%af%b9%e8%b1%a1-%e6%89%a7%e8%a1%8csql%e5%8a%a8%e6%80%81%e9%87%87%e6%a0%b7.html" rel="bookmark" class="crp_title">未收集统计信息对象&#8212;执行sql动态采样</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/kill-oracle-session%e7%9b%b8%e5%85%b3%e6%8f%8f%e8%bf%b0.html" rel="bookmark" class="crp_title">kill oracle session相关描述</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/02/dbms_stats-subpartition-library-cache-lock.html" rel="bookmark" class="crp_title">DBMS_STATS收集子分区表导致library cache lock等待</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/09/%e8%87%aa%e6%b2%bb%e4%ba%8b%e4%bb%b6%e5%bc%95%e8%b5%b7%e6%ad%bb%e9%94%81.html" rel="bookmark" class="crp_title">自治事件引起死锁</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8ass109-awk%e5%88%86%e6%9e%90systemstate.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
