<?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>VMCD.ORG</title>
	<atom:link href="http://www.vmcd.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vmcd.org</link>
	<description>Focus on Oracle mail:ylouis83#gmail.com</description>
	<lastBuildDate>Tue, 14 May 2013 04:40:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to control CF calculation</title>
		<link>http://www.vmcd.org/2013/05/how-to-control-cf-calculation/</link>
		<comments>http://www.vmcd.org/2013/05/how-to-control-cf-calculation/#comments</comments>
		<pubDate>Tue, 14 May 2013 04:39:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Experience]]></category>
		<category><![CDATA[internal]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1473</guid>
		<description><![CDATA[根据<a href="http://richardfoote.wordpress.com">Richard Foote</a>的文章,做了如下验证：

<strong>Ref</strong>：<a href="http://richardfoote.wordpress.com/2013/05/08/important-clustering-factor-calculation-improvement-fix-you/?utm_source=feedly">Clustering Factor Calculation Improvement</a> <strong>and  </strong><a href="https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?returnToSrId=&#038;srnum=&#038;_afrLoop=239887677073194&#038;type=DOCUMENT&#038;id=13262857.8&#038;displayIndex=1&#038;_afrWindowMode=0&#038;_adf.ctrl-state=ef976p3qr_102">provide some control over DBMS_STATS index clustering factor computation </a>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[oracle@db-42 ~]$ unzip p13262857_112030_Generic.zip 
[oracle@db-42 ~]$ cd 13262857/
[oracle@db-42 13262857]$ ora si 

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 14 10:44:32 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL&#62; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&#62; exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options


[oracle@db-42 13262857]$ /data/app1/oracle/product/11.2.0/db_1/OPatch/opatch apply
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /data/app1/oracle/product/11.2.0/db_1
Central Inventory : /data/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /data/app1/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-05-14_10-46-13AM.log

Applying interim patch &#039;13262857&#039; to OH &#039;/data/app1/oracle/product/11.2.0/db_1&#039;
Verifying environment and performing prerequisite checks...

Do you want to proceed? [y&#124;n]
yes
User Responded with: Y
All checks passed.
Backing up files...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...
Patch 13262857 successfully applied
Log file location: /data/app1/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-05-14_10-46-13AM.log

OPatch succeeded.

[oracle@db-42 13262857]$ ora si 

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 14 10:46:25 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&#62; startup upgrade;
ORACLE instance started.

Total System Global Area 8017100800 bytes
Fixed Size		    2244192 bytes
Variable Size		 1828716960 bytes
Database Buffers	 6157238272 bytes
Redo Buffers		   28901376 bytes
Database mounted.
Database opened.
SQL&#62; 
SQL&#62; @?/rdbms/admin/dbmsstat.sql

Package created.

No errors.

Synonym created.


Grant succeeded.


Role created.


Grant succeeded.


Grant succeeded.


Library created.

SQL&#62; 
SQL&#62; @?/rdbms/admin/prvtstat.plb

Package body created.

No errors.
SQL&#62; 
SQL&#62; @?/rdbms/admin/execstat.sql

PL/SQL procedure successfully completed.

SQL&#62; 
SQL&#62; 
SQL&#62; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&#62; 
SQL&#62; 
SQL&#62; startup
ORACLE instance started.

Total System Global Area 8017100800 bytes
Fixed Size		    2244192 bytes
Variable Size		 1828716960 bytes
Database Buffers	 6157238272 bytes
Redo Buffers		   28901376 bytes
Database mounted.
Database opened.

SQL&#62; exec dbms_stats.set_table_prefs(ownname=&#62;user, tabname=&#62;&#039;BOWIE&#039;,pname=&#62;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&#62;42);

PL/SQL procedure successfully completed.


SQL&#62; EXEC dbms_stats.gather_index_stats(ownname=&#62;user, indname=&#62;&#039;BOWIE_ID_I&#039;, estimate_percent=&#62; null);

PL/SQL procedure successfully completed.

SQL&#62; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  


TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1035

SQL&#62; exec dbms_stats.set_table_prefs(ownname=&#62;user, tabname=&#62;&#039;BOWIE&#039;,pname=&#62;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&#62;255);

PL/SQL procedure successfully completed.


SQL&#62; EXEC dbms_stats.gather_index_stats(ownname=&#62;user, indname=&#62;&#039;BOWIE_ID_I&#039;, estimate_percent=&#62; null);

PL/SQL procedure successfully completed.

SQL&#62; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1035

SQL&#62; exec dbms_stats.set_table_prefs(ownname=&#62;user, tabname=&#62;&#039;BOWIE&#039;,pname=&#62;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&#62;1);

PL/SQL procedure successfully completed.

SQL&#62; EXEC dbms_stats.gather_index_stats(ownname=&#62;user, indname=&#62;&#039;BOWIE_ID_I&#039;, estimate_percent=&#62; null);

PL/SQL procedure successfully completed.

SQL&#62; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000	       193228</pre>



<strong>eg: 重复一遍这个过程</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">SQL&#62; truncate table bowie;

Table truncated.

SQL&#62; exec bowie_proc 

PL/SQL procedure successfully completed.

SQL&#62; exec dbms_stats.set_table_prefs(ownname=&#62;user, tabname=&#62;&#039;BOWIE&#039;,pname=&#62;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&#62;1);

PL/SQL procedure successfully completed.

SQL&#62; EXEC dbms_stats.gather_index_stats(ownname=&#62;user, indname=&#62;&#039;BOWIE_ID_I&#039;, estimate_percent=&#62; null);

PL/SQL procedure successfully completed.

SQL&#62; set autot off;
SQL&#62; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000	       357685


SQL&#62; set autot trace ;

SQL&#62; select * from bowie where id between 42 and 429;

388 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 1845943507

---------------------------------------------------------------------------
&#124; Id  &#124; Operation	  &#124; Name  &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time	  &#124;
---------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;	  &#124;   389 &#124;  7780 &#124;   310   (1)&#124; 00:00:04 &#124;
&#124;*  1 &#124;  TABLE ACCESS FULL&#124; BOWIE &#124;   389 &#124;  7780 &#124;   310   (1)&#124; 00:00:04 &#124;
---------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter(&#34;ID&#34;&#60;=429 AND &#34;ID&#34;&#62;=42)


Statistics
----------------------------------------------------------
	  9  recursive calls
	  1  db block gets
 1532  consistent gets
	  0  physical reads
	  0  redo size
 8659  bytes sent via SQL*Net to client
	799  bytes received via SQL*Net from client
	 27  SQL*Net roundtrips to/from client
	  4  sorts (memory)
	  0  sorts (disk)
	388  rows processed

SQL&#62; exec dbms_stats.set_table_prefs(ownname=&#62;user, tabname=&#62;&#039;BOWIE&#039;,pname=&#62;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&#62;255);

PL/SQL procedure successfully completed.

SQL&#62; EXEC dbms_stats.gather_index_stats(ownname=&#62;user, indname=&#62;&#039;BOWIE_ID_I&#039;, estimate_percent=&#62; null);

PL/SQL procedure successfully completed.


SQL&#62; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1396

SQL&#62; set autot trace ;
SQL&#62; select * from bowie where id between 42 and 429;

Execution Plan
----------------------------------------------------------
Plan hash value: 3472402785

------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation		    &#124; Name	 &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time	 &#124;
------------------------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT	    &#124;		 &#124;   389 &#124;  7780 &#124;     7   (0)&#124; 00:00:01 &#124;
&#124;   1 &#124;  TABLE ACCESS BY INDEX ROWID&#124; BOWIE	 &#124;   389 &#124;  7780 &#124;     7   (0)&#124; 00:00:01 &#124;
&#124;*  2 &#124;   INDEX RANGE SCAN	    &#124; BOWIE_ID_I &#124;   519 &#124;	 &#124;     5   (0)&#124; 00:00:01 &#124;
------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

Statistics
----------------------------------------------------------
	  1  recursive calls
	  0  db block gets
	 57  consistent gets
	  0  physical reads
	  0  redo size
14532  bytes sent via SQL*Net to client
	799  bytes received via SQL*Net from client
	 27  SQL*Net roundtrips to/from client
	  0  sorts (memory)
	  0  sorts (disk)
	388  rows processed</pre>]]></description>
				<content:encoded><![CDATA[<p>根据<a href="http://richardfoote.wordpress.com">Richard Foote</a>的文章,做了如下验证：</p>
<p><strong>Ref</strong>：<a href="http://richardfoote.wordpress.com/2013/05/08/important-clustering-factor-calculation-improvement-fix-you/?utm_source=feedly">Clustering Factor Calculation Improvement</a> <strong>and  </strong><a href="https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?returnToSrId=&#038;srnum=&#038;_afrLoop=239887677073194&#038;type=DOCUMENT&#038;id=13262857.8&#038;displayIndex=1&#038;_afrWindowMode=0&#038;_adf.ctrl-state=ef976p3qr_102">provide some control over DBMS_STATS index clustering factor computation </a></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[oracle@db-42 ~]$ unzip p13262857_112030_Generic.zip 
[oracle@db-42 ~]$ cd 13262857/
[oracle@db-42 13262857]$ ora si 

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 14 10:44:32 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options


[oracle@db-42 13262857]$ /data/app1/oracle/product/11.2.0/db_1/OPatch/opatch apply
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.


Oracle Home       : /data/app1/oracle/product/11.2.0/db_1
Central Inventory : /data/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /data/app1/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-05-14_10-46-13AM.log

Applying interim patch &#039;13262857&#039; to OH &#039;/data/app1/oracle/product/11.2.0/db_1&#039;
Verifying environment and performing prerequisite checks...

Do you want to proceed? [y|n]
yes
User Responded with: Y
All checks passed.
Backing up files...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...
Patch 13262857 successfully applied
Log file location: /data/app1/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-05-14_10-46-13AM.log

OPatch succeeded.

[oracle@db-42 13262857]$ ora si 

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 14 10:46:25 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&gt; startup upgrade;
ORACLE instance started.

Total System Global Area 8017100800 bytes
Fixed Size		    2244192 bytes
Variable Size		 1828716960 bytes
Database Buffers	 6157238272 bytes
Redo Buffers		   28901376 bytes
Database mounted.
Database opened.
SQL&gt; 
SQL&gt; @?/rdbms/admin/dbmsstat.sql

Package created.

No errors.

Synonym created.


Grant succeeded.


Role created.


Grant succeeded.


Grant succeeded.


Library created.

SQL&gt; 
SQL&gt; @?/rdbms/admin/prvtstat.plb

Package body created.

No errors.
SQL&gt; 
SQL&gt; @?/rdbms/admin/execstat.sql

PL/SQL procedure successfully completed.

SQL&gt; 
SQL&gt; 
SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; 
SQL&gt; 
SQL&gt; startup
ORACLE instance started.

Total System Global Area 8017100800 bytes
Fixed Size		    2244192 bytes
Variable Size		 1828716960 bytes
Database Buffers	 6157238272 bytes
Redo Buffers		   28901376 bytes
Database mounted.
Database opened.

SQL&gt; exec dbms_stats.set_table_prefs(ownname=&gt;user, tabname=&gt;&#039;BOWIE&#039;,pname=&gt;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&gt;42);

PL/SQL procedure successfully completed.


SQL&gt; EXEC dbms_stats.gather_index_stats(ownname=&gt;user, indname=&gt;&#039;BOWIE_ID_I&#039;, estimate_percent=&gt; null);

PL/SQL procedure successfully completed.

SQL&gt; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  


TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1035

SQL&gt; exec dbms_stats.set_table_prefs(ownname=&gt;user, tabname=&gt;&#039;BOWIE&#039;,pname=&gt;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&gt;255);

PL/SQL procedure successfully completed.


SQL&gt; EXEC dbms_stats.gather_index_stats(ownname=&gt;user, indname=&gt;&#039;BOWIE_ID_I&#039;, estimate_percent=&gt; null);

PL/SQL procedure successfully completed.

SQL&gt; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1035

SQL&gt; exec dbms_stats.set_table_prefs(ownname=&gt;user, tabname=&gt;&#039;BOWIE&#039;,pname=&gt;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&gt;1);

PL/SQL procedure successfully completed.

SQL&gt; EXEC dbms_stats.gather_index_stats(ownname=&gt;user, indname=&gt;&#039;BOWIE_ID_I&#039;, estimate_percent=&gt; null);

PL/SQL procedure successfully completed.

SQL&gt; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000	       193228</pre>
<p><strong>eg: 重复一遍这个过程</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">SQL&gt; truncate table bowie;

Table truncated.

SQL&gt; exec bowie_proc 

PL/SQL procedure successfully completed.

SQL&gt; exec dbms_stats.set_table_prefs(ownname=&gt;user, tabname=&gt;&#039;BOWIE&#039;,pname=&gt;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&gt;1);

PL/SQL procedure successfully completed.

SQL&gt; EXEC dbms_stats.gather_index_stats(ownname=&gt;user, indname=&gt;&#039;BOWIE_ID_I&#039;, estimate_percent=&gt; null);

PL/SQL procedure successfully completed.

SQL&gt; set autot off;
SQL&gt; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000	       357685


SQL&gt; set autot trace ;

SQL&gt; select * from bowie where id between 42 and 429;

388 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 1845943507

---------------------------------------------------------------------------
| Id  | Operation	  | Name  | Rows  | Bytes | Cost (%CPU)| Time	  |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |	  |   389 |  7780 |   310   (1)| 00:00:04 |
|*  1 |  TABLE ACCESS FULL| BOWIE |   389 |  7780 |   310   (1)| 00:00:04 |
---------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter(&quot;ID&quot;&lt;=429 AND &quot;ID&quot;&gt;=42)


Statistics
----------------------------------------------------------
	  9  recursive calls
	  1  db block gets
 1532  consistent gets
	  0  physical reads
	  0  redo size
 8659  bytes sent via SQL*Net to client
	799  bytes received via SQL*Net from client
	 27  SQL*Net roundtrips to/from client
	  4  sorts (memory)
	  0  sorts (disk)
	388  rows processed

SQL&gt; exec dbms_stats.set_table_prefs(ownname=&gt;user, tabname=&gt;&#039;BOWIE&#039;,pname=&gt;&#039;TABLE_CACHED_BLOCKS&#039;, pvalue=&gt;255);

PL/SQL procedure successfully completed.

SQL&gt; EXEC dbms_stats.gather_index_stats(ownname=&gt;user, indname=&gt;&#039;BOWIE_ID_I&#039;, estimate_percent=&gt; null);

PL/SQL procedure successfully completed.


SQL&gt; SELECT t.table_name, i.index_name, t.blocks, t.num_rows, i.clustering_factor FROM user_tables t, user_indexes i
  WHERE t.table_name = i.table_name AND i.index_name=&#039;BOWIE_ID_I&#039;;  2  

TABLE_NAME		       INDEX_NAME			  BLOCKS   NUM_ROWS CLUSTERING_FACTOR
------------------------------ ------------------------------ ---------- ---------- -----------------
BOWIE			       BOWIE_ID_I			    1126     300000		 1396

SQL&gt; set autot trace ;
SQL&gt; select * from bowie where id between 42 and 429;

Execution Plan
----------------------------------------------------------
Plan hash value: 3472402785

------------------------------------------------------------------------------------------
| Id  | Operation		    | Name	 | Rows  | Bytes | Cost (%CPU)| Time	 |
------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT	    |		 |   389 |  7780 |     7   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| BOWIE	 |   389 |  7780 |     7   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN	    | BOWIE_ID_I |   519 |	 |     5   (0)| 00:00:01 |
------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

Statistics
----------------------------------------------------------
	  1  recursive calls
	  0  db block gets
	 57  consistent gets
	  0  physical reads
	  0  redo size
14532  bytes sent via SQL*Net to client
	799  bytes received via SQL*Net from client
	 27  SQL*Net roundtrips to/from client
	  0  sorts (memory)
	  0  sorts (disk)
	388  rows processed</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/05/how-to-control-cf-calculation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux tools part 8–  Monitoring Reads and Writes to a File and device</title>
		<link>http://www.vmcd.org/2013/05/linux-tools-part-8-monitoring-reads-and-writes-to-a-file-and-device/</link>
		<comments>http://www.vmcd.org/2013/05/linux-tools-part-8-monitoring-reads-and-writes-to-a-file-and-device/#comments</comments>
		<pubDate>Mon, 13 May 2013 08:53:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[linux tools]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1466</guid>
		<description><![CDATA[<strong>1.配合使用systemtap 监控系统对于文件的读写：</strong>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 systemtap]# uname -a
Linux db-42 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 systemtap]# more inodewatch.stp 
#! /usr/bin/env stap

probe vfs.write, vfs.read
{
  # dev and ino are defined by vfs.write and vfs.read
  if (dev == MKDEV($1,$2) # major/minor device
      &#38;&#38; ino == $3)
    printf (&#34;%s(%d) %s 0x%x/%u\n&#34;,
      execname(), pid(), probefunc(), dev, ino)
}</pre>

<p><pre>inodewatch.stp takes the following information about the file as arguments on the command line:
The file&#039;s major device number.
The file&#039;s minor device number.
The file&#039;s inode number.</pre></p>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stat -c &#039;%D %i&#039; test.dat 
803 1831440


[root@db-42 systemtap]# stap  inodewatch.stp  0x8 0x3  1831440

dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440

[root@db-42 systemtap]# ps -ef &#124;grep 27257
root     27257 27217 74 14:42 pts/6    00:00:14 dd if /dev/zero of /root/test.dat bs 4K count 10000000</pre>



<strong>------对于 block device的读写 如下:</strong>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stat -c &#34;0x%D&#34; /dev/sda11
0x11
[root@db-42 ~]# fdisk -l 

Disk /dev/sda: 1798.6 GB, 1798651772928 bytes
47 heads, 36 sectors/track, 2076236 cylinders
Units = cylinders of 1692 * 512 = 866304 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         242      204714   83  Linux
/dev/sda2             243      161225   136191618   82  Linux swap / Solaris
/dev/sda3          161226      223198    52429158   83  Linux
/dev/sda4          223199     2076236  1567670148    5  Extended
/dev/sda5          223199      247987    20971476   83  Linux
/dev/sda6          247988      272776    20971476   83  Linux
/dev/sda7          272777      390980   100000566   83  Linux
/dev/sda8          390981      414068    19532430   83  Linux
/dev/sda9          414069      437156    19532430   83  Linux
/dev/sda10         437157      460244    19532430   83  Linux
/dev/sda11         460245      483332    19532430   83  Linux</pre>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# more traceio2.stp
#! /usr/bin/env stap

global device_of_interest

probe begin {
  /* The following is not the most efficient way to do this.
      One could directly put the result of usrdev2kerndev()
      into device_of_interest.  However, want to test out
      the other device functions */
  dev = usrdev2kerndev($1)
  device_of_interest = MKDEV(MAJOR(dev), MINOR(dev))
}

probe vfs.write, vfs.read
{
  if (dev == device_of_interest)
    printf (&#34;%s(%d) %s 0x%x\n&#34;,
            execname(), pid(), probefunc(), dev)
}</pre>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stap traceio2.stp  0x11


dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11

[oracle@db-42 ~]$ ps -ef &#124;grep  30266
root     30266 27217 99 16:40 pts/6    00:00:32 dd if /dev/zero of /dev/sda11 bs 4K count 100000000</pre>

<strong>2.直接使用lsof</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# lsof  /root/test.dat 
[root@db-42 ~]# lsof  /root/test.dat 
COMMAND   PID USER   FD   TYPE DEVICE      SIZE    NODE NAME
dd      30756 root    1w   REG    8,3 926494720 1831440 /root/test.dat
[root@db-42 ~]# lsof  /dev/sda
sda    sda1   sda10  sda11  sda2   sda3   sda4   sda5   sda6   sda7   sda8   sda9   
[root@db-42 ~]# lsof  /dev/sda11  
COMMAND   PID USER   FD   TYPE DEVICE SIZE    NODE NAME
dd      30761 root    1w   BLK   8,11      4548595 /dev/sda11
[root@db-42 ~]# lsof  version
lsof: status error on version: No such file or directory
lsof 4.78
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhlnNoOPRstUvVX] [+&#124;-c c] [+&#124;-d s] [+D D] [+&#124;-f]
 [-F [f]] [-g [s]] [-i [i]] [+&#124;-L [l]] [+m [m]] [+&#124;-M] [-o [o]]
 [-p s] [+&#124;-r [t]] [-S [t]] [-T [t]] [-u s] [+&#124;-w] [-x [fl]] [-Z [Z]] [--] [names]
Use the ``-h&#039;&#039; option to get more help information.</pre>]]></description>
				<content:encoded><![CDATA[<p><strong>1.配合使用systemtap 监控系统对于文件的读写：</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 systemtap]# uname -a
Linux db-42 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 systemtap]# more inodewatch.stp 
#! /usr/bin/env stap

probe vfs.write, vfs.read
{
  # dev and ino are defined by vfs.write and vfs.read
  if (dev == MKDEV($1,$2) # major/minor device
      &amp;&amp; ino == $3)
    printf (&quot;%s(%d) %s 0x%x/%u\n&quot;,
      execname(), pid(), probefunc(), dev, ino)
}</pre>
<p>
<pre>inodewatch.stp takes the following information about the file as arguments on the command line:
The file&#039;s major device number.
The file&#039;s minor device number.
The file&#039;s inode number.</pre>
</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stat -c &#039;%D %i&#039; test.dat 
803 1831440


[root@db-42 systemtap]# stap  inodewatch.stp  0x8 0x3  1831440

dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440
dd(27257) vfs_write 0x800003/1831440

[root@db-42 systemtap]# ps -ef |grep 27257
root     27257 27217 74 14:42 pts/6    00:00:14 dd if /dev/zero of /root/test.dat bs 4K count 10000000</pre>
<p><strong>&#8212;&#8212;对于 block device的读写 如下:</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stat -c &quot;0x%D&quot; /dev/sda11
0x11
[root@db-42 ~]# fdisk -l 

Disk /dev/sda: 1798.6 GB, 1798651772928 bytes
47 heads, 36 sectors/track, 2076236 cylinders
Units = cylinders of 1692 * 512 = 866304 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         242      204714   83  Linux
/dev/sda2             243      161225   136191618   82  Linux swap / Solaris
/dev/sda3          161226      223198    52429158   83  Linux
/dev/sda4          223199     2076236  1567670148    5  Extended
/dev/sda5          223199      247987    20971476   83  Linux
/dev/sda6          247988      272776    20971476   83  Linux
/dev/sda7          272777      390980   100000566   83  Linux
/dev/sda8          390981      414068    19532430   83  Linux
/dev/sda9          414069      437156    19532430   83  Linux
/dev/sda10         437157      460244    19532430   83  Linux
/dev/sda11         460245      483332    19532430   83  Linux</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# more traceio2.stp
#! /usr/bin/env stap

global device_of_interest

probe begin {
  /* The following is not the most efficient way to do this.
      One could directly put the result of usrdev2kerndev()
      into device_of_interest.  However, want to test out
      the other device functions */
  dev = usrdev2kerndev($1)
  device_of_interest = MKDEV(MAJOR(dev), MINOR(dev))
}

probe vfs.write, vfs.read
{
  if (dev == device_of_interest)
    printf (&quot;%s(%d) %s 0x%x\n&quot;,
            execname(), pid(), probefunc(), dev)
}</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# stap traceio2.stp  0x11


dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11
dd(30266) vfs_read 0x11
dd(30266) vfs_write 0x11

[oracle@db-42 ~]$ ps -ef |grep  30266
root     30266 27217 99 16:40 pts/6    00:00:32 dd if /dev/zero of /dev/sda11 bs 4K count 100000000</pre>
<p><strong>2.直接使用lsof</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# lsof  /root/test.dat 
[root@db-42 ~]# lsof  /root/test.dat 
COMMAND   PID USER   FD   TYPE DEVICE      SIZE    NODE NAME
dd      30756 root    1w   REG    8,3 926494720 1831440 /root/test.dat
[root@db-42 ~]# lsof  /dev/sda
sda    sda1   sda10  sda11  sda2   sda3   sda4   sda5   sda6   sda7   sda8   sda9   
[root@db-42 ~]# lsof  /dev/sda11  
COMMAND   PID USER   FD   TYPE DEVICE SIZE    NODE NAME
dd      30761 root    1w   BLK   8,11      4548595 /dev/sda11
[root@db-42 ~]# lsof  version
lsof: status error on version: No such file or directory
lsof 4.78
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhlnNoOPRstUvVX] [+|-c c] [+|-d s] [+D D] [+|-f]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]]
 [-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [-Z [Z]] [--] [names]
Use the ``-h&#039;&#039; option to get more help information.</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/05/linux-tools-part-8-monitoring-reads-and-writes-to-a-file-and-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL AWR &#8211; Myawr</title>
		<link>http://www.vmcd.org/2013/05/mysql-awr-myawr/</link>
		<comments>http://www.vmcd.org/2013/05/mysql-awr-myawr/#comments</comments>
		<pubDate>Mon, 06 May 2013 07:07:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[mysqlawr]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1456</guid>
		<description><![CDATA[<a href="http://www.noodba.com/">noodba</a>同学写的基于mysql的 WORKLOAD REPOSITORY工具,目前还没有开源 非常的给力！！

主要思想为一台管理机器,集中了所有client端的数据,client 为mysql database 使用host_id来区分 如 host_id=1代表mysql database 1,host_id=2 代表mysql database 2.


具体采集AWR过程如下：

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[mysql@hadooptest2 myawr]$ perl myawrrpt.pl 

==========================================================================================
Info  :
        Created By qwsh (www.noodba.com).
  		References: Oracle awr
Usage :
Command line options :

   -h,--help           Print Help Info. 
  
   -P,--port           Port number to use for local mysql connection(default 3306).
   -u,--user           user name for local mysql(default dbauser).
   -p,--pswd           user password for local mysql(can&#039;t be null).
   -lh,--lhost          localhost(ip) for mysql where info is got(can&#039;t be null).

   -I,--tid             db instance register id(can&#039;t be null).    
  
Sample :
   shell&#62; perl myawrrpt.pl -p 111111 -lh 192.168.1.111 -I 11
==========================================================================================

[mysql@hadooptest2 myawr]$ perl myawrrpt.pl -u myawruser -p xxxxx -P xxxxx -lh 10.0.1.92 -I 4
===================================================
&#124;       Welcome to use the myawrrpt tool !   
&#124;             Date: 2013-05-06
&#124;
&#124;      Hostname is: pis24 
&#124;       Ip addr is: 10.0.2.24 
&#124;          Port is: 3306 
&#124;       Db role is: master 
&#124;Server version is: 5.5.25a
&#124;        Uptime is: 0y 3m 15d 2h 10mi 41s
&#124;
&#124;   Min snap_id is: 1 
&#124; Min snap_time is: 2013-05-03 10:41:41 
&#124;   Max snap_id is: 4546 
&#124; Max snap_time is: 2013-05-06 14:33:11 
&#124; snap interval is: 59s
===================================================

Listing the last 2 days of Completed Snapshots
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snap_id:     792      snap_time : 2013-05-03 23:59:06 
snap_id:     855      snap_time : 2013-05-04 01:02:05 
snap_id:     918      snap_time : 2013-05-04 02:05:06 
snap_id:     981      snap_time : 2013-05-04 03:08:06 
snap_id:    1044      snap_time : 2013-05-04 04:11:06 
snap_id:    1107      snap_time : 2013-05-04 05:14:06 
snap_id:    1170      snap_time : 2013-05-04 06:17:06 
snap_id:    1233      snap_time : 2013-05-04 07:20:06 
snap_id:    1296      snap_time : 2013-05-04 08:23:06 
snap_id:    1359      snap_time : 2013-05-04 09:26:07 
snap_id:    1422      snap_time : 2013-05-04 10:29:06 
snap_id:    1485      snap_time : 2013-05-04 11:32:07 
snap_id:    1548      snap_time : 2013-05-04 12:35:06 
snap_id:    1611      snap_time : 2013-05-04 13:38:07 
snap_id:    1674      snap_time : 2013-05-04 14:41:07 
snap_id:    1737      snap_time : 2013-05-04 15:44:07 
snap_id:    1800      snap_time : 2013-05-04 16:47:07 
snap_id:    1863      snap_time : 2013-05-04 17:50:08 
snap_id:    1926      snap_time : 2013-05-04 18:53:08 
snap_id:    1989      snap_time : 2013-05-04 19:56:08 
snap_id:    2052      snap_time : 2013-05-04 20:59:08 
snap_id:    2115      snap_time : 2013-05-04 22:02:07 
snap_id:    2178      snap_time : 2013-05-04 23:05:08 
snap_id:    2241      snap_time : 2013-05-05 00:08:08 
snap_id:    2304      snap_time : 2013-05-05 01:11:08 
snap_id:    2367      snap_time : 2013-05-05 02:14:08 
snap_id:    2430      snap_time : 2013-05-05 03:17:08 
snap_id:    2493      snap_time : 2013-05-05 04:20:08 
snap_id:    2556      snap_time : 2013-05-05 05:23:08 
snap_id:    2619      snap_time : 2013-05-05 06:26:08 
snap_id:    2682      snap_time : 2013-05-05 07:29:09 
snap_id:    2745      snap_time : 2013-05-05 08:32:09 
snap_id:    2808      snap_time : 2013-05-05 09:35:09 
snap_id:    2871      snap_time : 2013-05-05 10:38:09 
snap_id:    2934      snap_time : 2013-05-05 11:41:09 
snap_id:    2997      snap_time : 2013-05-05 12:44:09 
snap_id:    3060      snap_time : 2013-05-05 13:47:09 
snap_id:    3123      snap_time : 2013-05-05 14:50:09 
snap_id:    3186      snap_time : 2013-05-05 15:53:10 
snap_id:    3249      snap_time : 2013-05-05 16:56:10 
snap_id:    3312      snap_time : 2013-05-05 17:59:10 
snap_id:    3375      snap_time : 2013-05-05 19:02:10 
snap_id:    3438      snap_time : 2013-05-05 20:05:10 
snap_id:    3501      snap_time : 2013-05-05 21:08:10 
snap_id:    3564      snap_time : 2013-05-05 22:11:10 
snap_id:    3627      snap_time : 2013-05-05 23:14:10 
snap_id:    3690      snap_time : 2013-05-06 00:17:11 
snap_id:    3753      snap_time : 2013-05-06 01:20:11 
snap_id:    3816      snap_time : 2013-05-06 02:23:11 
snap_id:    3879      snap_time : 2013-05-06 03:26:10 
snap_id:    3942      snap_time : 2013-05-06 04:29:11 
snap_id:    4005      snap_time : 2013-05-06 05:32:11 
snap_id:    4068      snap_time : 2013-05-06 06:35:11 
snap_id:    4131      snap_time : 2013-05-06 07:38:11 
snap_id:    4194      snap_time : 2013-05-06 08:41:12 
snap_id:    4257      snap_time : 2013-05-06 09:44:12 
snap_id:    4320      snap_time : 2013-05-06 10:47:11 
snap_id:    4383      snap_time : 2013-05-06 11:50:12 
snap_id:    4446      snap_time : 2013-05-06 12:53:11 
snap_id:    4509      snap_time : 2013-05-06 13:56:11 

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:1107
Begin Snapshot Id specified:1107

Enter value for end_snap:1863
End  Snapshot Id specified:1863

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~

Enter value for report_name:yihaodian_mysqlawr.html

Using the report name :yihaodian_mysqlawr.html

Generating the mysql report for this analysis ...
Generating the mysql report Successfully.</pre>


这套测试环境采用一台管理机器,表的配置如下：

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">mysql&#62; use myawr
Database changed
mysql&#62; show tables;
+----------------------------------------------------------+
&#124; Tables_in_myawr                                          &#124;
+----------------------------------------------------------+
&#124; myawr_cpu_info                                           &#124; 
&#124; myawr_host                                               &#124; 
&#124; myawr_innodb_info                                        &#124; 
&#124; myawr_io_info                                            &#124; 
&#124; myawr_isam_info                                          &#124; 
&#124; myawr_load_info                                          &#124; 
&#124; myawr_mysql_info                                         &#124; 
&#124; myawr_query_review                                       &#124; 
&#124; myawr_query_review_history                               &#124; 
&#124; myawr_snapshot                                           &#124; 
&#124; myawr_snapshot_events_waits_summary_by_instance          &#124; 
&#124; myawr_snapshot_events_waits_summary_global_by_event_name &#124; 
&#124; myawr_snapshot_file_summary_by_event_name                &#124; 
&#124; myawr_snapshot_file_summary_by_instance                  &#124; 
&#124; myawr_swap_net_disk_info                                 &#124; 
+----------------------------------------------------------+
15 rows in set (0.00 sec)

mysql&#62; select * from myawr_host;
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
&#124; id &#124; host_name &#124; ip_addr   &#124; port &#124; db_role &#124; version &#124; uptime                &#124; check_time          &#124;
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
&#124;  3 &#124; db-74     &#124; 10.0.0.74 &#124; 3306 &#124; master  &#124; 5.5.27  &#124; 0y 1m 8d 22h 32mi 33s &#124; 2013-05-03 13:09:02 &#124; 
&#124;  4 &#124; pis24     &#124; 10.0.2.24 &#124; 3306 &#124; master  &#124; 5.5.25a &#124; 0y 3m 15d 1h 46mi 41s &#124; 2013-05-06 14:09:12 &#124; 
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
2 rows in set (0.00 sec)</pre>



可以看到host_id=3监控的机器为10.0.0.74 依此类推, 1...xxx 可以无限扩展。


下面为client 端部署的脚本：

[mysql@DCB-SRV-0220 ~]$ crontab -l
* * * * * perl /data/mysql/sh/myawr.pl -u dbauser -p xxxxx -lh 10.0.2.24 -P 3306  -tu myawruser -tp xxxxxx -TP 3306 -th 10.0.1.92 -n eth2 -d c0d1p1 -I 4 >> /data/mysql/sh/myawr_pl.log 2>&#038;1

myawr会自动上传这台mysql机器的所有状态值到管理机器。
下面以10.0.2.24这台mysql 作为一个样本 展示一下AWR报告,目前版本为version 1.0 后期会在github上开源

<a href="http://www.vmcd.org/scripts/yihaodian_mysqlawr.html">Yihaodian_Mysql_AWR.</a>]]></description>
				<content:encoded><![CDATA[<p>  <a href="http://www.noodba.com/">noodba</a>同学写的基于mysql的 WORKLOAD REPOSITORY工具,目前还没有开源 非常的给力！！</p>
<p>主要思想为一台管理机器,集中了所有client端的数据,client 为mysql database 使用host_id来区分 如 host_id=1代表mysql database 1,host_id=2 代表mysql database 2.</p>
<p>具体采集AWR过程如下：</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[mysql@hadooptest2 myawr]$ perl myawrrpt.pl 

==========================================================================================
Info  :
        Created By qwsh (www.noodba.com).
  		References: Oracle awr
Usage :
Command line options :

   -h,--help           Print Help Info. 
  
   -P,--port           Port number to use for local mysql connection(default 3306).
   -u,--user           user name for local mysql(default dbauser).
   -p,--pswd           user password for local mysql(can&#039;t be null).
   -lh,--lhost          localhost(ip) for mysql where info is got(can&#039;t be null).

   -I,--tid             db instance register id(can&#039;t be null).    
  
Sample :
   shell&gt; perl myawrrpt.pl -p 111111 -lh 192.168.1.111 -I 11
==========================================================================================

[mysql@hadooptest2 myawr]$ perl myawrrpt.pl -u myawruser -p xxxxx -P xxxxx -lh 10.0.1.92 -I 4
===================================================
|       Welcome to use the myawrrpt tool !   
|             Date: 2013-05-06
|
|      Hostname is: pis24 
|       Ip addr is: 10.0.2.24 
|          Port is: 3306 
|       Db role is: master 
|Server version is: 5.5.25a
|        Uptime is: 0y 3m 15d 2h 10mi 41s
|
|   Min snap_id is: 1 
| Min snap_time is: 2013-05-03 10:41:41 
|   Max snap_id is: 4546 
| Max snap_time is: 2013-05-06 14:33:11 
| snap interval is: 59s
===================================================

Listing the last 2 days of Completed Snapshots
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snap_id:     792      snap_time : 2013-05-03 23:59:06 
snap_id:     855      snap_time : 2013-05-04 01:02:05 
snap_id:     918      snap_time : 2013-05-04 02:05:06 
snap_id:     981      snap_time : 2013-05-04 03:08:06 
snap_id:    1044      snap_time : 2013-05-04 04:11:06 
snap_id:    1107      snap_time : 2013-05-04 05:14:06 
snap_id:    1170      snap_time : 2013-05-04 06:17:06 
snap_id:    1233      snap_time : 2013-05-04 07:20:06 
snap_id:    1296      snap_time : 2013-05-04 08:23:06 
snap_id:    1359      snap_time : 2013-05-04 09:26:07 
snap_id:    1422      snap_time : 2013-05-04 10:29:06 
snap_id:    1485      snap_time : 2013-05-04 11:32:07 
snap_id:    1548      snap_time : 2013-05-04 12:35:06 
snap_id:    1611      snap_time : 2013-05-04 13:38:07 
snap_id:    1674      snap_time : 2013-05-04 14:41:07 
snap_id:    1737      snap_time : 2013-05-04 15:44:07 
snap_id:    1800      snap_time : 2013-05-04 16:47:07 
snap_id:    1863      snap_time : 2013-05-04 17:50:08 
snap_id:    1926      snap_time : 2013-05-04 18:53:08 
snap_id:    1989      snap_time : 2013-05-04 19:56:08 
snap_id:    2052      snap_time : 2013-05-04 20:59:08 
snap_id:    2115      snap_time : 2013-05-04 22:02:07 
snap_id:    2178      snap_time : 2013-05-04 23:05:08 
snap_id:    2241      snap_time : 2013-05-05 00:08:08 
snap_id:    2304      snap_time : 2013-05-05 01:11:08 
snap_id:    2367      snap_time : 2013-05-05 02:14:08 
snap_id:    2430      snap_time : 2013-05-05 03:17:08 
snap_id:    2493      snap_time : 2013-05-05 04:20:08 
snap_id:    2556      snap_time : 2013-05-05 05:23:08 
snap_id:    2619      snap_time : 2013-05-05 06:26:08 
snap_id:    2682      snap_time : 2013-05-05 07:29:09 
snap_id:    2745      snap_time : 2013-05-05 08:32:09 
snap_id:    2808      snap_time : 2013-05-05 09:35:09 
snap_id:    2871      snap_time : 2013-05-05 10:38:09 
snap_id:    2934      snap_time : 2013-05-05 11:41:09 
snap_id:    2997      snap_time : 2013-05-05 12:44:09 
snap_id:    3060      snap_time : 2013-05-05 13:47:09 
snap_id:    3123      snap_time : 2013-05-05 14:50:09 
snap_id:    3186      snap_time : 2013-05-05 15:53:10 
snap_id:    3249      snap_time : 2013-05-05 16:56:10 
snap_id:    3312      snap_time : 2013-05-05 17:59:10 
snap_id:    3375      snap_time : 2013-05-05 19:02:10 
snap_id:    3438      snap_time : 2013-05-05 20:05:10 
snap_id:    3501      snap_time : 2013-05-05 21:08:10 
snap_id:    3564      snap_time : 2013-05-05 22:11:10 
snap_id:    3627      snap_time : 2013-05-05 23:14:10 
snap_id:    3690      snap_time : 2013-05-06 00:17:11 
snap_id:    3753      snap_time : 2013-05-06 01:20:11 
snap_id:    3816      snap_time : 2013-05-06 02:23:11 
snap_id:    3879      snap_time : 2013-05-06 03:26:10 
snap_id:    3942      snap_time : 2013-05-06 04:29:11 
snap_id:    4005      snap_time : 2013-05-06 05:32:11 
snap_id:    4068      snap_time : 2013-05-06 06:35:11 
snap_id:    4131      snap_time : 2013-05-06 07:38:11 
snap_id:    4194      snap_time : 2013-05-06 08:41:12 
snap_id:    4257      snap_time : 2013-05-06 09:44:12 
snap_id:    4320      snap_time : 2013-05-06 10:47:11 
snap_id:    4383      snap_time : 2013-05-06 11:50:12 
snap_id:    4446      snap_time : 2013-05-06 12:53:11 
snap_id:    4509      snap_time : 2013-05-06 13:56:11 

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:1107
Begin Snapshot Id specified:1107

Enter value for end_snap:1863
End  Snapshot Id specified:1863

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~

Enter value for report_name:yihaodian_mysqlawr.html

Using the report name :yihaodian_mysqlawr.html

Generating the mysql report for this analysis ...
Generating the mysql report Successfully.</pre>
<p>这套测试环境采用一台管理机器,表的配置如下：</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">mysql&gt; use myawr
Database changed
mysql&gt; show tables;
+----------------------------------------------------------+
| Tables_in_myawr                                          |
+----------------------------------------------------------+
| myawr_cpu_info                                           | 
| myawr_host                                               | 
| myawr_innodb_info                                        | 
| myawr_io_info                                            | 
| myawr_isam_info                                          | 
| myawr_load_info                                          | 
| myawr_mysql_info                                         | 
| myawr_query_review                                       | 
| myawr_query_review_history                               | 
| myawr_snapshot                                           | 
| myawr_snapshot_events_waits_summary_by_instance          | 
| myawr_snapshot_events_waits_summary_global_by_event_name | 
| myawr_snapshot_file_summary_by_event_name                | 
| myawr_snapshot_file_summary_by_instance                  | 
| myawr_swap_net_disk_info                                 | 
+----------------------------------------------------------+
15 rows in set (0.00 sec)

mysql&gt; select * from myawr_host;
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
| id | host_name | ip_addr   | port | db_role | version | uptime                | check_time          |
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
|  3 | db-74     | 10.0.0.74 | 3306 | master  | 5.5.27  | 0y 1m 8d 22h 32mi 33s | 2013-05-03 13:09:02 | 
|  4 | pis24     | 10.0.2.24 | 3306 | master  | 5.5.25a | 0y 3m 15d 1h 46mi 41s | 2013-05-06 14:09:12 | 
+----+-----------+-----------+------+---------+---------+-----------------------+---------------------+
2 rows in set (0.00 sec)</pre>
<p>可以看到host_id=3监控的机器为10.0.0.74 依此类推, 1&#8230;xxx 可以无限扩展。</p>
<p>下面为client 端部署的脚本：</p>
<p>[mysql@DCB-SRV-0220 ~]$ crontab -l<br />
* * * * * perl /data/mysql/sh/myawr.pl -u dbauser -p xxxxx -lh 10.0.2.24 -P 3306  -tu myawruser -tp xxxxxx -TP 3306 -th 10.0.1.92 -n eth2 -d c0d1p1 -I 4 >> /data/mysql/sh/myawr_pl.log 2>&#038;1</p>
<p>myawr会自动上传这台mysql机器的所有状态值到管理机器。<br />
下面以10.0.2.24这台mysql 作为一个样本 展示一下AWR报告,目前版本为version 1.0 后期会在github上开源</p>
<p><a href="http://www.vmcd.org/scripts/yihaodian_mysqlawr.html">Yihaodian_Mysql_AWR.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/05/mysql-awr-myawr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux tools part 7– Monitor socket activity</title>
		<link>http://www.vmcd.org/2013/04/linux-tools-part-7-monitor-socket-activity/</link>
		<comments>http://www.vmcd.org/2013/04/linux-tools-part-7-monitor-socket-activity/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 05:01:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[linux tools]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1452</guid>
		<description><![CDATA[systemtap发行版本提供了socktop,用于监控socket套接字之间的通信,具体如下：
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# socktop -h
USAGE: socktop [-d] [-i interval] [-N num] [-P protocol]... [-f family]...
               [-t stype]... [-n pname]... [-p pid]... [-u username]... [-h]
    -d           # print network device traffic (default: off)
    -i interval  # interval in seconds between printing (default: 5)
    -N num       # number of top processes and devices to print (default: 10)
    -f family    # this protocol family only (default: all)
    -P protocol  # this protocol only (default: all)
    -t stype     # this socket type only (default: all)
    -n pname     # this process name only (default: all)
    -p pid       # this process ID only (default: all)
    -u username  # this user only (default: all)
    -h           # print this help text

Protocol Families:
    LOCAL, INET, INET6, IPX, NETLINK, X25, AX25, ATMPVC, APPLETALK, PACKET

Protocols:
    TCP, UDP, SCTP, IP, FC, ... (see /etc/protocols for complete list)

Socket Types:
    STREAM, DGRAM, RAW, RDM, SEQPACKET, DCCP, PACKET
    </pre>
 
 
 
<h2>Description</h2>
<b>socket</b>() creates an endpoint for communication and returns a descriptor.
<p>The <i>domain</i> argument specifies a communication domain; this selects the protocol family which will be used for communication. These families are
defined in <i>&#60;<a href="http://linux.die.net/include/sys/socket.h" rel="nofollow">sys/socket.h</a>&#62;</i>. The currently understood formats include:
<table border='0'>
<tr>
<td align='left'>Name
<td align='left'>Purpose
<td align='left'>Man page
<tr>
<td align='left'><b>AF_UNIX</b>, <b>AF_LOCAL</b>
<td align='left'>Local communication
<td align='left'><i><b><a href="/man/7/unix">unix</a></b>(7)</i>
<tr>
<td align='left'><b>AF_INET</b>
<td align='left'>IPv4 Internet protocols
<td align='left'><i><b><a href="/man/7/ip">ip</a></b>(7)</i>
<tr>
<td align='left'><b>AF_INET6</b>
<td align='left'>IPv6 Internet protocols
<td align='left'><i><b><a href="/man/7/ipv6">ipv6</a></b>(7)</i>
<tr>
<td align='left'><b>AF_IPX</b>
<td align='left'>IPX - Novell protocols
<tr>
<td align='left'><b>AF_NETLINK</b>
<td align='left'>Kernel user interface device
<td align='left'><i><b><a href="/man/7/netlink">netlink</a></b>(7)</i>
<tr>
<td align='left'><b>AF_X25</b>
<td align='left'>ITU-T X.25 / ISO-8208 protocol
<td align='left'><i><b><a href="/man/7/x25">x25</a></b>(7)</i>
<tr>
<td align='left'><b>AF_AX25</b>
<td align='left'>Amateur radio AX.25 protocol
<tr>
<td align='left'><b>AF_ATMPVC</b>
<td align='left'>Access to raw ATM PVCs
<tr>
<td align='left'><b>AF_APPLETALK</b>
<td align='left'>Appletalk
<td align='left'><i><b><a href="/man/7/ddp">ddp</a></b>(7)</i>
<tr>
<td align='left'><b>AF_PACKET</b>
<td align='left'>Low level packet interface
<td align='left'><i><b><a href="/man/7/packet">packet</a></b>(7)</i></table>   

具体安装过程如下,在安装systemtap的前提下：

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# uname -r
2.6.18-194.el5
[root@db-42 ~]# wget ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-2.6.18-194.el5.x86_64.rpm
--2013-04-23 11:38:06--  ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-2.6.18-194.el5.x86_64.rpm
           =&#62; `kernel-debuginfo-2.6.18-194.el5.x86_64.rpm&#039;
Resolving bo.mirror.garr.it... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to bo.mirror.garr.it&#124;193.206.140.34&#124;:21... connected.
Logging in as anonymous ... Logged in!
==&#62; SYST ... done.    ==&#62; PWD ... done.
==&#62; TYPE I ... done.  ==&#62; CWD /pub/1/slc/updates/slc5X/x86_64/debug ... done.
==&#62; SIZE kernel-debuginfo-2.6.18-194.el5.x86_64.rpm ... 181856666
==&#62; PASV ... done.    ==&#62; RETR kernel-debuginfo-2.6.18-194.el5.x86_64.rpm ... done.
Length: 181856666 (173M)

100%[========================================================================================================================================&#62;] 181,856,666 5.07M/s   in 5m 33s  

2013-04-23 11:43:48 (533 KB/s) - `kernel-debuginfo-2.6.18-194.el5.x86_64.rpm&#039; saved [181856666]

[root@db-42 ~]# rpm -ivh kernel-debuginfo-2.6.18-194.el5.x86_64.rpm 
warning: kernel-debuginfo-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-debuginfo       ########################################### [100%]
   
[root@db-42 ~]# wget ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm
--2013-04-23 11:38:50--  ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm
           =&#62; `kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm&#039;
Resolving bo.mirror.garr.it... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to bo.mirror.garr.it&#124;193.206.140.34&#124;:21... connected.
Logging in as anonymous ... Logged in!
==&#62; SYST ... done.    ==&#62; PWD ... done.
==&#62; TYPE I ... done.  ==&#62; CWD /pub/1/slc/updates/slc5X/x86_64/debug ... done.
==&#62; SIZE kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm ... 32845933
==&#62; PASV ... done.    ==&#62; RETR kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm ... done.
Length: 32845933 (31M)

100%[========================================================================================================================================&#62;] 32,845,933  52.6K/s   in 45s     

2013-04-23 11:39:41 (711 KB/s) - `kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm&#039; saved [32845933]

[root@db-42 ~]# rpm -ivh kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm 
warning: kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-debuginfo-common########################################### [100%]</pre>
   
   

<strong>eg:</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">session 1:

SQL&#62; insert into t10 select * from t10;

76074 rows created.

SQL&#62; /

152148 rows created.

SQL&#62; /

304296 rows created.

SQL&#62; /

608592 rows created.

SQL&#62; /

1217184 rows created.

SQL&#62; /

2434368 rows created.

[root@db-42 ~]# socktop  -d -i 5 
======================= Tue Apr 23 11:50:07 2013 ========================
------------------------------- PROCESSES -------------------------------
PID   UID     #SEND   #RECV SEND_KB RECV_KB PROT FAMILY   COMMAND        
28990 1001    18190   18190  130058  128882 TCP  INET     extract        
29003 1100    18185   18185  128881  130058 TCP  INET6    oracle         
29001 1100        5       5       1       0 TCP  INET6    oracle         
2376  1001        1       0       1       0 TCP  INET6    sshd           
23653 1001        3       0       0       0 TCP  INET     extract        
28834 1001        6       0       0       0 UDP  INET6    oracle         
28814 1001        0       6       0       0 UDP  INET6    oracle         
-------------------------------- DEVICES --------------------------------
DEV             #XMIT         #RECV         XMIT_KB         RECV_KB
lo              49559         49559          262136          261458
eth0                9             8               1               0
=========================================================================


[root@db-42 ~]# ps -ef &#124;grep 29003
root      5682  2418  0 12:53 pts/0    00:00:00 grep 29003
grid     29003     1  0 Mar21 ?        00:04:52 oracle+ASM (LOCAL=NO)


[root@db-42 ~]# socktop -f LOCAL -i 5 -d

======================= Tue Apr 23 11:56:03 2013 ========================
------------------------------- PROCESSES -------------------------------
PID   UID     #SEND   #RECV SEND_KB RECV_KB PROT FAMILY   COMMAND        
4862  1100        3       4       0       1 IP   LOCAL    lsnrctl        
21128 1100        4       3       1       0 IP   LOCAL    tnslsnr        
-------------------------------- DEVICES --------------------------------
DEV             #XMIT         #RECV         XMIT_KB         RECV_KB
lo                 85            85             348             347
eth0               10             9               1               0
=========================================================================
</pre>


可以清楚的看到在batch insert 过程中ASM process正处于频繁的活动中。]]></description>
				<content:encoded><![CDATA[<p>systemtap发行版本提供了socktop,用于监控socket套接字之间的通信,具体如下：</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# socktop -h
USAGE: socktop [-d] [-i interval] [-N num] [-P protocol]... [-f family]...
               [-t stype]... [-n pname]... [-p pid]... [-u username]... [-h]
    -d           # print network device traffic (default: off)
    -i interval  # interval in seconds between printing (default: 5)
    -N num       # number of top processes and devices to print (default: 10)
    -f family    # this protocol family only (default: all)
    -P protocol  # this protocol only (default: all)
    -t stype     # this socket type only (default: all)
    -n pname     # this process name only (default: all)
    -p pid       # this process ID only (default: all)
    -u username  # this user only (default: all)
    -h           # print this help text

Protocol Families:
    LOCAL, INET, INET6, IPX, NETLINK, X25, AX25, ATMPVC, APPLETALK, PACKET

Protocols:
    TCP, UDP, SCTP, IP, FC, ... (see /etc/protocols for complete list)

Socket Types:
    STREAM, DGRAM, RAW, RDM, SEQPACKET, DCCP, PACKET
    </pre>
<h2>Description</h2>
<p><b>socket</b>() creates an endpoint for communication and returns a descriptor.</p>
<p>The <i>domain</i> argument specifies a communication domain; this selects the protocol family which will be used for communication. These families are<br />
defined in <i>&lt;<a href="http://linux.die.net/include/sys/socket.h" rel="nofollow">sys/socket.h</a>&gt;</i>. The currently understood formats include:</p>
<table border='0'>
<tr>
<td align='left'>Name</p>
<td align='left'>Purpose</p>
<td align='left'>Man page</p>
<tr>
<td align='left'><b>AF_UNIX</b>, <b>AF_LOCAL</b></p>
<td align='left'>Local communication</p>
<td align='left'><i><b><a href="/man/7/unix">unix</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_INET</b></p>
<td align='left'>IPv4 Internet protocols</p>
<td align='left'><i><b><a href="/man/7/ip">ip</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_INET6</b></p>
<td align='left'>IPv6 Internet protocols</p>
<td align='left'><i><b><a href="/man/7/ipv6">ipv6</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_IPX</b></p>
<td align='left'>IPX &#8211; Novell protocols</p>
<tr>
<td align='left'><b>AF_NETLINK</b></p>
<td align='left'>Kernel user interface device</p>
<td align='left'><i><b><a href="/man/7/netlink">netlink</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_X25</b></p>
<td align='left'>ITU-T X.25 / ISO-8208 protocol</p>
<td align='left'><i><b><a href="/man/7/x25">x25</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_AX25</b></p>
<td align='left'>Amateur radio AX.25 protocol</p>
<tr>
<td align='left'><b>AF_ATMPVC</b></p>
<td align='left'>Access to raw ATM PVCs</p>
<tr>
<td align='left'><b>AF_APPLETALK</b></p>
<td align='left'>Appletalk</p>
<td align='left'><i><b><a href="/man/7/ddp">ddp</a></b>(7)</i></p>
<tr>
<td align='left'><b>AF_PACKET</b></p>
<td align='left'>Low level packet interface</p>
<td align='left'><i><b><a href="/man/7/packet">packet</a></b>(7)</i></table>
<p>具体安装过程如下,在安装systemtap的前提下：</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-42 ~]# uname -r
2.6.18-194.el5
[root@db-42 ~]# wget ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-2.6.18-194.el5.x86_64.rpm
--2013-04-23 11:38:06--  ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-2.6.18-194.el5.x86_64.rpm
           =&gt; `kernel-debuginfo-2.6.18-194.el5.x86_64.rpm&#039;
Resolving bo.mirror.garr.it... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to bo.mirror.garr.it|193.206.140.34|:21... connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD /pub/1/slc/updates/slc5X/x86_64/debug ... done.
==&gt; SIZE kernel-debuginfo-2.6.18-194.el5.x86_64.rpm ... 181856666
==&gt; PASV ... done.    ==&gt; RETR kernel-debuginfo-2.6.18-194.el5.x86_64.rpm ... done.
Length: 181856666 (173M)

100%[========================================================================================================================================&gt;] 181,856,666 5.07M/s   in 5m 33s  

2013-04-23 11:43:48 (533 KB/s) - `kernel-debuginfo-2.6.18-194.el5.x86_64.rpm&#039; saved [181856666]

[root@db-42 ~]# rpm -ivh kernel-debuginfo-2.6.18-194.el5.x86_64.rpm 
warning: kernel-debuginfo-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-debuginfo       ########################################### [100%]
   
[root@db-42 ~]# wget ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm
--2013-04-23 11:38:50--  ftp://bo.mirror.garr.it/pub/1/slc/updates/slc5X/x86_64/debug/kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm
           =&gt; `kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm&#039;
Resolving bo.mirror.garr.it... 193.206.140.34, 2001:760:ffff:b0::34
Connecting to bo.mirror.garr.it|193.206.140.34|:21... connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD /pub/1/slc/updates/slc5X/x86_64/debug ... done.
==&gt; SIZE kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm ... 32845933
==&gt; PASV ... done.    ==&gt; RETR kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm ... done.
Length: 32845933 (31M)

100%[========================================================================================================================================&gt;] 32,845,933  52.6K/s   in 45s     

2013-04-23 11:39:41 (711 KB/s) - `kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm&#039; saved [32845933]

[root@db-42 ~]# rpm -ivh kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm 
warning: kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-debuginfo-common########################################### [100%]</pre>
<p><strong>eg:</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">session 1:

SQL&gt; insert into t10 select * from t10;

76074 rows created.

SQL&gt; /

152148 rows created.

SQL&gt; /

304296 rows created.

SQL&gt; /

608592 rows created.

SQL&gt; /

1217184 rows created.

SQL&gt; /

2434368 rows created.

[root@db-42 ~]# socktop  -d -i 5 
======================= Tue Apr 23 11:50:07 2013 ========================
------------------------------- PROCESSES -------------------------------
PID   UID     #SEND   #RECV SEND_KB RECV_KB PROT FAMILY   COMMAND        
28990 1001    18190   18190  130058  128882 TCP  INET     extract        
29003 1100    18185   18185  128881  130058 TCP  INET6    oracle         
29001 1100        5       5       1       0 TCP  INET6    oracle         
2376  1001        1       0       1       0 TCP  INET6    sshd           
23653 1001        3       0       0       0 TCP  INET     extract        
28834 1001        6       0       0       0 UDP  INET6    oracle         
28814 1001        0       6       0       0 UDP  INET6    oracle         
-------------------------------- DEVICES --------------------------------
DEV             #XMIT         #RECV         XMIT_KB         RECV_KB
lo              49559         49559          262136          261458
eth0                9             8               1               0
=========================================================================


[root@db-42 ~]# ps -ef |grep 29003
root      5682  2418  0 12:53 pts/0    00:00:00 grep 29003
grid     29003     1  0 Mar21 ?        00:04:52 oracle+ASM (LOCAL=NO)


[root@db-42 ~]# socktop -f LOCAL -i 5 -d

======================= Tue Apr 23 11:56:03 2013 ========================
------------------------------- PROCESSES -------------------------------
PID   UID     #SEND   #RECV SEND_KB RECV_KB PROT FAMILY   COMMAND        
4862  1100        3       4       0       1 IP   LOCAL    lsnrctl        
21128 1100        4       3       1       0 IP   LOCAL    tnslsnr        
-------------------------------- DEVICES --------------------------------
DEV             #XMIT         #RECV         XMIT_KB         RECV_KB
lo                 85            85             348             347
eth0               10             9               1               0
=========================================================================
</pre>
<p>可以清楚的看到在batch insert 过程中ASM process正处于频繁的活动中。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/04/linux-tools-part-7-monitor-socket-activity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizer in Oracle 11g  by wwf.</title>
		<link>http://www.vmcd.org/2013/04/1445/</link>
		<comments>http://www.vmcd.org/2013/04/1445/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 02:20:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Experience]]></category>
		<category><![CDATA[11g new feature]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1445</guid>
		<description><![CDATA[By <a href="http://wwwwwfco.itpub.net/post/5073/124999">wwf </a>from ebay COC about Optimizer in Oracle 11g.


<iframe src="http://www.slideshare.net/slideshow/embed_code/18580341" width="680" height="486" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/optimizer-in-oracle-11g-by-wwf-from-ebay-coc" title="Optimizer in oracle 11g by wwf from ebay COC" target="_blank">Optimizer in oracle 11g by wwf from ebay COC</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>]]></description>
				<content:encoded><![CDATA[<p>By <a href="http://wwwwwfco.itpub.net/post/5073/124999">wwf </a>from ebay COC about Optimizer in Oracle 11g.</p>
<p><iframe src="http://www.slideshare.net/slideshow/embed_code/18580341" width="680" height="486" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
<div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/optimizer-in-oracle-11g-by-wwf-from-ebay-coc" title="Optimizer in oracle 11g by wwf from ebay COC" target="_blank">Optimizer in oracle 11g by wwf from ebay COC</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/04/1445/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCIE performance test &#8212; LSI vs FusionIO vs VIRI</title>
		<link>http://www.vmcd.org/2013/04/pcie-performance-test-lsi-vs-fusionio-vs-viri/</link>
		<comments>http://www.vmcd.org/2013/04/pcie-performance-test-lsi-vs-fusionio-vs-viri/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 09:48:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1441</guid>
		<description><![CDATA[Testing three PCIE cards's performance for all of scenes using <a href="http://freecode.com/projects/fio">fio</a>

<iframe src="http://www.slideshare.net/slideshow/embed_code/18045896" width="700" height="500" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/fusion-io-iodrive2-vs-lsi-nytro-lsi-nytro-vs-viri-flashmax-ii-2" title="Fusion io iodrive2 vs LSI nytro lsi nytro vs VIRI flashmax ii 2" target="_blank">Fusion io iodrive2 vs LSI nytro lsi nytro vs VIRI flashmax ii 2</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>

Reference:<a href="http://linux.die.net/man/1/fio">fio parameter setting</a>]]></description>
				<content:encoded><![CDATA[<p>Testing three PCIE cards&#8217;s performance for all of scenes using <a href="http://freecode.com/projects/fio">fio</a></p>
<p><iframe src="http://www.slideshare.net/slideshow/embed_code/18045896" width="700" height="500" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
<div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/fusion-io-iodrive2-vs-lsi-nytro-lsi-nytro-vs-viri-flashmax-ii-2" title="Fusion io iodrive2 vs LSI nytro lsi nytro vs VIRI flashmax ii 2" target="_blank">Fusion io iodrive2 vs LSI nytro lsi nytro vs VIRI flashmax ii 2</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>
<p>Reference:<a href="http://linux.die.net/man/1/fio">fio parameter setting</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/04/pcie-performance-test-lsi-vs-fusionio-vs-viri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>基于MHA 的MySQL高可用方案</title>
		<link>http://www.vmcd.org/2013/03/%e5%9f%ba%e4%ba%8emha-%e7%9a%84mysql%e9%ab%98%e5%8f%af%e7%94%a8%e6%96%b9%e6%a1%88/</link>
		<comments>http://www.vmcd.org/2013/03/%e5%9f%ba%e4%ba%8emha-%e7%9a%84mysql%e9%ab%98%e5%8f%af%e7%94%a8%e6%96%b9%e6%a1%88/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 10:01:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1433</guid>
		<description><![CDATA[<a href="http://space.itpub.net/758322/">aaqwsh</a>与select同学测试的<a href="http://www.slideshare.net/ylouis83/savedfiles?s_title=mhamy-sql&#038;user_login=ylouis83">MHA文档</a>,另外基于这个HA方案公司应该会部署一些核心应用。另外提供之前的<a href="http://www.vmcd.org/2012/04/mysql-high-availability-mha/">MHA测试</a>

<iframe src="http://www.slideshare.net/slideshow/embed_code/17671511" width="800" height="613" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/mhamy-sql" title="基于Mha的my sql高可用方案" target="_blank">基于Mha的my sql高可用方案</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>]]></description>
				<content:encoded><![CDATA[<p><a href="http://space.itpub.net/758322/">aaqwsh</a>与select同学测试的<a href="http://www.slideshare.net/ylouis83/savedfiles?s_title=mhamy-sql&#038;user_login=ylouis83">MHA文档</a>,另外基于这个HA方案公司应该会部署一些核心应用。另外提供之前的<a href="http://www.vmcd.org/2012/04/mysql-high-availability-mha/">MHA测试</a></p>
<p><iframe src="http://www.slideshare.net/slideshow/embed_code/17671511" width="800" height="613" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
<div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ylouis83/mhamy-sql" title="基于Mha的my sql高可用方案" target="_blank">基于Mha的my sql高可用方案</a> </strong> from <strong><a href="http://www.slideshare.net/ylouis83" target="_blank">Louis liu</a></strong> </div>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/03/%e5%9f%ba%e4%ba%8emha-%e7%9a%84mysql%e9%ab%98%e5%8f%af%e7%94%a8%e6%96%b9%e6%a1%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gdb 调试TPCC 一例</title>
		<link>http://www.vmcd.org/2013/03/gdb-%e8%b0%83%e8%af%95tpcc-%e4%b8%80%e4%be%8b/</link>
		<comments>http://www.vmcd.org/2013/03/gdb-%e8%b0%83%e8%af%95tpcc-%e4%b8%80%e4%be%8b/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 09:30:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[trouble shooting]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1428</guid>
		<description><![CDATA[TPCC对mysql 5.5.27做一次性能测试时遭遇 Segmentation fault,gdb调试记录之:

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-81 ~]# uname -a 
Linux db-81 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@db-81 ~]# more /proc/meminfo &#124;grep Total
MemTotal:     49455412 kB
HighTotal:           0 kB
LowTotal:     49455412 kB
SwapTotal:    65537156 kB
VmallocTotal: 34359738367 kB
HugePages_Total:     0
[root@db-81 ~]# more /proc/cpuinfo &#124;grep &#34;processor&#34; &#124;wc -l
16
[root@db-81 ~]# more /proc/cpuinfo &#124;grep  &#34;model name&#34;
model name	: AMD Opteron(tm) Processor 6128</pre>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 src]# export C_INCLUDE_PATH=/data/mysql/include:/lib/:lib64:$LD_LIBRARY_PATH:$PATH
[root@db-13 src]# export PATH=/data/mysql/bin:/lib:/lib64:$LD_LIBRARY_PATH:$PATH:$PATH
[root@db-13 src]# export LD_LIBRARY_PATH=/data/mysql/lib:$PATH
[root@db-13 src]# make all
cc -w -O2 -g -I. `mysql_config --include`  -c load.c
cc -w -O2 -g -I. `mysql_config --include`  -c support.c
cc load.o support.o `mysql_config --libs_r` -lrt -o ../tpcc_load
cc -w -O2 -g -I. `mysql_config --include`  -c main.c
cc -w -O2 -g -I. `mysql_config --include`  -c spt_proc.c
cc -w -O2 -g -I. `mysql_config --include`  -c driver.c
cc -w -O2 -g -I. `mysql_config --include`  -c sequence.c
cc -w -O2 -g -I. `mysql_config --include`  -c rthist.c
cc -w -O2 -g -I. `mysql_config --include`  -c neword.c
cc -w -O2 -g -I. `mysql_config --include`  -c payment.c
cc -w -O2 -g -I. `mysql_config --include`  -c ordstat.c
cc -w -O2 -g -I. `mysql_config --include`  -c delivery.c
cc -w -O2 -g -I. `mysql_config --include`  -c slev.c
cc main.o spt_proc.o driver.o support.o sequence.o rthist.o neword.o payment.o ordstat.o delivery.o slev.o `mysql_config --libs_r` -lrt -o ../tpcc_start</pre>

<strong>[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d test  -u root  -p 'yihaodian'  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319</strong>
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '127.0.0.1'
option d with value 'test'
option u with value 'root'
option p with value 'yihaodian'
option w with value '30'
option c with value '60'
option r with value '60'
option l with value '1000'
option f with value 'mysql_tpcc_20130319'
<Parameters>
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: test
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)
<strong>Segmentation fault</strong>
<strong>[root@db-13 tpcc-mysql]# ./tpcc_start </strong>
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
<Parameters>
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)

RAMP-UP TIME.(10 sec.)
<strong>Segmentation fault</strong>



<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# strace ./tpcc_start
execve(&#34;./tpcc_start&#34;, [&#34;./tpcc_start&#34;], [/* 29 vars */]) = 0
brk(0)                                  = 0xddce000
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29d63a000
uname({sys=&#34;Linux&#34;, node=&#34;db-13&#34;, ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29d63b000
access(&#34;/etc/ld.so.preload&#34;, R_OK)      = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/lib/tls/x86_64/libmysqlclient.so.18&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/lib/tls/x86_64&#34;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/lib/tls/libmysqlclient.so.18&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/lib/tls&#34;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/lib/x86_64/libmysqlclient.so.18&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/lib/x86_64&#34;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/lib/libmysqlclient.so.18&#34;, O_RDONLY) = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0\200\345\2\0\0\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=6870358, ...}) = 0
mmap(NULL, 4577240, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x2ac29d63c000
mprotect(0x2ac29d911000, 1048576, PROT_NONE) = 0
mmap(0x2ac29da11000, 540672, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x2d5000) = 0x2ac29da11000
mmap(0x2ac29da95000, 18392, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29da95000
close(3)                                = 0
open(&#34;/data/mysql/lib/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/tls/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/bin/tls/x86_64&#34;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/tls/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/bin/tls&#34;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/bin/x86_64&#34;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/data/mysql/bin&#34;, {st_mode=S_IFDIR&#124;0755, st_size=4096, ...}) = 0
open(&#34;/lib/tls/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib/tls/x86_64&#34;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&#34;/lib/tls/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib/tls&#34;, 0x7fff4f83cf30)        = -1 ENOENT (No such file or directory)
open(&#34;/lib/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib/x86_64&#34;, 0x7fff4f83cf30)     = -1 ENOENT (No such file or directory)
open(&#34;/lib/libpthread.so.0&#34;, O_RDONLY)  = 3
read(3, &#34;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\230X\0004\0\0\0&#34;..., 832) = 832
close(3)                                = 0
stat(&#34;/lib&#34;, {st_mode=S_IFDIR&#124;0755, st_size=4096, ...}) = 0
open(&#34;/lib64/tls/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib64/tls/x86_64&#34;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&#34;/lib64/tls/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib64/tls&#34;, 0x7fff4f83cf30)      = -1 ENOENT (No such file or directory)
open(&#34;/lib64/x86_64/libpthread.so.0&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&#34;/lib64/x86_64&#34;, 0x7fff4f83cf30)   = -1 ENOENT (No such file or directory)
open(&#34;/lib64/libpthread.so.0&#34;, O_RDONLY) = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0\240W\340\253?\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=145824, ...}) = 0
mmap(0x3fabe00000, 2204528, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x3fabe00000
mprotect(0x3fabe16000, 2093056, PROT_NONE) = 0
mmap(0x3fac015000, 8192, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x15000) = 0x3fac015000
mmap(0x3fac017000, 13168, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_ANONYMOUS, -1, 0) = 0x3fac017000
close(3)                                = 0
open(&#34;/data/mysql/lib/libm.so.6&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/libm.so.6&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/lib/libm.so.6&#34;, O_RDONLY)        = 3
read(3, &#34;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20$Z\0004\0\0\0&#34;..., 832) = 832
close(3)                                = 0
open(&#34;/lib64/libm.so.6&#34;, O_RDONLY)      = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0`&#62;`\253?\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=615136, ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29da9a000
mmap(0x3fab600000, 2629848, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x3fab600000
mprotect(0x3fab682000, 2093056, PROT_NONE) = 0
mmap(0x3fab881000, 8192, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x81000) = 0x3fab881000
close(3)                                = 0
open(&#34;/data/mysql/lib/librt.so.1&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/librt.so.1&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/lib/librt.so.1&#34;, O_RDONLY)       = 3
read(3, &#34;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200H\230\0004\0\0\0&#34;..., 832) = 832
close(3)                                = 0
open(&#34;/lib64/librt.so.1&#34;, O_RDONLY)     = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0 \&#34;\340\257?\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=53448, ...}) = 0
mmap(0x3fafe00000, 2132936, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x3fafe00000
mprotect(0x3fafe07000, 2097152, PROT_NONE) = 0
mmap(0x3fb0007000, 8192, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x7000) = 0x3fb0007000
close(3)                                = 0
open(&#34;/data/mysql/lib/libdl.so.2&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/libdl.so.2&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/lib/libdl.so.2&#34;, O_RDONLY)       = 3
read(3, &#34;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\372W\0004\0\0\0&#34;..., 832) = 832
close(3)                                = 0
open(&#34;/lib64/libdl.so.2&#34;, O_RDONLY)     = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0\20\16\240\253?\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=23360, ...}) = 0
mmap(0x3faba00000, 2109696, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x3faba00000
mprotect(0x3faba02000, 2097152, PROT_NONE) = 0
mmap(0x3fabc02000, 8192, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x2000) = 0x3fabc02000
close(3)                                = 0
open(&#34;/data/mysql/lib/libc.so.6&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/data/mysql/bin/libc.so.6&#34;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&#34;/lib/libc.so.6&#34;, O_RDONLY)        = 3
read(3, &#34;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\317D\0004\0\0\0&#34;..., 832) = 832
close(3)                                = 0
open(&#34;/lib64/libc.so.6&#34;, O_RDONLY)      = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0\220\332!\253?\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=1717800, ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29da9b000
mmap(0x3fab200000, 3498328, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x3fab200000
mprotect(0x3fab34e000, 2093056, PROT_NONE) = 0
mmap(0x3fab54d000, 20480, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x14d000) = 0x3fab54d000
mmap(0x3fab552000, 16728, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_ANONYMOUS, -1, 0) = 0x3fab552000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29da9c000
arch_prctl(ARCH_SET_FS, 0x2ac29da9c6d0) = 0
mprotect(0x3fab54d000, 16384, PROT_READ) = 0
mprotect(0x3fabc02000, 4096, PROT_READ) = 0
mprotect(0x3fb0007000, 4096, PROT_READ) = 0
mprotect(0x3fab881000, 4096, PROT_READ) = 0
mprotect(0x3fac015000, 4096, PROT_READ) = 0
mprotect(0x3fab01b000, 4096, PROT_READ) = 0
set_tid_address(0x2ac29da9c760)         = 25524
set_robust_list(0x2ac29da9c770, 0x18)   = 0
futex(0x7fff4f83da8c, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x3fabe05380, [], SA_RESTORER&#124;SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3fabe052b0, [], SA_RESTORER&#124;SA_RESTART&#124;SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
fstat(1, {st_mode=S_IFCHR&#124;0620, st_rdev=makedev(136, 6), ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2ac29da9d000
write(1, &#34;********************************&#34;..., 40***************************************
) = 40
write(1, &#34;*** ###easy### TPC-C Load Genera&#34;..., 40*** ###easy### TPC-C Load Generator ***
) = 40
write(1, &#34;********************************&#34;..., 40***************************************
) = 40
write(1, &#34;&#60;Parameters&#62;\n&#34;, 13&#60;Parameters&#62;
)          = 13
write(1, &#34;     [server]: \n&#34;, 16     [server]: 
)       = 16
write(1, &#34;     [port]: 3306\n&#34;, 18     [port]: 3306
)     = 18
write(1, &#34;     [DBname]: tpcc\n&#34;, 20     [DBname]: tpcc
)   = 20
write(1, &#34;       [user]: \n&#34;, 16       [user]: 
)       = 16
write(1, &#34;       [pass]: \n&#34;, 16       [pass]: 
)       = 16
write(1, &#34;  [warehouse]: 1\n&#34;, 17  [warehouse]: 1
)      = 17
write(1, &#34; [connection]: 10\n&#34;, 18 [connection]: 10
)     = 18
write(1, &#34;     [rampup]: 10 (sec.)\n&#34;, 25     [rampup]: 10 (sec.)
) = 25
write(1, &#34;    [measure]: 20 (sec.)\n&#34;, 25    [measure]: 20 (sec.)
) = 25
rt_sigaction(SIGALRM, {0x4021c0, [], SA_RESTORER, 0x3fabe0eb10}, NULL, 8) = 0
open(&#34;/dev/urandom&#34;, O_RDONLY)          = 3
read(3, &#34;\253\224\300!&#34;, 4)             = 4
close(3)                                = 0
brk(0)                                  = 0xddce000
brk(0xddef000)                          = 0xddef000
mmap(NULL, 10489856, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS&#124;MAP_32BIT, -1, 0) = 0x40dfb000
mprotect(0x40dfb000, 4096, PROT_NONE)   = 0
clone(child_stack=0x417fb250, flags=CLONE_VM&#124;CLONE_FS&#124;CLONE_FILES&#124;CLONE_SIGHAND&#124;CLONE_THREAD&#124;CLONE_SYSVSEM&#124;CLONE_SETTLS&#124;CLONE_PARENT_SETTID&#124;CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25525
futex(0x417fb9d0, FUTEX_WAIT, 25525, NULL) = 0
open(&#34;/proc/stat&#34;, O_RDONLY)            = 3
read(3, &#34;cpu  4327497980 1619853 67702808&#34;..., 8192) = 3722
close(3)                                = 0
open(&#34;/etc/nsswitch.conf&#34;, O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG&#124;0644, st_size=1696, ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaab000
read(3, &#34;#\n# /etc/nsswitch.conf\n#\n# An ex&#34;..., 4096) = 1696
read(3, &#34;&#34;, 4096)                       = 0
close(3)                                = 0
munmap(0x2aaaaaaab000, 4096)            = 0
open(&#34;/data/mysql/lib/libnss_files.so.2&#34;, O_RDONLY) = 3
read(3, &#34;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&#62;\0\1\0\0\0\340\37\0\0\0\0\0\0&#34;..., 832) = 832
fstat(3, {st_mode=S_IFREG&#124;0755, st_size=53880, ...}) = 0
mmap(NULL, 2139432, PROT_READ&#124;PROT_EXEC, MAP_PRIVATE&#124;MAP_DENYWRITE, 3, 0) = 0x2aaaaaaac000
mprotect(0x2aaaaaab6000, 2093056, PROT_NONE) = 0
mmap(0x2aaaaacb5000, 8192, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_FIXED&#124;MAP_DENYWRITE, 3, 0x9000) = 0x2aaaaacb5000
close(3)                                = 0
mprotect(0x2aaaaacb5000, 4096, PROT_READ) = 0
open(&#34;/etc/services&#34;, O_RDONLY)         = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG&#124;0644, st_size=362031, ...}) = 0
mmap(NULL, 4096, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS, -1, 0) = 0x2aaaaacb7000
read(3, &#34;# /etc/services:\n# $Id: services&#34;..., 4096) = 4096
read(3, &#34;rotocol\nntp\t\t123/tcp\nntp\t\t123/ud&#34;..., 4096) = 4096
read(3, &#34;767/udp\nrsync\t\t873/tcp\t\t\t\t# rsyn&#34;..., 4096) = 4096
read(3, &#34;stmanager\ncvspserver\t2401/tcp\t\t\t&#34;..., 4096) = 4096
close(3)                                = 0
munmap(0x2aaaaacb7000, 4096)            = 0
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTORER&#124;SA_RESTART, 0x3fab2302d0}, {SIG_DFL, [], 0}, 8) = 0
clone(child_stack=0x417fb250, flags=CLONE_VM&#124;CLONE_FS&#124;CLONE_FILES&#124;CLONE_SIGHAND&#124;CLONE_THREAD&#124;CLONE_SYSVSEM&#124;CLONE_SETTLS&#124;CLONE_PARENT_SETTID&#124;CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25526
mmap(NULL, 10489856, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS&#124;MAP_32BIT, -1, 0) = 0x41ef1000
mprotect(0x41ef1000, 4096, PROT_NONE)   = 0
clone(child_stack=0x428f1250, flags=CLONE_VM&#124;CLONE_FS&#124;CLONE_FILES&#124;CLONE_SIGHAND&#124;CLONE_THREAD&#124;CLONE_SYSVSEM&#124;CLONE_SETTLS&#124;CLONE_PARENT_SETTID&#124;CLONE_CHILD_CLEARTID, parent_tidptr=0x428f19d0, tls=0x428f1940, child_tidptr=0x428f19d0) = 25527
mmap(NULL, 10489856, PROT_READ&#124;PROT_WRITE, MAP_PRIVATE&#124;MAP_ANONYMOUS&#124;MAP_32BIT, -1, 0) = 0x428f2000
mprotect(0x428f2000, 4096, PROT_NONE)   = 0
clone(child_stack=0x432f2250, flags=CLONE_VM&#124;CLONE_FS&#124;CLONE_FILES&#124;CLONE_SIGHAND&#124;CLONE_THREAD&#124;CLONE_SYSVSEM&#124;CLONE_SETTLS&#124;CLONE_PARENT_SETTID&#124;CLONE_CHILD_CLEARTID, parent_tidptr=0x432f29d0, tls=0x432f2940, child_tidptr=0x432f29d0) = 25528
+++ killed by SIGSEGV +++</pre>
<strong>
GDB 调用</strong>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &#60;http://gnu.org/licenses/gpl.html&#62;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &#34;show copying&#34;
and &#34;show warranty&#34; for details.
This GDB was configured as &#34;x86_64-redhat-linux-gnu&#34;.
For bug reporting instructions, please see:
&#60;http://www.gnu.org/software/gdb/bugs/&#62;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&#60;Parameters&#62;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 27592)]
[Thread 0x40a00940 (LWP 27592) exited]
[New Thread 0x40a00940 (LWP 27593)]
[New Thread 0x41401940 (LWP 27594)]
[New Thread 0x41e02940 (LWP 27595)]
[New Thread 0x42803940 (LWP 27596)]
[New Thread 0x43204940 (LWP 27597)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 27593)]
my_stat (path=0x409ff750 &#34;/usr/local/mysql/share/charsets/Index.xml&#34;, stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 27589] will be killed.

Quit anyway? (y or n) y</pre>


<strong>删除 mysql.sock</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tmp]# rm mysql.sock 
rm: remove symbolic link `mysql.sock&#039;? y</pre>

<strong>再次调用</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &#60;http://gnu.org/licenses/gpl.html&#62;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &#34;show copying&#34;
and &#34;show warranty&#34; for details.
This GDB was configured as &#34;x86_64-redhat-linux-gnu&#34;.
For bug reporting instructions, please see:
&#60;http://www.gnu.org/software/gdb/bugs/&#62;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&#60;Parameters&#62;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28199)]
[Thread 0x40a00940 (LWP 28199) exited]
[New Thread 0x40a00940 (LWP 28200)]
[New Thread 0x41401940 (LWP 28201)]
error at thread_main
0, , 
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x41401940 (LWP 28201) exited]
[New Thread 0x41e02940 (LWP 28202)]
error at thread_main
[Thread 0x40a00940 (LWP 28200) exited]
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x42803940 (LWP 28203)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x41e02940 (LWP 28202) exited]
[Thread 0x42803940 (LWP 28203) exited]
[New Thread 0x43204940 (LWP 28204)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x43c05940 (LWP 28205)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x43204940 (LWP 28204) exited]
[Thread 0x43c05940 (LWP 28205) exited]
[New Thread 0x44606940 (LWP 28207)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x45007940 (LWP 28208)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x44606940 (LWP 28207) exited]
[Thread 0x45007940 (LWP 28208) exited]
[New Thread 0x45a08940 (LWP 28210)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x46409940 (LWP 28211)]
[Thread 0x45a08940 (LWP 28210) exited]

RAMP-UP TIME.(10 sec.)
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x46409940 (LWP 28211) exited]

MEASURING START.

  10, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000
  20, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000

STOPPING THREADS

&#60;Raw Results&#62;
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 
 in 20 sec.

&#60;Raw Results2(sum ver.)&#62;
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 

&#60;Constraint Check&#62; (all must be [OK])
 [transaction percentage]
        Payment: nan% (&#62;=43.0%) [NG] *
   Order-Status: nan% (&#62;= 4.0%) [NG] *
       Delivery: nan% (&#62;= 4.0%) [NG] *
    Stock-Level: nan% (&#62;= 4.0%) [NG] *
 [response time (at least 90% passed)]
      New-Order: nan%  [NG] *
        Payment: nan%  [NG] *
   Order-Status: nan%  [NG] *
       Delivery: nan%  [NG] *
    Stock-Level: nan%  [NG] *

&#60;TpmC&#62;
                 0.000 TpmC

Program exited normally.
(gdb) q</pre>

<strong>重新link mysql.sock</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 data]# ln -s  /data/mysql/data/mysql.sock  /tmp/mysql.sock
[root@db-13 data]# ls -l /tmp/mysql.sock 
lrwxrwxrwx 1 root root 27 Mar 19 15:59 /tmp/mysql.sock -&#62; /data/mysql/data/mysql.sock</pre>

<strong>再次调用</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &#60;http://gnu.org/licenses/gpl.html&#62;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &#34;show copying&#34;
and &#34;show warranty&#34; for details.
This GDB was configured as &#34;x86_64-redhat-linux-gnu&#34;.
For bug reporting instructions, please see:
&#60;http://www.gnu.org/software/gdb/bugs/&#62;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&#60;Parameters&#62;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28955)]
[Thread 0x40a00940 (LWP 28955) exited]
[New Thread 0x40a00940 (LWP 28956)]
[New Thread 0x41401940 (LWP 28957)]
[New Thread 0x41e02940 (LWP 28959)]
[New Thread 0x42803940 (LWP 28961)]
[New Thread 0x43204940 (LWP 28963)]
[New Thread 0x43c05940 (LWP 28965)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 28956)]
my_stat (path=0x409ff750 &#34;/usr/local/mysql/share/charsets/Index.xml&#34;, stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) q
A debugging session is active.

	Inferior 1 [process 28952] will be killed.

Quit anyway? (y or n) y</pre>

[root@db-13 tpcc-mysql]# find / -name mysql-5.5.27
[root@db-13 tpcc-mysql]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            148786916   4382960 136724084   4% /
/dev/sda7            258699556    191712 245154620   1% /backup
/dev/sdb1            1134323348 178684616 897089040  17% /data
/dev/sda6             10153988   8957012    672860  94% /var
/dev/sda5             20315812    203008  19064164   2% /home
/dev/sda1               248895     12332    223713   6% /boot
tmpfs                 66047196         0  66047196   0% /dev/shm

<strong>创建path file</strong>
[root@db-13 data]# mkdir -p /usr/local/mysql/share/charsets/
[root@db-13 data]# touch /usr/local/mysql/share/charsets/Index.xml

<strong>再次调用</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &#60;http://gnu.org/licenses/gpl.html&#62;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &#34;show copying&#34;
and &#34;show warranty&#34; for details.
This GDB was configured as &#34;x86_64-redhat-linux-gnu&#34;.
For bug reporting instructions, please see:
&#60;http://www.gnu.org/software/gdb/bugs/&#62;.
(gdb) file ptcc_start
ptcc_start: No such file or directory.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&#60;Parameters&#62;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 29179)]
[Thread 0x40a00940 (LWP 29179) exited]
[New Thread 0x40a00940 (LWP 29180)]
[New Thread 0x41401940 (LWP 29181)]
[New Thread 0x41e02940 (LWP 29182)]
[New Thread 0x42803940 (LWP 29183)]
[New Thread 0x43204940 (LWP 29184)]
[New Thread 0x43c05940 (LWP 29185)]
[New Thread 0x44606940 (LWP 29186)]
error at thread_main
error at thread_main
error at thread_main
1045, 28000, 
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
[New Thread 0x45007940 (LWP 29188)]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x43204940 (LWP 29184) exited]
error at thread_main
[Thread 0x41e02940 (LWP 29182) exited]
[New Thread 0x45a08940 (LWP 29189)]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x42803940 (LWP 29183) exited]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x44606940 (LWP 29186) exited]
[Thread 0x45007940 (LWP 29188) exited]
[Thread 0x43c05940 (LWP 29185) exited]
[Thread 0x41401940 (LWP 29181) exited]
[New Thread 0x46409940 (LWP 29190)]
error at thread_main

RAMP-UP TIME.(10 sec.)
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x40a00940 (LWP 29180) exited]
[Thread 0x45a08940 (LWP 29189) exited]
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x46409940 (LWP 29190) exited]

MEASURING START.

  10, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000, 0(0):0.000&#124;0.000

Program received signal SIGINT, Interrupt.
0x0000003fabe0e39d in pause () from /lib64/libpthread.so.0
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) 
Please answer y or n.
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) y
[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d test  -u root  -p &#039;yihaodian&#039;  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value &#039;127.0.0.1&#039;
option d with value &#039;test&#039;
option u with value &#039;root&#039;
option p with value &#039;yihaodian&#039;
option w with value &#039;30&#039;
option c with value &#039;60&#039;
option r with value &#039;60&#039;
option l with value &#039;1000&#039;
option f with value &#039;mysql_tpcc_20130319&#039;
&#60;Parameters&#62;
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: test
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist</pre>

<strong>
OK！</strong>

<strong>[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d tpcc1000  -u root  -p 'yihaodian'  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319</strong>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value &#039;127.0.0.1&#039;
option d with value &#039;tpcc1000&#039;
option u with value &#039;root&#039;
option p with value &#039;yihaodian&#039;
option w with value &#039;30&#039;
option c with value &#039;60&#039;
option r with value &#039;60&#039;
option l with value &#039;1000&#039;
option f with value &#039;mysql_tpcc_20130319&#039;
&#60;Parameters&#62;
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: tpcc1000
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)

RAMP-UP TIME.(60 sec.)

MEASURING START.

  10, 2639(0):2.135&#124;3.487, 2635(0):0.443&#124;1.441, 263(0):0.258&#124;0.458, 264(0):2.723&#124;3.562, 263(0):6.258&#124;9.052
  20, 3144(0):2.073&#124;2.507, 3151(0):0.431&#124;0.539, 316(0):0.267&#124;0.368, 318(0):2.680&#124;2.907, 314(0):6.354&#124;8.062
  30, 2609(0):2.024&#124;2.413, 2602(0):0.417&#124;0.505, 259(0):0.245&#124;0.288, 257(0):2.774&#124;2.940, 261(0):6.030&#124;6.613
  40, 3311(0):2.079&#124;2.454, 3309(0):0.426&#124;0.522, 332(0):0.238&#124;0.270, 328(0):2.699&#124;3.071, 331(0):5.638&#124;7.017
  50, 2464(0):2.105&#124;2.475, 2469(0):0.425&#124;0.540, 246(0):0.229&#124;0.289, 247(0):2.651&#124;2.820, 246(0):6.281&#124;6.725
  60, 2884(0):2.085&#124;2.773, 2883(0):0.427&#124;0.501, 289(0):0.253&#124;0.281, 295(0):2.712&#124;2.879, 289(0):6.327&#124;6.646
  70, 2641(0):2.043&#124;2.436, 2640(0):0.437&#124;0.701, 263(0):0.248&#124;0.292, 263(0):2.833&#124;2.868, 263(0):5.315&#124;6.035
  80, 3045(0):2.038&#124;2.497, 3049(0):0.429&#124;0.558, 306(0):0.252&#124;0.452, 310(0):2.692&#124;2.841, 305(0):5.783&#124;7.210
  90, 2551(0):2.043&#124;2.564, 2551(0):0.433&#124;0.552, 255(0):0.258&#124;0.325, 249(0):2.653&#124;2.823, 256(0):5.321&#124;6.107
 100, 2553(0):2.078&#124;2.721, 2551(0):0.439&#124;0.551, 254(0):0.231&#124;0.247, 256(0):2.688&#124;3.792, 255(0):6.583&#124;7.014
 110, 2923(0):2.060&#124;2.483, 2924(0):0.426&#124;0.763, 293(0):0.251&#124;0.295, 295(0):2.645&#124;2.878, 293(0):5.843&#124;6.378
 120, 2639(0):2.007&#124;2.252, 2638(0):0.434&#124;0.539, 264(0):0.234&#124;0.301, 261(0):2.726&#124;2.823, 262(0):6.181&#124;6.839
 130, 2884(0):2.062&#124;2.515, 2885(0):0.425&#124;0.554, 288(0):0.248&#124;0.285, 283(0):2.597&#124;2.892, 289(0):6.086&#124;6.667
 140, 2758(0):2.095&#124;2.542, 2750(0):0.434&#124;0.962, 276(0):0.252&#124;0.267, 279(0):2.662&#124;3.059, 276(0):5.527&#124;7.356
 150, 2406(0):2.011&#124;2.492, 2416(0):0.426&#124;0.492, 241(0):0.259&#124;0.285, 248(0):2.650&#124;2.691, 240(0):5.834&#124;6.283
 160, 2903(0):2.066&#124;2.361, 2904(0):0.431&#124;0.522, 289(0):0.255&#124;0.328, 282(0):2.828&#124;2.927, 291(0):5.757&#124;6.791
 170, 2677(0):2.023&#124;2.730, 2672(0):0.426&#124;0.535, 269(0):0.249&#124;0.348, 267(0):2.674&#124;2.810, 268(0):5.374&#124;7.441
 180, 2395(0):2.061&#124;2.474, 2385(0):0.440&#124;0.555, 239(0):0.249&#124;0.259, 254(0):2.643&#124;2.724, 239(0):5.896&#124;7.731</pre>]]></description>
				<content:encoded><![CDATA[<p>TPCC对mysql 5.5.27做一次性能测试时遭遇 Segmentation fault,gdb调试记录之:</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-81 ~]# uname -a 
Linux db-81 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@db-81 ~]# more /proc/meminfo |grep Total
MemTotal:     49455412 kB
HighTotal:           0 kB
LowTotal:     49455412 kB
SwapTotal:    65537156 kB
VmallocTotal: 34359738367 kB
HugePages_Total:     0
[root@db-81 ~]# more /proc/cpuinfo |grep &quot;processor&quot; |wc -l
16
[root@db-81 ~]# more /proc/cpuinfo |grep  &quot;model name&quot;
model name	: AMD Opteron(tm) Processor 6128</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 src]# export C_INCLUDE_PATH=/data/mysql/include:/lib/:lib64:$LD_LIBRARY_PATH:$PATH
[root@db-13 src]# export PATH=/data/mysql/bin:/lib:/lib64:$LD_LIBRARY_PATH:$PATH:$PATH
[root@db-13 src]# export LD_LIBRARY_PATH=/data/mysql/lib:$PATH
[root@db-13 src]# make all
cc -w -O2 -g -I. `mysql_config --include`  -c load.c
cc -w -O2 -g -I. `mysql_config --include`  -c support.c
cc load.o support.o `mysql_config --libs_r` -lrt -o ../tpcc_load
cc -w -O2 -g -I. `mysql_config --include`  -c main.c
cc -w -O2 -g -I. `mysql_config --include`  -c spt_proc.c
cc -w -O2 -g -I. `mysql_config --include`  -c driver.c
cc -w -O2 -g -I. `mysql_config --include`  -c sequence.c
cc -w -O2 -g -I. `mysql_config --include`  -c rthist.c
cc -w -O2 -g -I. `mysql_config --include`  -c neword.c
cc -w -O2 -g -I. `mysql_config --include`  -c payment.c
cc -w -O2 -g -I. `mysql_config --include`  -c ordstat.c
cc -w -O2 -g -I. `mysql_config --include`  -c delivery.c
cc -w -O2 -g -I. `mysql_config --include`  -c slev.c
cc main.o spt_proc.o driver.o support.o sequence.o rthist.o neword.o payment.o ordstat.o delivery.o slev.o `mysql_config --libs_r` -lrt -o ../tpcc_start</pre>
<p><strong>[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d test  -u root  -p &#8216;yihaodian&#8217;  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319</strong><br />
***************************************<br />
*** ###easy### TPC-C Load Generator ***<br />
***************************************<br />
option h with value &#8217;127.0.0.1&#8242;<br />
option d with value &#8216;test&#8217;<br />
option u with value &#8216;root&#8217;<br />
option p with value &#8216;yihaodian&#8217;<br />
option w with value &#8217;30&#8242;<br />
option c with value &#8217;60&#8242;<br />
option r with value &#8217;60&#8242;<br />
option l with value &#8217;1000&#8242;<br />
option f with value &#8216;mysql_tpcc_20130319&#8242;<br />
<Parameters><br />
     [server]: 127.0.0.1<br />
     [port]: 3306<br />
     [DBname]: test<br />
       [user]: root<br />
       [pass]: yihaodian<br />
  [warehouse]: 30<br />
 [connection]: 60<br />
     [rampup]: 60 (sec.)<br />
    [measure]: 1000 (sec.)<br />
<strong>Segmentation fault</strong><br />
<strong>[root@db-13 tpcc-mysql]# ./tpcc_start </strong><br />
***************************************<br />
*** ###easy### TPC-C Load Generator ***<br />
***************************************<br />
<Parameters><br />
     [server]:<br />
     [port]: 3306<br />
     [DBname]: tpcc<br />
       [user]:<br />
       [pass]:<br />
  [warehouse]: 1<br />
 [connection]: 10<br />
     [rampup]: 10 (sec.)<br />
    [measure]: 20 (sec.)</p>
<p>RAMP-UP TIME.(10 sec.)<br />
<strong>Segmentation fault</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# strace ./tpcc_start
execve(&quot;./tpcc_start&quot;, [&quot;./tpcc_start&quot;], [/* 29 vars */]) = 0
brk(0)                                  = 0xddce000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29d63a000
uname({sys=&quot;Linux&quot;, node=&quot;db-13&quot;, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29d63b000
access(&quot;/etc/ld.so.preload&quot;, R_OK)      = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/lib/tls/x86_64/libmysqlclient.so.18&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/lib/tls/x86_64&quot;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/lib/tls/libmysqlclient.so.18&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/lib/tls&quot;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/lib/x86_64/libmysqlclient.so.18&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/lib/x86_64&quot;, 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/lib/libmysqlclient.so.18&quot;, O_RDONLY) = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\200\345\2\0\0\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=6870358, ...}) = 0
mmap(NULL, 4577240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ac29d63c000
mprotect(0x2ac29d911000, 1048576, PROT_NONE) = 0
mmap(0x2ac29da11000, 540672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2d5000) = 0x2ac29da11000
mmap(0x2ac29da95000, 18392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac29da95000
close(3)                                = 0
open(&quot;/data/mysql/lib/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/tls/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/bin/tls/x86_64&quot;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/tls/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/bin/tls&quot;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/bin/x86_64&quot;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/data/mysql/bin&quot;, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(&quot;/lib/tls/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib/tls/x86_64&quot;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&quot;/lib/tls/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib/tls&quot;, 0x7fff4f83cf30)        = -1 ENOENT (No such file or directory)
open(&quot;/lib/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib/x86_64&quot;, 0x7fff4f83cf30)     = -1 ENOENT (No such file or directory)
open(&quot;/lib/libpthread.so.0&quot;, O_RDONLY)  = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\230X\0004\0\0\0&quot;..., 832) = 832
close(3)                                = 0
stat(&quot;/lib&quot;, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(&quot;/lib64/tls/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib64/tls/x86_64&quot;, 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open(&quot;/lib64/tls/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib64/tls&quot;, 0x7fff4f83cf30)      = -1 ENOENT (No such file or directory)
open(&quot;/lib64/x86_64/libpthread.so.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat(&quot;/lib64/x86_64&quot;, 0x7fff4f83cf30)   = -1 ENOENT (No such file or directory)
open(&quot;/lib64/libpthread.so.0&quot;, O_RDONLY) = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\240W\340\253?\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145824, ...}) = 0
mmap(0x3fabe00000, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fabe00000
mprotect(0x3fabe16000, 2093056, PROT_NONE) = 0
mmap(0x3fac015000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x3fac015000
mmap(0x3fac017000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fac017000
close(3)                                = 0
open(&quot;/data/mysql/lib/libm.so.6&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/libm.so.6&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/lib/libm.so.6&quot;, O_RDONLY)        = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20$Z\0004\0\0\0&quot;..., 832) = 832
close(3)                                = 0
open(&quot;/lib64/libm.so.6&quot;, O_RDONLY)      = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0`&gt;`\253?\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=615136, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9a000
mmap(0x3fab600000, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fab600000
mprotect(0x3fab682000, 2093056, PROT_NONE) = 0
mmap(0x3fab881000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x81000) = 0x3fab881000
close(3)                                = 0
open(&quot;/data/mysql/lib/librt.so.1&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/librt.so.1&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/lib/librt.so.1&quot;, O_RDONLY)       = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200H\230\0004\0\0\0&quot;..., 832) = 832
close(3)                                = 0
open(&quot;/lib64/librt.so.1&quot;, O_RDONLY)     = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0 \&quot;\340\257?\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53448, ...}) = 0
mmap(0x3fafe00000, 2132936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fafe00000
mprotect(0x3fafe07000, 2097152, PROT_NONE) = 0
mmap(0x3fb0007000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x3fb0007000
close(3)                                = 0
open(&quot;/data/mysql/lib/libdl.so.2&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/libdl.so.2&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/lib/libdl.so.2&quot;, O_RDONLY)       = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\372W\0004\0\0\0&quot;..., 832) = 832
close(3)                                = 0
open(&quot;/lib64/libdl.so.2&quot;, O_RDONLY)     = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\20\16\240\253?\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=23360, ...}) = 0
mmap(0x3faba00000, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3faba00000
mprotect(0x3faba02000, 2097152, PROT_NONE) = 0
mmap(0x3fabc02000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x3fabc02000
close(3)                                = 0
open(&quot;/data/mysql/lib/libc.so.6&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/data/mysql/bin/libc.so.6&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
open(&quot;/lib/libc.so.6&quot;, O_RDONLY)        = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\317D\0004\0\0\0&quot;..., 832) = 832
close(3)                                = 0
open(&quot;/lib64/libc.so.6&quot;, O_RDONLY)      = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\220\332!\253?\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1717800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9b000
mmap(0x3fab200000, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fab200000
mprotect(0x3fab34e000, 2093056, PROT_NONE) = 0
mmap(0x3fab54d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x3fab54d000
mmap(0x3fab552000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fab552000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9c000
arch_prctl(ARCH_SET_FS, 0x2ac29da9c6d0) = 0
mprotect(0x3fab54d000, 16384, PROT_READ) = 0
mprotect(0x3fabc02000, 4096, PROT_READ) = 0
mprotect(0x3fb0007000, 4096, PROT_READ) = 0
mprotect(0x3fab881000, 4096, PROT_READ) = 0
mprotect(0x3fac015000, 4096, PROT_READ) = 0
mprotect(0x3fab01b000, 4096, PROT_READ) = 0
set_tid_address(0x2ac29da9c760)         = 25524
set_robust_list(0x2ac29da9c770, 0x18)   = 0
futex(0x7fff4f83da8c, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x3fabe05380, [], SA_RESTORER|SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3fabe052b0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9d000
write(1, &quot;********************************&quot;..., 40***************************************
) = 40
write(1, &quot;*** ###easy### TPC-C Load Genera&quot;..., 40*** ###easy### TPC-C Load Generator ***
) = 40
write(1, &quot;********************************&quot;..., 40***************************************
) = 40
write(1, &quot;&lt;Parameters&gt;\n&quot;, 13&lt;Parameters&gt;
)          = 13
write(1, &quot;     [server]: \n&quot;, 16     [server]: 
)       = 16
write(1, &quot;     [port]: 3306\n&quot;, 18     [port]: 3306
)     = 18
write(1, &quot;     [DBname]: tpcc\n&quot;, 20     [DBname]: tpcc
)   = 20
write(1, &quot;       [user]: \n&quot;, 16       [user]: 
)       = 16
write(1, &quot;       [pass]: \n&quot;, 16       [pass]: 
)       = 16
write(1, &quot;  [warehouse]: 1\n&quot;, 17  [warehouse]: 1
)      = 17
write(1, &quot; [connection]: 10\n&quot;, 18 [connection]: 10
)     = 18
write(1, &quot;     [rampup]: 10 (sec.)\n&quot;, 25     [rampup]: 10 (sec.)
) = 25
write(1, &quot;    [measure]: 20 (sec.)\n&quot;, 25    [measure]: 20 (sec.)
) = 25
rt_sigaction(SIGALRM, {0x4021c0, [], SA_RESTORER, 0x3fabe0eb10}, NULL, 8) = 0
open(&quot;/dev/urandom&quot;, O_RDONLY)          = 3
read(3, &quot;\253\224\300!&quot;, 4)             = 4
close(3)                                = 0
brk(0)                                  = 0xddce000
brk(0xddef000)                          = 0xddef000
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x40dfb000
mprotect(0x40dfb000, 4096, PROT_NONE)   = 0
clone(child_stack=0x417fb250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25525
futex(0x417fb9d0, FUTEX_WAIT, 25525, NULL) = 0
open(&quot;/proc/stat&quot;, O_RDONLY)            = 3
read(3, &quot;cpu  4327497980 1619853 67702808&quot;..., 8192) = 3722
close(3)                                = 0
open(&quot;/etc/nsswitch.conf&quot;, O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaab000
read(3, &quot;#\n# /etc/nsswitch.conf\n#\n# An ex&quot;..., 4096) = 1696
read(3, &quot;&quot;, 4096)                       = 0
close(3)                                = 0
munmap(0x2aaaaaaab000, 4096)            = 0
open(&quot;/data/mysql/lib/libnss_files.so.2&quot;, O_RDONLY) = 3
read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\340\37\0\0\0\0\0\0&quot;..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53880, ...}) = 0
mmap(NULL, 2139432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaaaac000
mprotect(0x2aaaaaab6000, 2093056, PROT_NONE) = 0
mmap(0x2aaaaacb5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x2aaaaacb5000
close(3)                                = 0
mprotect(0x2aaaaacb5000, 4096, PROT_READ) = 0
open(&quot;/etc/services&quot;, O_RDONLY)         = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=362031, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacb7000
read(3, &quot;# /etc/services:\n# $Id: services&quot;..., 4096) = 4096
read(3, &quot;rotocol\nntp\t\t123/tcp\nntp\t\t123/ud&quot;..., 4096) = 4096
read(3, &quot;767/udp\nrsync\t\t873/tcp\t\t\t\t# rsyn&quot;..., 4096) = 4096
read(3, &quot;stmanager\ncvspserver\t2401/tcp\t\t\t&quot;..., 4096) = 4096
close(3)                                = 0
munmap(0x2aaaaacb7000, 4096)            = 0
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTORER|SA_RESTART, 0x3fab2302d0}, {SIG_DFL, [], 0}, 8) = 0
clone(child_stack=0x417fb250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25526
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x41ef1000
mprotect(0x41ef1000, 4096, PROT_NONE)   = 0
clone(child_stack=0x428f1250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x428f19d0, tls=0x428f1940, child_tidptr=0x428f19d0) = 25527
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x428f2000
mprotect(0x428f2000, 4096, PROT_NONE)   = 0
clone(child_stack=0x432f2250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x432f29d0, tls=0x432f2940, child_tidptr=0x432f29d0) = 25528
+++ killed by SIGSEGV +++</pre>
<p><strong><br />
GDB 调用</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&lt;Parameters&gt;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 27592)]
[Thread 0x40a00940 (LWP 27592) exited]
[New Thread 0x40a00940 (LWP 27593)]
[New Thread 0x41401940 (LWP 27594)]
[New Thread 0x41e02940 (LWP 27595)]
[New Thread 0x42803940 (LWP 27596)]
[New Thread 0x43204940 (LWP 27597)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 27593)]
my_stat (path=0x409ff750 &quot;/usr/local/mysql/share/charsets/Index.xml&quot;, stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 27589] will be killed.

Quit anyway? (y or n) y</pre>
<p><strong>删除 mysql.sock</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tmp]# rm mysql.sock 
rm: remove symbolic link `mysql.sock&#039;? y</pre>
<p><strong>再次调用</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&lt;Parameters&gt;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28199)]
[Thread 0x40a00940 (LWP 28199) exited]
[New Thread 0x40a00940 (LWP 28200)]
[New Thread 0x41401940 (LWP 28201)]
error at thread_main
0, , 
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x41401940 (LWP 28201) exited]
[New Thread 0x41e02940 (LWP 28202)]
error at thread_main
[Thread 0x40a00940 (LWP 28200) exited]
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x42803940 (LWP 28203)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x41e02940 (LWP 28202) exited]
[Thread 0x42803940 (LWP 28203) exited]
[New Thread 0x43204940 (LWP 28204)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x43c05940 (LWP 28205)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x43204940 (LWP 28204) exited]
[Thread 0x43c05940 (LWP 28205) exited]
[New Thread 0x44606940 (LWP 28207)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x45007940 (LWP 28208)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x44606940 (LWP 28207) exited]
[Thread 0x45007940 (LWP 28208) exited]
[New Thread 0x45a08940 (LWP 28210)]
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[New Thread 0x46409940 (LWP 28211)]
[Thread 0x45a08940 (LWP 28210) exited]

RAMP-UP TIME.(10 sec.)
error at thread_main
2002, HY000, Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)
[Thread 0x46409940 (LWP 28211) exited]

MEASURING START.

  10, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000
  20, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000

STOPPING THREADS

&lt;Raw Results&gt;
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 
 in 20 sec.

&lt;Raw Results2(sum ver.)&gt;
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 

&lt;Constraint Check&gt; (all must be [OK])
 [transaction percentage]
        Payment: nan% (&gt;=43.0%) [NG] *
   Order-Status: nan% (&gt;= 4.0%) [NG] *
       Delivery: nan% (&gt;= 4.0%) [NG] *
    Stock-Level: nan% (&gt;= 4.0%) [NG] *
 [response time (at least 90% passed)]
      New-Order: nan%  [NG] *
        Payment: nan%  [NG] *
   Order-Status: nan%  [NG] *
       Delivery: nan%  [NG] *
    Stock-Level: nan%  [NG] *

&lt;TpmC&gt;
                 0.000 TpmC

Program exited normally.
(gdb) q</pre>
<p><strong>重新link mysql.sock</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 data]# ln -s  /data/mysql/data/mysql.sock  /tmp/mysql.sock
[root@db-13 data]# ls -l /tmp/mysql.sock 
lrwxrwxrwx 1 root root 27 Mar 19 15:59 /tmp/mysql.sock -&gt; /data/mysql/data/mysql.sock</pre>
<p><strong>再次调用</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&lt;Parameters&gt;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28955)]
[Thread 0x40a00940 (LWP 28955) exited]
[New Thread 0x40a00940 (LWP 28956)]
[New Thread 0x41401940 (LWP 28957)]
[New Thread 0x41e02940 (LWP 28959)]
[New Thread 0x42803940 (LWP 28961)]
[New Thread 0x43204940 (LWP 28963)]
[New Thread 0x43c05940 (LWP 28965)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 28956)]
my_stat (path=0x409ff750 &quot;/usr/local/mysql/share/charsets/Index.xml&quot;, stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) q
A debugging session is active.

	Inferior 1 [process 28952] will be killed.

Quit anyway? (y or n) y</pre>
<p>[root@db-13 tpcc-mysql]# find / -name mysql-5.5.27<br />
[root@db-13 tpcc-mysql]# df -k<br />
Filesystem           1K-blocks      Used Available Use% Mounted on<br />
/dev/sda2            148786916   4382960 136724084   4% /<br />
/dev/sda7            258699556    191712 245154620   1% /backup<br />
/dev/sdb1            1134323348 178684616 897089040  17% /data<br />
/dev/sda6             10153988   8957012    672860  94% /var<br />
/dev/sda5             20315812    203008  19064164   2% /home<br />
/dev/sda1               248895     12332    223713   6% /boot<br />
tmpfs                 66047196         0  66047196   0% /dev/shm</p>
<p><strong>创建path file</strong><br />
[root@db-13 data]# mkdir -p /usr/local/mysql/share/charsets/<br />
[root@db-13 data]# touch /usr/local/mysql/share/charsets/Index.xml</p>
<p><strong>再次调用</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
(gdb) file ptcc_start
ptcc_start: No such file or directory.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
&lt;Parameters&gt;
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 29179)]
[Thread 0x40a00940 (LWP 29179) exited]
[New Thread 0x40a00940 (LWP 29180)]
[New Thread 0x41401940 (LWP 29181)]
[New Thread 0x41e02940 (LWP 29182)]
[New Thread 0x42803940 (LWP 29183)]
[New Thread 0x43204940 (LWP 29184)]
[New Thread 0x43c05940 (LWP 29185)]
[New Thread 0x44606940 (LWP 29186)]
error at thread_main
error at thread_main
error at thread_main
1045, 28000, 
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
[New Thread 0x45007940 (LWP 29188)]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x43204940 (LWP 29184) exited]
error at thread_main
[Thread 0x41e02940 (LWP 29182) exited]
[New Thread 0x45a08940 (LWP 29189)]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x42803940 (LWP 29183) exited]
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x44606940 (LWP 29186) exited]
[Thread 0x45007940 (LWP 29188) exited]
[Thread 0x43c05940 (LWP 29185) exited]
[Thread 0x41401940 (LWP 29181) exited]
[New Thread 0x46409940 (LWP 29190)]
error at thread_main

RAMP-UP TIME.(10 sec.)
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x40a00940 (LWP 29180) exited]
[Thread 0x45a08940 (LWP 29189) exited]
error at thread_main
1045, 28000, Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)
[Thread 0x46409940 (LWP 29190) exited]

MEASURING START.

  10, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000

Program received signal SIGINT, Interrupt.
0x0000003fabe0e39d in pause () from /lib64/libpthread.so.0
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) 
Please answer y or n.
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) y
[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d test  -u root  -p &#039;yihaodian&#039;  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value &#039;127.0.0.1&#039;
option d with value &#039;test&#039;
option u with value &#039;root&#039;
option p with value &#039;yihaodian&#039;
option w with value &#039;30&#039;
option c with value &#039;60&#039;
option r with value &#039;60&#039;
option l with value &#039;1000&#039;
option f with value &#039;mysql_tpcc_20130319&#039;
&lt;Parameters&gt;
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: test
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist
error at thread_main
1146, 42S02, Table &#039;test.customer&#039; doesn&#039;t exist</pre>
<p><strong><br />
OK！</strong></p>
<p><strong>[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d tpcc1000  -u root  -p &#8216;yihaodian&#8217;  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value &#039;127.0.0.1&#039;
option d with value &#039;tpcc1000&#039;
option u with value &#039;root&#039;
option p with value &#039;yihaodian&#039;
option w with value &#039;30&#039;
option c with value &#039;60&#039;
option r with value &#039;60&#039;
option l with value &#039;1000&#039;
option f with value &#039;mysql_tpcc_20130319&#039;
&lt;Parameters&gt;
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: tpcc1000
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)

RAMP-UP TIME.(60 sec.)

MEASURING START.

  10, 2639(0):2.135|3.487, 2635(0):0.443|1.441, 263(0):0.258|0.458, 264(0):2.723|3.562, 263(0):6.258|9.052
  20, 3144(0):2.073|2.507, 3151(0):0.431|0.539, 316(0):0.267|0.368, 318(0):2.680|2.907, 314(0):6.354|8.062
  30, 2609(0):2.024|2.413, 2602(0):0.417|0.505, 259(0):0.245|0.288, 257(0):2.774|2.940, 261(0):6.030|6.613
  40, 3311(0):2.079|2.454, 3309(0):0.426|0.522, 332(0):0.238|0.270, 328(0):2.699|3.071, 331(0):5.638|7.017
  50, 2464(0):2.105|2.475, 2469(0):0.425|0.540, 246(0):0.229|0.289, 247(0):2.651|2.820, 246(0):6.281|6.725
  60, 2884(0):2.085|2.773, 2883(0):0.427|0.501, 289(0):0.253|0.281, 295(0):2.712|2.879, 289(0):6.327|6.646
  70, 2641(0):2.043|2.436, 2640(0):0.437|0.701, 263(0):0.248|0.292, 263(0):2.833|2.868, 263(0):5.315|6.035
  80, 3045(0):2.038|2.497, 3049(0):0.429|0.558, 306(0):0.252|0.452, 310(0):2.692|2.841, 305(0):5.783|7.210
  90, 2551(0):2.043|2.564, 2551(0):0.433|0.552, 255(0):0.258|0.325, 249(0):2.653|2.823, 256(0):5.321|6.107
 100, 2553(0):2.078|2.721, 2551(0):0.439|0.551, 254(0):0.231|0.247, 256(0):2.688|3.792, 255(0):6.583|7.014
 110, 2923(0):2.060|2.483, 2924(0):0.426|0.763, 293(0):0.251|0.295, 295(0):2.645|2.878, 293(0):5.843|6.378
 120, 2639(0):2.007|2.252, 2638(0):0.434|0.539, 264(0):0.234|0.301, 261(0):2.726|2.823, 262(0):6.181|6.839
 130, 2884(0):2.062|2.515, 2885(0):0.425|0.554, 288(0):0.248|0.285, 283(0):2.597|2.892, 289(0):6.086|6.667
 140, 2758(0):2.095|2.542, 2750(0):0.434|0.962, 276(0):0.252|0.267, 279(0):2.662|3.059, 276(0):5.527|7.356
 150, 2406(0):2.011|2.492, 2416(0):0.426|0.492, 241(0):0.259|0.285, 248(0):2.650|2.691, 240(0):5.834|6.283
 160, 2903(0):2.066|2.361, 2904(0):0.431|0.522, 289(0):0.255|0.328, 282(0):2.828|2.927, 291(0):5.757|6.791
 170, 2677(0):2.023|2.730, 2672(0):0.426|0.535, 269(0):0.249|0.348, 267(0):2.674|2.810, 268(0):5.374|7.441
 180, 2395(0):2.061|2.474, 2385(0):0.440|0.555, 239(0):0.249|0.259, 254(0):2.643|2.724, 239(0):5.896|7.731</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/03/gdb-%e8%b0%83%e8%af%95tpcc-%e4%b8%80%e4%be%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux tools part 6– network Monitoring (2)</title>
		<link>http://www.vmcd.org/2013/03/linux-tools-part-6-network-monitoring-2/</link>
		<comments>http://www.vmcd.org/2013/03/linux-tools-part-6-network-monitoring-2/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 06:42:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[linux tools]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1425</guid>
		<description><![CDATA[基于上次的nicstat linux还提供了nethogs,可以监控指定pid的具体流量,在这里可以下到<a href="http://nethogs.sourceforge.net/">源码</a>.

获取过程：

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">open(&#34;/proc/$pid/fd&#34;)
open(&#34;/proc/net/tcp&#34;)
open(&#34;/proc/net/tcp6&#34;)
open(&#34;/etc/passwd&#34;)</pre>



<strong>eg:</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-81 27274]# nethogs  -d  5

NetHogs version 0.7.snapshot

  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
31984 oracle   oracleyhddb2                 eth0      35.318    4166.566 KB/sec
16420 liuyang  sshd: liuyang@pts/1          eth0       0.389	   0.013 KB/sec
0     root     ..83:10050-10.1.0.173:45031             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:44767             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:44399             0.000	   0.000 KB/sec
16514 zabbix   /sbin/zabbix_agentd          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:42917             0.000	   0.000 KB/sec
31986 oracle   oracleyhddb2                 eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:40690             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:39504             0.000	   0.000 KB/sec
15016 liuyang  sshd: liuyang@pts/0          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:38933             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:38792             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:36237             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:35992             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:35715             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34958             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34793             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34079             0.000	   0.000 KB/sec
15134 liuyang  sshd: liuyang@notty          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:28508             0.000	   0.000 KB/sec
0     root     unknown TCP                             0.000	   0.000 KB/sec

  TOTAL                                               35.707    4166.579 KB/sec </pre>
  
  

<strong>/proc/net/tcp</strong>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">
[root@db-81 ~]# cat /proc/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm-&#62;when retrnsmt   uid  timeout inode                                                     
   0: 00000000:2742 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54323        0 50676198 1 ffff810745393940 3000 0 0 2 -1                 
   1: 00000000:1622 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54322        0 1204282 1 ffff81063ff60680 3000 0 0 2 -1                  
   2: 00000000:0CEA 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54326        0 102946291 1 ffff810bda120180 3000 0 0 2 -1                
   3: 00000000:0015 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 102942838 1 ffff81062bc60080 3000 0 0 2 -1                
   4: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 98812948 1 ffff810bda121980 3000 0 0 2 -1                 
   5: 0100007F:177A 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104444736 1 ffff81004f0286c0 3000 0 0 2 -1                
   6: 0100007F:177B 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104449554 1 ffff81063ff60c80 3000 0 0 2 -1                
   7: 0100007F:177C 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104472621 1 ffff81062bc60680 3000 0 0 2 -1                
   8: 0100007F:177D 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104475697 1 ffff81033613b880 3000 0 0 2 -1                
   9: 0100007F:177E 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104460816 1 ffff81063ff60080 3000 0 0 2 -1                
  10: 0100007F:177F 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104477846 1 ffff81033613a680 3000 0 0 2 -1                
  11: 5100000A:0016 6E14000A:D92E 01 00000034:00000000 01:00000032 00000000     0        0 104477788 4 ffff81033613a080 512 40 15 3 100              
  12: 5100000A:0016 6E14000A:D304 01 00000000:00000000 02:0008BF47 00000000     0        0 104475630 2 ffff81062bc60c80 256 40 16 3 3                
  13: 5100000A:0016 6E14000A:C804 01 00000000:00000000 02:00078BBC 00000000     0        0 104472775 2 ffff81062bc61880 252 40 16 9 100              
  14: 5100000A:0016 6E14000A:EC72 01 00000000:00000000 02:0004210C 00000000     0        0 104444698 2 ffff81004f0280c0 493 40 18 4 4                
  15: 5100000A:0016 6E14000A:C7ED 01 00000000:00000000 02:0007889C 00000000     0        0 104472575 2 ffff81062bc61280 230 40 0 3 3                 
  16: 5100000A:0016 6E14000A:F6FC 01 00000000:00000000 02:0008A211 00000000     0        0 104460762 2 ffff81063ff61880 333 40 18 4 100              
  17: 5100000A:0016 6E14000A:EDC5 01 00000034:00000000 01:00000016 00000000     0        0 104449512 3 ffff81063ff61280 238 40 1 4 2    </pre>

<p>The data presented in each output column is:</p>

<table bgcolor="#FFFFFF" cellspacing="1" cellpadding="4" border="0">
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>sl</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The number of the line in the output listing. </p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>local_address</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The local IP address and port number for the socket. The IP address is displayed as a little-endian four-byte hexadecimal number; that is, the least significant byte is listed first, so you'll need to reverse the order of the bytes to convert it to an IP address. The port number is a simple two-byte hexadecimal number.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>rem_address</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The remote IP address and port number for the socket. Encoding is the same as for the local_address.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>st</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The socket status.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>tx_queue:rx_queue</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The size of the transmit and receive queues.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>tr:tm->when</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The tr field indicates whether a timer is active for this socket. A value of zero indicates the timer is not active. The tm->when field indicates the time remaining (in jiffies) before timeout occurs.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>retrnsmt</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">Unused.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>uid</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">The ID of the user that owns the socket. This is the same ID found in the /etc/passwd file.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>time-out</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">Unused.</p></td></tr>
<tr><td valign="top" bgcolor="#cccc99"><p class="secondary"><b>inode</b></p></td>
<td valign="top" bgcolor="#cccc99"><p class="secondary">A cryptic-looking number that identifies the socket to the Linux virtual filesystem.</p></td></tr>
</table>]]></description>
				<content:encoded><![CDATA[<p>基于上次的nicstat linux还提供了nethogs,可以监控指定pid的具体流量,在这里可以下到<a href="http://nethogs.sourceforge.net/">源码</a>.</p>
<p>获取过程：</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">open(&quot;/proc/$pid/fd&quot;)
open(&quot;/proc/net/tcp&quot;)
open(&quot;/proc/net/tcp6&quot;)
open(&quot;/etc/passwd&quot;)</pre>
<p><strong>eg:</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@db-81 27274]# nethogs  -d  5

NetHogs version 0.7.snapshot

  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
31984 oracle   oracleyhddb2                 eth0      35.318    4166.566 KB/sec
16420 liuyang  sshd: liuyang@pts/1          eth0       0.389	   0.013 KB/sec
0     root     ..83:10050-10.1.0.173:45031             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:44767             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:44399             0.000	   0.000 KB/sec
16514 zabbix   /sbin/zabbix_agentd          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:42917             0.000	   0.000 KB/sec
31986 oracle   oracleyhddb2                 eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:40690             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:39504             0.000	   0.000 KB/sec
15016 liuyang  sshd: liuyang@pts/0          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:38933             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:38792             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:36237             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:35992             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:35715             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34958             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34793             0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:34079             0.000	   0.000 KB/sec
15134 liuyang  sshd: liuyang@notty          eth0       0.000	   0.000 KB/sec
0     root     ..83:10050-10.1.0.173:28508             0.000	   0.000 KB/sec
0     root     unknown TCP                             0.000	   0.000 KB/sec

  TOTAL                                               35.707    4166.579 KB/sec </pre>
<p><strong>/proc/net/tcp</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">
[root@db-81 ~]# cat /proc/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm-&gt;when retrnsmt   uid  timeout inode                                                     
   0: 00000000:2742 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54323        0 50676198 1 ffff810745393940 3000 0 0 2 -1                 
   1: 00000000:1622 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54322        0 1204282 1 ffff81063ff60680 3000 0 0 2 -1                  
   2: 00000000:0CEA 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54326        0 102946291 1 ffff810bda120180 3000 0 0 2 -1                
   3: 00000000:0015 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 102942838 1 ffff81062bc60080 3000 0 0 2 -1                
   4: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 98812948 1 ffff810bda121980 3000 0 0 2 -1                 
   5: 0100007F:177A 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104444736 1 ffff81004f0286c0 3000 0 0 2 -1                
   6: 0100007F:177B 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104449554 1 ffff81063ff60c80 3000 0 0 2 -1                
   7: 0100007F:177C 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104472621 1 ffff81062bc60680 3000 0 0 2 -1                
   8: 0100007F:177D 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104475697 1 ffff81033613b880 3000 0 0 2 -1                
   9: 0100007F:177E 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104460816 1 ffff81063ff60080 3000 0 0 2 -1                
  10: 0100007F:177F 00000000:0000 0A 00000000:00000000 00:00000000 00000000 54324        0 104477846 1 ffff81033613a680 3000 0 0 2 -1                
  11: 5100000A:0016 6E14000A:D92E 01 00000034:00000000 01:00000032 00000000     0        0 104477788 4 ffff81033613a080 512 40 15 3 100              
  12: 5100000A:0016 6E14000A:D304 01 00000000:00000000 02:0008BF47 00000000     0        0 104475630 2 ffff81062bc60c80 256 40 16 3 3                
  13: 5100000A:0016 6E14000A:C804 01 00000000:00000000 02:00078BBC 00000000     0        0 104472775 2 ffff81062bc61880 252 40 16 9 100              
  14: 5100000A:0016 6E14000A:EC72 01 00000000:00000000 02:0004210C 00000000     0        0 104444698 2 ffff81004f0280c0 493 40 18 4 4                
  15: 5100000A:0016 6E14000A:C7ED 01 00000000:00000000 02:0007889C 00000000     0        0 104472575 2 ffff81062bc61280 230 40 0 3 3                 
  16: 5100000A:0016 6E14000A:F6FC 01 00000000:00000000 02:0008A211 00000000     0        0 104460762 2 ffff81063ff61880 333 40 18 4 100              
  17: 5100000A:0016 6E14000A:EDC5 01 00000034:00000000 01:00000016 00000000     0        0 104449512 3 ffff81063ff61280 238 40 1 4 2    </pre>
<p>The data presented in each output column is:</p>
<table bgcolor="#FFFFFF" cellspacing="1" cellpadding="4" border="0">
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>sl</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The number of the line in the output listing. </p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>local_address</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The local IP address and port number for the socket. The IP address is displayed as a little-endian four-byte hexadecimal number; that is, the least significant byte is listed first, so you&#8217;ll need to reverse the order of the bytes to convert it to an IP address. The port number is a simple two-byte hexadecimal number.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>rem_address</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The remote IP address and port number for the socket. Encoding is the same as for the local_address.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>st</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The socket status.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>tx_queue:rx_queue</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The size of the transmit and receive queues.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>tr:tm->when</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The tr field indicates whether a timer is active for this socket. A value of zero indicates the timer is not active. The tm->when field indicates the time remaining (in jiffies) before timeout occurs.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>retrnsmt</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">Unused.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>uid</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">The ID of the user that owns the socket. This is the same ID found in the /etc/passwd file.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>time-out</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">Unused.</p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#cccc99">
<p class="secondary"><b>inode</b></p>
</td>
<td valign="top" bgcolor="#cccc99">
<p class="secondary">A cryptic-looking number that identifies the socket to the Linux virtual filesystem.</p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/03/linux-tools-part-6-network-monitoring-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update exadata flash disk  firmware due to poor performance on X2-2</title>
		<link>http://www.vmcd.org/2013/03/update-exadata-flash-disk-firmware-due-to-poor-performance-on-x2-2/</link>
		<comments>http://www.vmcd.org/2013/03/update-exadata-flash-disk-firmware-due-to-poor-performance-on-x2-2/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 08:02:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Experience]]></category>
		<category><![CDATA[Exadata]]></category>

		<guid isPermaLink="false">http://www.vmcd.org/?p=1422</guid>
		<description><![CDATA[ASR XD报警抛出如下错误

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">&#34;
dm01cel02: Hardware Error has been detected in the Flash Logs on the Cell Node
dm01cel02: Please open up a Service Request with Oracle to resolve the Error
dm01cel02: View File /tmp/ASR-Flash-Fault-Check-Log for further Information of the Error
dm01cel02: This log File can be copied to the Oracle Service Request for Error Reference&#34;</pre>


by running sundiag we got these informations:

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">	 name:              	 dm01cel02_FLASHCACHE
	 cellDisk:          	 FD_11_dm01cel02,FD_09_dm01cel02,FD_13_dm01cel02,FD_14_dm01cel02,FD_10_dm01cel02,FD_03_dm01cel02,FD_07_dm01cel02,FD_06_dm01cel02,FD_01_dm01cel02,FD_15_dm01cel02,FD_04_dm01cel02,FD_08_dm01cel02,FD_02_dm01cel02,FD_12_dm01cel02,FD_05_dm01cel02
	 creationTime:      	 2012-06-26T17:41:47+08:00
	 degradedCelldisks: 	 FD_00_dm01cel02
	 effectiveCacheSize:	 341.953125G
	 id:                	 8141998e-5451-4ee9-bf27-f61982297ade
	 size:              	 364.75G
	 status:            	 warning  ---------------&#62;error status


	 name:              	 FLASH_1_0
	 diskType:          	 FlashDisk
	 luns:              	 1_0
	 makeModel:         	 &#34;MARVELL SD88SA02&#34;
	 physicalFirmware:  	 D20Y
	 physicalInsertTime:	 2012-05-10T02:43:53+08:00
	 physicalSize:      	 22.8880615234375G
	 slotNumber:        	 &#34;PCI Slot: 1; FDOM: 0&#34;
	 status:            	 poor performance   -------&#62;error status</pre>

	

Reference by note 1504776.1 and step by step updating firmware.


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel03 dev]# imageinfo 

Kernel version: 2.6.18-274.18.1.0.1.el5 #1 SMP Thu Feb 9 19:07:16 EST 2012 x86_64
Cell version: OSS_11.2.3.1.0_LINUX.X64_120304
Cell rpm version: cell-11.2.3.1.0_LINUX.X64_120304-1

Active image version: 11.2.3.1.0.120304
Active image activated: 2012-05-07 02:13:48 -0700
Active image status: success
Active system partition on device: /dev/md5
Active software partition on device: /dev/md7

In partition rollback: Impossible

Cell boot usb partition: /dev/sdm1
Cell boot usb version: 11.2.3.1.0.120304

Inactive image version: undefined
Rollback to the inactive partitions: Impossible
</pre>




<strong>update firmware on storage cell node</strong>

<strong>1 comfirm that griddisk status  should return no output</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e &#039;list griddisk attributes name,asmmodestatus&#039; &#124; \
&#62;        egrep -v &#039;UNUSED&#124;ONLINE&#039;

or check other nodes disk status 

cellcli -e &#039;list griddisk attributes name,asmmodestatus&#039; &#124; \
       egrep -v &#039;UNUSED&#124;ONLINE&#039;</pre>
       
<strong>2 apply path 14793859</strong>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 14793859]# ./p14793859.sh
[INFO] Begin patch 14793859
[INFO] Resetting ILOM to ensure clean reboot. Wait 240 seconds.
[INFO] Patch has been staged.  Stop cell services, then run &#039;/opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits&#039; to activate new firmware and restart system.
[INFO] If restarting cells in a rolling manner, ensure ASMDEACTIVATIONOUTCOME=Yes for all griddisks before activating new firmware.
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# cellcli -e &#039;alter griddisk all inactive&#039;
GridDisk DATA_DM02_CD_00_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_01_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_02_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_03_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_04_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_05_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_06_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_07_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_08_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_09_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_10_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_11_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_02_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_03_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_04_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_05_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_06_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_07_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_08_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_09_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_10_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_11_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_00_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_01_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_02_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_03_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_04_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_05_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_06_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_07_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_08_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_09_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_10_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_11_dm02cel02 successfully altered
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# cellcli -e &#039;alter cell shutdown services all&#039;

Stopping the RS, CELLSRV, and MS services...
The SHUTDOWN of services was successful.</pre>

<strong>3 active new firmware</strong>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 14793859]# /opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits
SUNFlashDOM: OK
[INFO] Reset the ILOM before trying ILOM update. Wait for 240 seconds as part of the reset for ILOM to be ready.
Sent cold reset command to MC
Now updating the ILOM and the BIOS ...
[INFO] Start ILOM firmware upgrade to version 3.0.16.10.d r74499. Attempt 1 of 2.
[INFO] Generated temporary ILOM user: iu_hhyll
[INFO] Generated temporary ILOM password: ********
[INFO] ipmitool user set name 3 iu_hhyll
[INFO] ipmitool user set password 3 ********
[INFO] ipmitool sunoem cli force &#34;set /SP/users/iu_hhyll role=aucro&#34;
Connected. Use ^D to exit.
-&#62; set /SP/users/iu_hhyll role=aucro

Set &#039;role&#039; to &#039;aucro&#039;


-&#62; Session closed
Disconnected
[INFO] export IPMI_PASSWORD=********
[INFO] ipmiflash -v -I lanplus -H 10.61.1.239 -U iu_hhyll -E write /tmp/firmware/SUNBIOS force script config delaybios warning=0
[INFO] unset IPMI_PASSWORD
[INFO] ipmitool user set name 3 &#34;&#34;
Set User Name command failed (user 3, name ): Invalid data field in request

[INFO] ILOM update, ipmiflash return code 0

[INFO] ILOM will be reloaded in case of successful firmware upgrade to version 3.0.16.10.d r74499
[INFO] In this case close Sun ILOM Remote Console and corresponding Internet Exporer windows.
[INFO] Re-open both windows in few minutes.

[INFO] Waiting for the service processor to come up for 180 seconds
[INFO] ILOM firmware upgrade completed with success
Update all DOM firmware for all hbas
flash_dom -h 1 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 1.  /proc/mpt/ioc0    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 2 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 2.  /proc/mpt/ioc1    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 3 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 3.  /proc/mpt/ioc2    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 4 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 4.  /proc/mpt/ioc3    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

[WARNING] The hardware and firmware are not supported. See details below

[BIOSVersion]
Requires:
 08120104 
Found:
 08080102

[BIOSDate]
Requires:
 05/08/2012 
Found:
 05/23/2011

[ILOMVersion]
Requires:
 3.0.16.10.d r74499 
Found:
 3.0.16.10 r65138

[PCISlot:HBA:LSIModel:LSIhw:MPThw:LSIfw:MPTBios:DOM:OSDevice:DOMMake:DOMModel:DOMfw:CountAuraCountDOM]
Requires:
 AllSlots AllHBAs SAS1068E B3orC0 105 011b5c00 06.26.00.00 AllDOMs NotApplicable MARVELL SD88SA02 D21Y  4_16
 
Found:
 AllSlots AllHBAs SAS1068E B3orC0 105 011b5c00 06.26.00.00 AllDOMs NotApplicable MARVELL SD88SA02 D20Y  4_16

[WARNING] The hardware and firmware are not supported. See details above
[INFO] Rebooting in 5 minutes for firmware updates to take effect ...

                                     
Cache Flush is successfully done on adapter 0.

Exit Code: 0x00
Starting ipmi drivers: [  OK  ]

Starting ipmi_watchdog driver: [  OK  ]

Starting ipmi_poweroff driver: [  OK  ]


                                     
Cache Flush is successfully done on adapter 0.

Exit Code: 0x00
[INFO] Power cycle using /tmp/firmware/SUNBIOSPowerCycle
Wait 180 seconds for the ILOM power cycle package to take effect. Then start the power down.


Broadcast message from root (pts/0) (Thu Mar 14 13:36:45 2013):




The system is going down for system halt NOW!


Connection closed by foreign host.</pre>


--------



<strong>after reboot </strong>


<strong>1 Confirm the firmware update is complete </strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]#  cellcli -e &#34;list physicaldisk attributes name, physicalFirmware \
&#62;        where diskType = &#039;FlashDisk&#039;&#34;
	 FLASH_1_0	 D21Y
	 FLASH_1_1	 D21Y
	 FLASH_1_2	 D21Y
	 FLASH_1_3	 D21Y
	 FLASH_2_0	 D21Y
	 FLASH_2_1	 D21Y
	 FLASH_2_2	 D21Y
	 FLASH_2_3	 D21Y
	 FLASH_4_0	 D21Y
	 FLASH_4_1	 D21Y
	 FLASH_4_2	 D21Y
	 FLASH_4_3	 D21Y
	 FLASH_5_0	 D21Y
	 FLASH_5_1	 D21Y
	 FLASH_5_2	 D21Y
	 FLASH_5_3	 D21Y
[root@dm02cel02 ~]# /opt/oracle.cellos/CheckHWnFWProfile -d &#124; grep -A1 ILOMVersion
[ILOMVersion]
 3.0.16.10.d r74499
[root@dm02cel02 ~]# /opt/oracle.cellos/CheckHWnFWProfile -c loose
[SUCCESS] The hardware and firmware profile matches one of the supported profiles</pre>

<strong>
2 active griddisks</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e &#039;alter griddisk all active&#039;
GridDisk DATA_DM02_CD_00_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_01_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_02_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_03_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_04_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_05_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_06_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_07_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_08_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_09_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_10_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_11_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_02_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_03_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_04_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_05_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_06_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_07_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_08_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_09_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_10_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_11_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_00_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_01_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_02_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_03_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_04_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_05_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_06_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_07_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_08_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_09_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_10_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_11_dm02cel02 successfully altered
</pre>
<strong>3 Recreate the CELLBOOT USB</strong>

<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# /opt/oracle.cellos/make_cellboot_usb.sh -execute -force
Candidate for the Oracle Exadata Cell start up boot device     : /dev/sdm
Partition on candidate device                                  : /dev/sdm1
The current product version                                    : 11.2.3.1.0.120304
Label of the current Oracle Exadata Cell start up boot device  : CELLBOOT
The current CELLBOOT USB product version                       : 11.2.3.1.0.120304
[DEBUG] set_cell_boot_usb: cell usb        : /dev/sdm
[DEBUG] set_cell_boot_usb: mnt sys         : /
[DEBUG] set_cell_boot_usb: preserve        : preserve
[DEBUG] set_cell_boot_usb: mnt usb         : /mnt/usb.make.cellboot
[DEBUG] set_cell_boot_usb: lock            : /tmp/usb.make.cellboot.lock
[DEBUG] set_cell_boot_usb: serial console  : 
[DEBUG] set_cell_boot_usb: kernel mode     : kernel
[DEBUG] set_cell_boot_usb: mnt iso save    : 
Create CELLBOOT USB on device /dev/sdm

The number of cylinders for this disk is set to 2825.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won&#039;t be recoverable.


The number of cylinders for this disk is set to 2825.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-2825, default 1): Last cylinder or +size or +sizeM or +sizeK (1-2825, default 2825): 
Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
489600 inodes, 978513 blocks
48925 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1002438656
30 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
//opt/oracle.cellos/iso ~
Copying ./imgboot.lst to /mnt/usb.make.cellboot/. ...
...

Copying ./imgboot.lst.14793859 to /mnt/usb.make.cellboot/. ...
Copying ./initrd.img.14793859 to /mnt/usb.make.cellboot/. ...
Running &#34;tar -x -j -p -v -C /mnt/usb.make.cellboot -f //opt/oracle.cellos/iso/cellbits/cellboot.tbz initrd-*.img vmlinuz-* grub/&#34; ...
grub/
grub/xfs_stage1_5
grub/vstafs_stage1_5
grub/menu.lst
grub/e2fs_stage1_5
grub/grub.conf
grub/oracle.xpm.gz
grub/device.map
grub/stage1
grub/jfs_stage1_5
grub/reiserfs_stage1_5
grub/minix_stage1_5
grub/ufs2_stage1_5
grub/stage2
grub/iso9660_stage1_5
grub/fat_stage1_5
grub/ffs_stage1_5
initrd-2.6.18-194.3.1.0.2.el5.img
vmlinuz-2.6.18-194.3.1.0.2.el5
Copying //opt/oracle.cellos/tmpl/oracle.xpm.gz to /mnt/usb.make.cellboot/grub/oracle.xpm.gz ...
[DEBUG] set_grub_conf_n_initrd: mnt sys        : /
[DEBUG] set_grub_conf_n_initrd: grub template  : USB_grub.in
[DEBUG] set_grub_conf_n_initrd: boot dir       : /mnt/usb.make.cellboot
[DEBUG] set_grub_conf_n_initrd: kernel param   : 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: marker         : I_am_CELLBOOT_usb
[DEBUG] set_grub_conf_n_initrd: mode           : 
[DEBUG] set_grub_conf_n_initrd: Image id file: //opt/oracle.cellos/image.id
[DEBUG] set_grub_conf_n_initrd: System device where image id exists: /dev/md5
[DEBUG] set_grub_conf_n_initrd: Kernel version: 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: System device with image_id (/dev/md5) and kernel version (2.6.18-274.18.1.0.1.el5) are in sync
[DEBUG] set_grub_conf_n_initrd: Full kernel version: 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: system device for the next boot: /dev/md5
[DEBUG] set_grub_conf_n_initrd: initrd for the next boot: /mnt/usb.make.cellboot/initrd-2.6.18-274.18.1.0.1.el5.img
[INFO] set_grub_conf_n_initrd: Set /dev/md5 in /mnt/usb.make.cellboot/I_am_CELLBOOT_usb
[INFO] Set kernel 2.6.18-274.18.1.0.1.el5 and system device /dev/md5 in generated /mnt/usb.make.cellboot/grub/grub.conf
[INFO] Set /dev/md5 in /mnt/usb.make.cellboot/initrd-2.6.18-274.18.1.0.1.el5.img
43450 blocks
log/
log/do_image.sh.log
log/cellos.11.2.3.1.0.120304.20120507.021428.PDT.tar.gz
log/cellos.11.2.3.1.0.120304.20120507.032629.EDT.tar.gz


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub&#62; root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub&#62; setup (hd0)
 Checking if &#34;/boot/grub/stage1&#34; exists... no
 Checking if &#34;/grub/stage1&#34; exists... yes
 Checking if &#34;/grub/stage2&#34; exists... yes
 Checking if &#34;/grub/e2fs_stage1_5&#34; exists... yes
 Running &#34;embed /grub/e2fs_stage1_5 (hd0)&#34;...  16 sectors are embedded.
succeeded
 Running &#34;install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf&#34;... succeeded
Done.</pre>

<strong>
4 checking ASM disk recover status </strong>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">
[root@dm02cel02 ~]# cellcli -e list griddisk attributes name, asmmodestatus
	 DATA_DM02_CD_00_dm02cel02	 SYNCING  ---&#62; recovering
	 DATA_DM02_CD_01_dm02cel02	 SYNCING
	 DATA_DM02_CD_02_dm02cel02	 SYNCING
	 DATA_DM02_CD_03_dm02cel02	 SYNCING
	 DATA_DM02_CD_04_dm02cel02	 SYNCING
	 DATA_DM02_CD_05_dm02cel02	 SYNCING
	 DATA_DM02_CD_06_dm02cel02	 SYNCING
	 DATA_DM02_CD_07_dm02cel02	 SYNCING
	 DATA_DM02_CD_08_dm02cel02	 SYNCING
	 DATA_DM02_CD_09_dm02cel02	 SYNCING
	 DATA_DM02_CD_10_dm02cel02	 SYNCING
	 DATA_DM02_CD_11_dm02cel02	 SYNCING
	 DBFS_DG_CD_02_dm02cel02  	 ONLINE   ---&#62; complete
	 DBFS_DG_CD_03_dm02cel02  	 ONLINE
	 DBFS_DG_CD_04_dm02cel02  	 ONLINE
	 DBFS_DG_CD_05_dm02cel02  	 ONLINE
	 DBFS_DG_CD_06_dm02cel02  	 ONLINE
	 DBFS_DG_CD_07_dm02cel02  	 ONLINE
	 DBFS_DG_CD_08_dm02cel02  	 ONLINE
	 DBFS_DG_CD_09_dm02cel02  	 ONLINE
	 DBFS_DG_CD_10_dm02cel02  	 ONLINE
	 DBFS_DG_CD_11_dm02cel02  	 ONLINE
	 RECO_DM02_CD_00_dm02cel02	 OFFLINE  ---&#62; not start recovering
	 RECO_DM02_CD_01_dm02cel02	 OFFLINE
	 RECO_DM02_CD_02_dm02cel02	 OFFLINE
	 RECO_DM02_CD_03_dm02cel02	 OFFLINE
	 RECO_DM02_CD_04_dm02cel02	 OFFLINE
	 RECO_DM02_CD_05_dm02cel02	 OFFLINE
	 RECO_DM02_CD_06_dm02cel02	 OFFLINE
	 RECO_DM02_CD_07_dm02cel02	 OFFLINE
	 RECO_DM02_CD_08_dm02cel02	 OFFLINE
	 RECO_DM02_CD_09_dm02cel02	 OFFLINE
	 RECO_DM02_CD_10_dm02cel02	 OFFLINE
	 RECO_DM02_CD_11_dm02cel02	 OFFLINE</pre>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e list griddisk attributes name, asmmodestatus
	 DATA_DM02_CD_00_dm02cel02	 SYNCING
	 DATA_DM02_CD_01_dm02cel02	 SYNCING
	 DATA_DM02_CD_02_dm02cel02	 SYNCING
	 DATA_DM02_CD_03_dm02cel02	 SYNCING
	 DATA_DM02_CD_04_dm02cel02	 SYNCING
	 DATA_DM02_CD_05_dm02cel02	 SYNCING
	 DATA_DM02_CD_06_dm02cel02	 SYNCING
	 DATA_DM02_CD_07_dm02cel02	 SYNCING
	 DATA_DM02_CD_08_dm02cel02	 SYNCING
	 DATA_DM02_CD_09_dm02cel02	 SYNCING
	 DATA_DM02_CD_10_dm02cel02	 SYNCING
	 DATA_DM02_CD_11_dm02cel02	 SYNCING
	 DBFS_DG_CD_02_dm02cel02  	 ONLINE
	 DBFS_DG_CD_03_dm02cel02  	 ONLINE
	 DBFS_DG_CD_04_dm02cel02  	 ONLINE
	 DBFS_DG_CD_05_dm02cel02  	 ONLINE
	 DBFS_DG_CD_06_dm02cel02  	 ONLINE
	 DBFS_DG_CD_07_dm02cel02  	 ONLINE
	 DBFS_DG_CD_08_dm02cel02  	 ONLINE
	 DBFS_DG_CD_09_dm02cel02  	 ONLINE
	 DBFS_DG_CD_10_dm02cel02  	 ONLINE
	 DBFS_DG_CD_11_dm02cel02  	 ONLINE
	 RECO_DM02_CD_00_dm02cel02	 SYNCING
	 RECO_DM02_CD_01_dm02cel02	 SYNCING
	 RECO_DM02_CD_02_dm02cel02	 SYNCING
	 RECO_DM02_CD_03_dm02cel02	 SYNCING
	 RECO_DM02_CD_04_dm02cel02	 SYNCING
	 RECO_DM02_CD_05_dm02cel02	 SYNCING
	 RECO_DM02_CD_06_dm02cel02	 SYNCING
	 RECO_DM02_CD_07_dm02cel02	 SYNCING
	 RECO_DM02_CD_08_dm02cel02	 SYNCING
	 RECO_DM02_CD_09_dm02cel02	 SYNCING
	 RECO_DM02_CD_10_dm02cel02	 SYNCING
	 RECO_DM02_CD_11_dm02cel02	 SYNCING</pre>





<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">NOTE: Found o/192.168.10.4/DATA_DM02_CD_00_dm02cel02 for disk DATA_DM02_CD_00_DM02CEL02
SUCCESS: disk DATA_DM02_CD_00_DM02CEL02 (12.3746554323) replaced in diskgroup DATA_DM02
..

NOTE: Found o/192.168.10.4/DATA_DM02_CD_11_dm02cel02 for disk DATA_DM02_CD_11_DM02CEL02
SUCCESS: disk DATA_DM02_CD_11_DM02CEL02 (23.3746554331) replaced in diskgroup DATA_DM02

NOTE: disk 12 (DATA_DM02_CD_00_DM02CEL02) in group 1 (DATA_DM02) is online for writes
..
NOTE: disk 23 (DATA_DM02_CD_11_DM02CEL02) in group 1 (DATA_DM02) is online for writes

NOTE: Found o/192.168.10.4/RECO_DM02_CD_00_dm02cel02 for disk RECO_DM02_CD_00_DM02CEL02
SUCCESS: disk RECO_DM02_CD_00_DM02CEL02 (12.3746554389) replaced in diskgroup RECO_DM02
..

NOTE: Found o/192.168.10.4/RECO_DM02_CD_11_dm02cel02 for disk RECO_DM02_CD_11_DM02CEL02
SUCCESS: disk RECO_DM02_CD_11_DM02CEL02 (23.3746554395) replaced in diskgroup RECO_DM02



Thu Mar 14 13:48:47 2013
NOTE: disk 12 (RECO_DM02_CD_00_DM02CEL02) in group 3 (RECO_DM02) is online for reads
..
NOTE: disk 23 (RECO_DM02_CD_11_DM02CEL02) in group 3 (RECO_DM02) is online for reads


Thu Mar 14 13:55:58 2013
NOTE: disk 12 (DATA_DM02_CD_00_DM02CEL02) in group 1 (DATA_DM02) is online for reads
..
NOTE: disk 23 (DATA_DM02_CD_11_DM02CEL02) in group 1 (DATA_DM02) is online for reads</pre>



<strong>5 after all disks status are online and check flash disk work well.</strong>


<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">CellCLI&#62; LIST METRICCURRENT WHERE objectType = &#039;FLASHCACHE&#039;
	 FC_BYKEEP_OVERWR       	 FLASHCACHE	 0.000 MB
	 FC_BYKEEP_OVERWR_SEC   	 FLASHCACHE	 0.000 MB/sec
	 FC_BYKEEP_USED         	 FLASHCACHE	 0.000 MB
	 FC_BY_USED             	 FLASHCACHE	 9,988 MB
	 FC_IO_BYKEEP_R         	 FLASHCACHE	 0.000 MB
	 FC_IO_BYKEEP_R_SEC     	 FLASHCACHE	 0.000 MB/sec
	 FC_IO_BYKEEP_W         	 FLASHCACHE	 0.000 MB
	 FC_IO_BYKEEP_W_SEC     	 FLASHCACHE	 0.000 MB/sec
	 FC_IO_BY_R             	 FLASHCACHE	 5,790 MB
	 FC_IO_BY_R_MISS        	 FLASHCACHE	 12,530 MB
	 FC_IO_BY_R_MISS_SEC    	 FLASHCACHE	 1.540 MB/sec
	 FC_IO_BY_R_SEC         	 FLASHCACHE	 5.707 MB/sec
	 FC_IO_BY_R_SKIP        	 FLASHCACHE	 120,480 MB
	 FC_IO_BY_R_SKIP_SEC    	 FLASHCACHE	 202 MB/sec
	 FC_IO_BY_W             	 FLASHCACHE	 12,110 MB
	 FC_IO_BY_W_SEC         	 FLASHCACHE	 1.415 MB/sec
	 FC_IO_ERRS             	 FLASHCACHE	 0
	 FC_IO_RQKEEP_R         	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_MISS    	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_MISS_SEC	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_R_SEC     	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_R_SKIP    	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_SKIP_SEC	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_W         	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_W_SEC     	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQ_R             	 FLASHCACHE	 579,959 IO requests
	 FC_IO_RQ_R_MISS        	 FLASHCACHE	 386,847 IO requests
	 FC_IO_RQ_R_MISS_SEC    	 FLASHCACHE	 48.2 IO/sec
	 FC_IO_RQ_R_SEC         	 FLASHCACHE	 651 IO/sec
	 FC_IO_RQ_R_SKIP        	 FLASHCACHE	 220,180 IO requests
	 FC_IO_RQ_R_SKIP_SEC    	 FLASHCACHE	 263 IO/sec
	 FC_IO_RQ_W             	 FLASHCACHE	 455,710 IO requests
	 FC_IO_RQ_W_SEC         	 FLASHCACHE	 47.6 IO/sec

CellCLI&#62; LIST METRICCURRENT WHERE objectType = &#039;FLASHLOG&#039;  
	 FL_ACTUAL_OUTLIERS           	 FLASHLOG	 0 IO requests
	 FL_BY_KEEP                   	 FLASHLOG	 0
	 FL_DISK_FIRST                	 FLASHLOG	 155,818 IO requests
	 FL_DISK_IO_ERRS              	 FLASHLOG	 0 IO requests
	 FL_EFFICIENCY_PERCENTAGE     	 FLASHLOG	 100 %
	 FL_EFFICIENCY_PERCENTAGE_HOUR	 FLASHLOG	 100 %
	 FL_FLASH_FIRST               	 FLASHLOG	 11,176 IO requests
	 FL_FLASH_IO_ERRS             	 FLASHLOG	 0 IO requests
	 FL_FLASH_ONLY_OUTLIERS       	 FLASHLOG	 0 IO requests
	 FL_IO_DB_BY_W                	 FLASHLOG	 5,106 MB
	 FL_IO_DB_BY_W_SEC            	 FLASHLOG	 0.768 MB/sec
	 FL_IO_FL_BY_W                	 FLASHLOG	 5,605 MB
	 FL_IO_FL_BY_W_SEC            	 FLASHLOG	 1.955 MB/sec
	 FL_IO_W                      	 FLASHLOG	 166,994 IO requests
	 FL_IO_W_SKIP_BUSY            	 FLASHLOG	 0 IO requests
	 FL_IO_W_SKIP_BUSY_MIN        	 FLASHLOG	 0.0 IO/sec
	 FL_IO_W_SKIP_LARGE           	 FLASHLOG	 0 IO requests
	 FL_PREVENTED_OUTLIERS        	 FLASHLOG	 0 IO requests</pre>
	 
<strong>6 When all these steps are completed proceed to the next storage server.</strong>




-----------------------------------


<strong>Update database server node.</strong>


<strong>1 after all rolling update on cell nodes do database node update one by one.</strong>


<strong>2 Shutdown and disable Oracle Clusterware.  Database instances and other</strong>
     cluster resources will be stopped in this step.

     # GRID_HOME/grid/bin/crsctl stop crs
     # GRID_HOME/grid/bin/crsctl disable crs
<strong>3 apply patch 14793859</strong>

     # cd /root/14793859
     # ./p14793859.sh
<strong>4 Activate the new firmware</strong>
  /opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits
 
 
<strong>5 Confirm the ILOM update is complete.</strong>

     # /opt/oracle.cellos/CheckHWnFWProfile -d &#124; grep -A1 ILOMVersion
     [ILOMVersion]
      3.0.16.10.d r74499

     Run the CheckHWnFWProfile utility to verify firmware profile is supported

     # /opt/oracle.cellos/CheckHWnFWProfile -c loose
     [SUCCESS] The hardware and firmware profile matches one of the supported profiles
 
  
<strong>6 Enable and startup Oracle Clusterware.</strong>

     # GRID_HOME/grid/bin/crsctl enable crs
     # GRID_HOME/grid/bin/crsctl start crs
     
<strong>7 Proceed to the next database server and end of all of firmware update.</strong>]]></description>
				<content:encoded><![CDATA[<p>ASR XD报警抛出如下错误</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">&quot;
dm01cel02: Hardware Error has been detected in the Flash Logs on the Cell Node
dm01cel02: Please open up a Service Request with Oracle to resolve the Error
dm01cel02: View File /tmp/ASR-Flash-Fault-Check-Log for further Information of the Error
dm01cel02: This log File can be copied to the Oracle Service Request for Error Reference&quot;</pre>
<p>by running sundiag we got these informations:</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">	 name:              	 dm01cel02_FLASHCACHE
	 cellDisk:          	 FD_11_dm01cel02,FD_09_dm01cel02,FD_13_dm01cel02,FD_14_dm01cel02,FD_10_dm01cel02,FD_03_dm01cel02,FD_07_dm01cel02,FD_06_dm01cel02,FD_01_dm01cel02,FD_15_dm01cel02,FD_04_dm01cel02,FD_08_dm01cel02,FD_02_dm01cel02,FD_12_dm01cel02,FD_05_dm01cel02
	 creationTime:      	 2012-06-26T17:41:47+08:00
	 degradedCelldisks: 	 FD_00_dm01cel02
	 effectiveCacheSize:	 341.953125G
	 id:                	 8141998e-5451-4ee9-bf27-f61982297ade
	 size:              	 364.75G
	 status:            	 warning  ---------------&gt;error status


	 name:              	 FLASH_1_0
	 diskType:          	 FlashDisk
	 luns:              	 1_0
	 makeModel:         	 &quot;MARVELL SD88SA02&quot;
	 physicalFirmware:  	 D20Y
	 physicalInsertTime:	 2012-05-10T02:43:53+08:00
	 physicalSize:      	 22.8880615234375G
	 slotNumber:        	 &quot;PCI Slot: 1; FDOM: 0&quot;
	 status:            	 poor performance   -------&gt;error status</pre>
<p>Reference by note 1504776.1 and step by step updating firmware.</p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel03 dev]# imageinfo 

Kernel version: 2.6.18-274.18.1.0.1.el5 #1 SMP Thu Feb 9 19:07:16 EST 2012 x86_64
Cell version: OSS_11.2.3.1.0_LINUX.X64_120304
Cell rpm version: cell-11.2.3.1.0_LINUX.X64_120304-1

Active image version: 11.2.3.1.0.120304
Active image activated: 2012-05-07 02:13:48 -0700
Active image status: success
Active system partition on device: /dev/md5
Active software partition on device: /dev/md7

In partition rollback: Impossible

Cell boot usb partition: /dev/sdm1
Cell boot usb version: 11.2.3.1.0.120304

Inactive image version: undefined
Rollback to the inactive partitions: Impossible
</pre>
<p><strong>update firmware on storage cell node</strong></p>
<p><strong>1 comfirm that griddisk status  should return no output</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e &#039;list griddisk attributes name,asmmodestatus&#039; | \
&gt;        egrep -v &#039;UNUSED|ONLINE&#039;

or check other nodes disk status 

cellcli -e &#039;list griddisk attributes name,asmmodestatus&#039; | \
       egrep -v &#039;UNUSED|ONLINE&#039;</pre>
<p><strong>2 apply path 14793859</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 14793859]# ./p14793859.sh
[INFO] Begin patch 14793859
[INFO] Resetting ILOM to ensure clean reboot. Wait 240 seconds.
[INFO] Patch has been staged.  Stop cell services, then run &#039;/opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits&#039; to activate new firmware and restart system.
[INFO] If restarting cells in a rolling manner, ensure ASMDEACTIVATIONOUTCOME=Yes for all griddisks before activating new firmware.
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# cellcli -e &#039;alter griddisk all inactive&#039;
GridDisk DATA_DM02_CD_00_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_01_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_02_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_03_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_04_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_05_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_06_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_07_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_08_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_09_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_10_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_11_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_02_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_03_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_04_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_05_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_06_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_07_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_08_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_09_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_10_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_11_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_00_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_01_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_02_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_03_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_04_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_05_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_06_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_07_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_08_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_09_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_10_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_11_dm02cel02 successfully altered
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# 
[root@dm02cel02 14793859]# cellcli -e &#039;alter cell shutdown services all&#039;

Stopping the RS, CELLSRV, and MS services...
The SHUTDOWN of services was successful.</pre>
<p><strong>3 active new firmware</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 14793859]# /opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits
SUNFlashDOM: OK
[INFO] Reset the ILOM before trying ILOM update. Wait for 240 seconds as part of the reset for ILOM to be ready.
Sent cold reset command to MC
Now updating the ILOM and the BIOS ...
[INFO] Start ILOM firmware upgrade to version 3.0.16.10.d r74499. Attempt 1 of 2.
[INFO] Generated temporary ILOM user: iu_hhyll
[INFO] Generated temporary ILOM password: ********
[INFO] ipmitool user set name 3 iu_hhyll
[INFO] ipmitool user set password 3 ********
[INFO] ipmitool sunoem cli force &quot;set /SP/users/iu_hhyll role=aucro&quot;
Connected. Use ^D to exit.
-&gt; set /SP/users/iu_hhyll role=aucro

Set &#039;role&#039; to &#039;aucro&#039;


-&gt; Session closed
Disconnected
[INFO] export IPMI_PASSWORD=********
[INFO] ipmiflash -v -I lanplus -H 10.61.1.239 -U iu_hhyll -E write /tmp/firmware/SUNBIOS force script config delaybios warning=0
[INFO] unset IPMI_PASSWORD
[INFO] ipmitool user set name 3 &quot;&quot;
Set User Name command failed (user 3, name ): Invalid data field in request

[INFO] ILOM update, ipmiflash return code 0

[INFO] ILOM will be reloaded in case of successful firmware upgrade to version 3.0.16.10.d r74499
[INFO] In this case close Sun ILOM Remote Console and corresponding Internet Exporer windows.
[INFO] Re-open both windows in few minutes.

[INFO] Waiting for the service processor to come up for 180 seconds
[INFO] ILOM firmware upgrade completed with success
Update all DOM firmware for all hbas
flash_dom -h 1 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 1.  /proc/mpt/ioc0    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 2 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 2.  /proc/mpt/ioc1    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 3 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 3.  /proc/mpt/ioc2    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

flash_dom -h 4 -d /tmp/firmware/SUNFlashDOM -b All -s

Aura Firmware Update Utility, Version 1.2.7

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved..

U.S. Government Rights - Commercial Software. Government users are subject
to the Sun Microsystems, Inc. standard license agreement and
applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Sun, Sun Microsystems, the Sun logo, Sun StorageTek and ZFS are trademarks
or registered trademarks of Sun Microsystems, Inc. or its subsidiaries,
in the U.S. and other countries.



 4.  /proc/mpt/ioc3    LSI Logic SAS1068E C0     105      011b5c00     0

Using tag SD88SA02 to identify the DOMs
36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Found four DOMs.

36.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 0

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 0
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 1

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 1
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 2

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 2
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded
36.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y

Updating Marvell firmware on Bus: 0, Target: 3

SAS1068E&#039;s links are 3.0 G, 3.0 G, 3.0 G, 3.0 G, off, off, off, off

     B___T  Type       Vendor   Product          Rev
 1.  0   0  Disk       ATA      MARVELL SD88SA02 D20Y
 2.  0   1  Disk       ATA      MARVELL SD88SA02 D20Y
 3.  0   2  Disk       ATA      MARVELL SD88SA02 D20Y
 4.  0   3  Disk       ATA      MARVELL SD88SA02 D20Y
Update to bus 0, target 3
Using mode 5
Using BufferID 0

Downloading image...
Download succeeded


Before the changes will take effect you must power down the system
After you have rebooted the OS you will need to reformat all of the 
updated DOMs.

[WARNING] The hardware and firmware are not supported. See details below

[BIOSVersion]
Requires:
 08120104 
Found:
 08080102

[BIOSDate]
Requires:
 05/08/2012 
Found:
 05/23/2011

[ILOMVersion]
Requires:
 3.0.16.10.d r74499 
Found:
 3.0.16.10 r65138

[PCISlot:HBA:LSIModel:LSIhw:MPThw:LSIfw:MPTBios:DOM:OSDevice:DOMMake:DOMModel:DOMfw:CountAuraCountDOM]
Requires:
 AllSlots AllHBAs SAS1068E B3orC0 105 011b5c00 06.26.00.00 AllDOMs NotApplicable MARVELL SD88SA02 D21Y  4_16
 
Found:
 AllSlots AllHBAs SAS1068E B3orC0 105 011b5c00 06.26.00.00 AllDOMs NotApplicable MARVELL SD88SA02 D20Y  4_16

[WARNING] The hardware and firmware are not supported. See details above
[INFO] Rebooting in 5 minutes for firmware updates to take effect ...

                                     
Cache Flush is successfully done on adapter 0.

Exit Code: 0x00
Starting ipmi drivers: [  OK  ]

Starting ipmi_watchdog driver: [  OK  ]

Starting ipmi_poweroff driver: [  OK  ]


                                     
Cache Flush is successfully done on adapter 0.

Exit Code: 0x00
[INFO] Power cycle using /tmp/firmware/SUNBIOSPowerCycle
Wait 180 seconds for the ILOM power cycle package to take effect. Then start the power down.


Broadcast message from root (pts/0) (Thu Mar 14 13:36:45 2013):




The system is going down for system halt NOW!


Connection closed by foreign host.</pre>
<p>&#8212;&#8212;&#8211;</p>
<p><strong>after reboot </strong></p>
<p><strong>1 Confirm the firmware update is complete </strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]#  cellcli -e &quot;list physicaldisk attributes name, physicalFirmware \
&gt;        where diskType = &#039;FlashDisk&#039;&quot;
	 FLASH_1_0	 D21Y
	 FLASH_1_1	 D21Y
	 FLASH_1_2	 D21Y
	 FLASH_1_3	 D21Y
	 FLASH_2_0	 D21Y
	 FLASH_2_1	 D21Y
	 FLASH_2_2	 D21Y
	 FLASH_2_3	 D21Y
	 FLASH_4_0	 D21Y
	 FLASH_4_1	 D21Y
	 FLASH_4_2	 D21Y
	 FLASH_4_3	 D21Y
	 FLASH_5_0	 D21Y
	 FLASH_5_1	 D21Y
	 FLASH_5_2	 D21Y
	 FLASH_5_3	 D21Y
[root@dm02cel02 ~]# /opt/oracle.cellos/CheckHWnFWProfile -d | grep -A1 ILOMVersion
[ILOMVersion]
 3.0.16.10.d r74499
[root@dm02cel02 ~]# /opt/oracle.cellos/CheckHWnFWProfile -c loose
[SUCCESS] The hardware and firmware profile matches one of the supported profiles</pre>
<p><strong><br />
2 active griddisks</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e &#039;alter griddisk all active&#039;
GridDisk DATA_DM02_CD_00_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_01_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_02_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_03_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_04_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_05_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_06_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_07_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_08_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_09_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_10_dm02cel02 successfully altered
GridDisk DATA_DM02_CD_11_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_02_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_03_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_04_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_05_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_06_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_07_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_08_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_09_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_10_dm02cel02 successfully altered
GridDisk DBFS_DG_CD_11_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_00_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_01_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_02_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_03_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_04_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_05_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_06_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_07_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_08_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_09_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_10_dm02cel02 successfully altered
GridDisk RECO_DM02_CD_11_dm02cel02 successfully altered
</pre>
<p><strong>3 Recreate the CELLBOOT USB</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# /opt/oracle.cellos/make_cellboot_usb.sh -execute -force
Candidate for the Oracle Exadata Cell start up boot device     : /dev/sdm
Partition on candidate device                                  : /dev/sdm1
The current product version                                    : 11.2.3.1.0.120304
Label of the current Oracle Exadata Cell start up boot device  : CELLBOOT
The current CELLBOOT USB product version                       : 11.2.3.1.0.120304
[DEBUG] set_cell_boot_usb: cell usb        : /dev/sdm
[DEBUG] set_cell_boot_usb: mnt sys         : /
[DEBUG] set_cell_boot_usb: preserve        : preserve
[DEBUG] set_cell_boot_usb: mnt usb         : /mnt/usb.make.cellboot
[DEBUG] set_cell_boot_usb: lock            : /tmp/usb.make.cellboot.lock
[DEBUG] set_cell_boot_usb: serial console  : 
[DEBUG] set_cell_boot_usb: kernel mode     : kernel
[DEBUG] set_cell_boot_usb: mnt iso save    : 
Create CELLBOOT USB on device /dev/sdm

The number of cylinders for this disk is set to 2825.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won&#039;t be recoverable.


The number of cylinders for this disk is set to 2825.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-2825, default 1): Last cylinder or +size or +sizeM or +sizeK (1-2825, default 2825): 
Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
489600 inodes, 978513 blocks
48925 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1002438656
30 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
//opt/oracle.cellos/iso ~
Copying ./imgboot.lst to /mnt/usb.make.cellboot/. ...
...

Copying ./imgboot.lst.14793859 to /mnt/usb.make.cellboot/. ...
Copying ./initrd.img.14793859 to /mnt/usb.make.cellboot/. ...
Running &quot;tar -x -j -p -v -C /mnt/usb.make.cellboot -f //opt/oracle.cellos/iso/cellbits/cellboot.tbz initrd-*.img vmlinuz-* grub/&quot; ...
grub/
grub/xfs_stage1_5
grub/vstafs_stage1_5
grub/menu.lst
grub/e2fs_stage1_5
grub/grub.conf
grub/oracle.xpm.gz
grub/device.map
grub/stage1
grub/jfs_stage1_5
grub/reiserfs_stage1_5
grub/minix_stage1_5
grub/ufs2_stage1_5
grub/stage2
grub/iso9660_stage1_5
grub/fat_stage1_5
grub/ffs_stage1_5
initrd-2.6.18-194.3.1.0.2.el5.img
vmlinuz-2.6.18-194.3.1.0.2.el5
Copying //opt/oracle.cellos/tmpl/oracle.xpm.gz to /mnt/usb.make.cellboot/grub/oracle.xpm.gz ...
[DEBUG] set_grub_conf_n_initrd: mnt sys        : /
[DEBUG] set_grub_conf_n_initrd: grub template  : USB_grub.in
[DEBUG] set_grub_conf_n_initrd: boot dir       : /mnt/usb.make.cellboot
[DEBUG] set_grub_conf_n_initrd: kernel param   : 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: marker         : I_am_CELLBOOT_usb
[DEBUG] set_grub_conf_n_initrd: mode           : 
[DEBUG] set_grub_conf_n_initrd: Image id file: //opt/oracle.cellos/image.id
[DEBUG] set_grub_conf_n_initrd: System device where image id exists: /dev/md5
[DEBUG] set_grub_conf_n_initrd: Kernel version: 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: System device with image_id (/dev/md5) and kernel version (2.6.18-274.18.1.0.1.el5) are in sync
[DEBUG] set_grub_conf_n_initrd: Full kernel version: 2.6.18-274.18.1.0.1.el5
[DEBUG] set_grub_conf_n_initrd: system device for the next boot: /dev/md5
[DEBUG] set_grub_conf_n_initrd: initrd for the next boot: /mnt/usb.make.cellboot/initrd-2.6.18-274.18.1.0.1.el5.img
[INFO] set_grub_conf_n_initrd: Set /dev/md5 in /mnt/usb.make.cellboot/I_am_CELLBOOT_usb
[INFO] Set kernel 2.6.18-274.18.1.0.1.el5 and system device /dev/md5 in generated /mnt/usb.make.cellboot/grub/grub.conf
[INFO] Set /dev/md5 in /mnt/usb.make.cellboot/initrd-2.6.18-274.18.1.0.1.el5.img
43450 blocks
log/
log/do_image.sh.log
log/cellos.11.2.3.1.0.120304.20120507.021428.PDT.tar.gz
log/cellos.11.2.3.1.0.120304.20120507.032629.EDT.tar.gz


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub&gt; root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub&gt; setup (hd0)
 Checking if &quot;/boot/grub/stage1&quot; exists... no
 Checking if &quot;/grub/stage1&quot; exists... yes
 Checking if &quot;/grub/stage2&quot; exists... yes
 Checking if &quot;/grub/e2fs_stage1_5&quot; exists... yes
 Running &quot;embed /grub/e2fs_stage1_5 (hd0)&quot;...  16 sectors are embedded.
succeeded
 Running &quot;install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf&quot;... succeeded
Done.</pre>
<p><strong><br />
4 checking ASM disk recover status </strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">
[root@dm02cel02 ~]# cellcli -e list griddisk attributes name, asmmodestatus
	 DATA_DM02_CD_00_dm02cel02	 SYNCING  ---&gt; recovering
	 DATA_DM02_CD_01_dm02cel02	 SYNCING
	 DATA_DM02_CD_02_dm02cel02	 SYNCING
	 DATA_DM02_CD_03_dm02cel02	 SYNCING
	 DATA_DM02_CD_04_dm02cel02	 SYNCING
	 DATA_DM02_CD_05_dm02cel02	 SYNCING
	 DATA_DM02_CD_06_dm02cel02	 SYNCING
	 DATA_DM02_CD_07_dm02cel02	 SYNCING
	 DATA_DM02_CD_08_dm02cel02	 SYNCING
	 DATA_DM02_CD_09_dm02cel02	 SYNCING
	 DATA_DM02_CD_10_dm02cel02	 SYNCING
	 DATA_DM02_CD_11_dm02cel02	 SYNCING
	 DBFS_DG_CD_02_dm02cel02  	 ONLINE   ---&gt; complete
	 DBFS_DG_CD_03_dm02cel02  	 ONLINE
	 DBFS_DG_CD_04_dm02cel02  	 ONLINE
	 DBFS_DG_CD_05_dm02cel02  	 ONLINE
	 DBFS_DG_CD_06_dm02cel02  	 ONLINE
	 DBFS_DG_CD_07_dm02cel02  	 ONLINE
	 DBFS_DG_CD_08_dm02cel02  	 ONLINE
	 DBFS_DG_CD_09_dm02cel02  	 ONLINE
	 DBFS_DG_CD_10_dm02cel02  	 ONLINE
	 DBFS_DG_CD_11_dm02cel02  	 ONLINE
	 RECO_DM02_CD_00_dm02cel02	 OFFLINE  ---&gt; not start recovering
	 RECO_DM02_CD_01_dm02cel02	 OFFLINE
	 RECO_DM02_CD_02_dm02cel02	 OFFLINE
	 RECO_DM02_CD_03_dm02cel02	 OFFLINE
	 RECO_DM02_CD_04_dm02cel02	 OFFLINE
	 RECO_DM02_CD_05_dm02cel02	 OFFLINE
	 RECO_DM02_CD_06_dm02cel02	 OFFLINE
	 RECO_DM02_CD_07_dm02cel02	 OFFLINE
	 RECO_DM02_CD_08_dm02cel02	 OFFLINE
	 RECO_DM02_CD_09_dm02cel02	 OFFLINE
	 RECO_DM02_CD_10_dm02cel02	 OFFLINE
	 RECO_DM02_CD_11_dm02cel02	 OFFLINE</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">[root@dm02cel02 ~]# cellcli -e list griddisk attributes name, asmmodestatus
	 DATA_DM02_CD_00_dm02cel02	 SYNCING
	 DATA_DM02_CD_01_dm02cel02	 SYNCING
	 DATA_DM02_CD_02_dm02cel02	 SYNCING
	 DATA_DM02_CD_03_dm02cel02	 SYNCING
	 DATA_DM02_CD_04_dm02cel02	 SYNCING
	 DATA_DM02_CD_05_dm02cel02	 SYNCING
	 DATA_DM02_CD_06_dm02cel02	 SYNCING
	 DATA_DM02_CD_07_dm02cel02	 SYNCING
	 DATA_DM02_CD_08_dm02cel02	 SYNCING
	 DATA_DM02_CD_09_dm02cel02	 SYNCING
	 DATA_DM02_CD_10_dm02cel02	 SYNCING
	 DATA_DM02_CD_11_dm02cel02	 SYNCING
	 DBFS_DG_CD_02_dm02cel02  	 ONLINE
	 DBFS_DG_CD_03_dm02cel02  	 ONLINE
	 DBFS_DG_CD_04_dm02cel02  	 ONLINE
	 DBFS_DG_CD_05_dm02cel02  	 ONLINE
	 DBFS_DG_CD_06_dm02cel02  	 ONLINE
	 DBFS_DG_CD_07_dm02cel02  	 ONLINE
	 DBFS_DG_CD_08_dm02cel02  	 ONLINE
	 DBFS_DG_CD_09_dm02cel02  	 ONLINE
	 DBFS_DG_CD_10_dm02cel02  	 ONLINE
	 DBFS_DG_CD_11_dm02cel02  	 ONLINE
	 RECO_DM02_CD_00_dm02cel02	 SYNCING
	 RECO_DM02_CD_01_dm02cel02	 SYNCING
	 RECO_DM02_CD_02_dm02cel02	 SYNCING
	 RECO_DM02_CD_03_dm02cel02	 SYNCING
	 RECO_DM02_CD_04_dm02cel02	 SYNCING
	 RECO_DM02_CD_05_dm02cel02	 SYNCING
	 RECO_DM02_CD_06_dm02cel02	 SYNCING
	 RECO_DM02_CD_07_dm02cel02	 SYNCING
	 RECO_DM02_CD_08_dm02cel02	 SYNCING
	 RECO_DM02_CD_09_dm02cel02	 SYNCING
	 RECO_DM02_CD_10_dm02cel02	 SYNCING
	 RECO_DM02_CD_11_dm02cel02	 SYNCING</pre>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">NOTE: Found o/192.168.10.4/DATA_DM02_CD_00_dm02cel02 for disk DATA_DM02_CD_00_DM02CEL02
SUCCESS: disk DATA_DM02_CD_00_DM02CEL02 (12.3746554323) replaced in diskgroup DATA_DM02
..

NOTE: Found o/192.168.10.4/DATA_DM02_CD_11_dm02cel02 for disk DATA_DM02_CD_11_DM02CEL02
SUCCESS: disk DATA_DM02_CD_11_DM02CEL02 (23.3746554331) replaced in diskgroup DATA_DM02

NOTE: disk 12 (DATA_DM02_CD_00_DM02CEL02) in group 1 (DATA_DM02) is online for writes
..
NOTE: disk 23 (DATA_DM02_CD_11_DM02CEL02) in group 1 (DATA_DM02) is online for writes

NOTE: Found o/192.168.10.4/RECO_DM02_CD_00_dm02cel02 for disk RECO_DM02_CD_00_DM02CEL02
SUCCESS: disk RECO_DM02_CD_00_DM02CEL02 (12.3746554389) replaced in diskgroup RECO_DM02
..

NOTE: Found o/192.168.10.4/RECO_DM02_CD_11_dm02cel02 for disk RECO_DM02_CD_11_DM02CEL02
SUCCESS: disk RECO_DM02_CD_11_DM02CEL02 (23.3746554395) replaced in diskgroup RECO_DM02



Thu Mar 14 13:48:47 2013
NOTE: disk 12 (RECO_DM02_CD_00_DM02CEL02) in group 3 (RECO_DM02) is online for reads
..
NOTE: disk 23 (RECO_DM02_CD_11_DM02CEL02) in group 3 (RECO_DM02) is online for reads


Thu Mar 14 13:55:58 2013
NOTE: disk 12 (DATA_DM02_CD_00_DM02CEL02) in group 1 (DATA_DM02) is online for reads
..
NOTE: disk 23 (DATA_DM02_CD_11_DM02CEL02) in group 1 (DATA_DM02) is online for reads</pre>
<p><strong>5 after all disks status are online and check flash disk work well.</strong></p>
<pre class="brush: text; gutter: false; first-line: 1; highlight: []; html-script: false">CellCLI&gt; LIST METRICCURRENT WHERE objectType = &#039;FLASHCACHE&#039;
	 FC_BYKEEP_OVERWR       	 FLASHCACHE	 0.000 MB
	 FC_BYKEEP_OVERWR_SEC   	 FLASHCACHE	 0.000 MB/sec
	 FC_BYKEEP_USED         	 FLASHCACHE	 0.000 MB
	 FC_BY_USED             	 FLASHCACHE	 9,988 MB
	 FC_IO_BYKEEP_R         	 FLASHCACHE	 0.000 MB
	 FC_IO_BYKEEP_R_SEC     	 FLASHCACHE	 0.000 MB/sec
	 FC_IO_BYKEEP_W         	 FLASHCACHE	 0.000 MB
	 FC_IO_BYKEEP_W_SEC     	 FLASHCACHE	 0.000 MB/sec
	 FC_IO_BY_R             	 FLASHCACHE	 5,790 MB
	 FC_IO_BY_R_MISS        	 FLASHCACHE	 12,530 MB
	 FC_IO_BY_R_MISS_SEC    	 FLASHCACHE	 1.540 MB/sec
	 FC_IO_BY_R_SEC         	 FLASHCACHE	 5.707 MB/sec
	 FC_IO_BY_R_SKIP        	 FLASHCACHE	 120,480 MB
	 FC_IO_BY_R_SKIP_SEC    	 FLASHCACHE	 202 MB/sec
	 FC_IO_BY_W             	 FLASHCACHE	 12,110 MB
	 FC_IO_BY_W_SEC         	 FLASHCACHE	 1.415 MB/sec
	 FC_IO_ERRS             	 FLASHCACHE	 0
	 FC_IO_RQKEEP_R         	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_MISS    	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_MISS_SEC	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_R_SEC     	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_R_SKIP    	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_R_SKIP_SEC	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQKEEP_W         	 FLASHCACHE	 0 IO requests
	 FC_IO_RQKEEP_W_SEC     	 FLASHCACHE	 0.0 IO/sec
	 FC_IO_RQ_R             	 FLASHCACHE	 579,959 IO requests
	 FC_IO_RQ_R_MISS        	 FLASHCACHE	 386,847 IO requests
	 FC_IO_RQ_R_MISS_SEC    	 FLASHCACHE	 48.2 IO/sec
	 FC_IO_RQ_R_SEC         	 FLASHCACHE	 651 IO/sec
	 FC_IO_RQ_R_SKIP        	 FLASHCACHE	 220,180 IO requests
	 FC_IO_RQ_R_SKIP_SEC    	 FLASHCACHE	 263 IO/sec
	 FC_IO_RQ_W             	 FLASHCACHE	 455,710 IO requests
	 FC_IO_RQ_W_SEC         	 FLASHCACHE	 47.6 IO/sec

CellCLI&gt; LIST METRICCURRENT WHERE objectType = &#039;FLASHLOG&#039;  
	 FL_ACTUAL_OUTLIERS           	 FLASHLOG	 0 IO requests
	 FL_BY_KEEP                   	 FLASHLOG	 0
	 FL_DISK_FIRST                	 FLASHLOG	 155,818 IO requests
	 FL_DISK_IO_ERRS              	 FLASHLOG	 0 IO requests
	 FL_EFFICIENCY_PERCENTAGE     	 FLASHLOG	 100 %
	 FL_EFFICIENCY_PERCENTAGE_HOUR	 FLASHLOG	 100 %
	 FL_FLASH_FIRST               	 FLASHLOG	 11,176 IO requests
	 FL_FLASH_IO_ERRS             	 FLASHLOG	 0 IO requests
	 FL_FLASH_ONLY_OUTLIERS       	 FLASHLOG	 0 IO requests
	 FL_IO_DB_BY_W                	 FLASHLOG	 5,106 MB
	 FL_IO_DB_BY_W_SEC            	 FLASHLOG	 0.768 MB/sec
	 FL_IO_FL_BY_W                	 FLASHLOG	 5,605 MB
	 FL_IO_FL_BY_W_SEC            	 FLASHLOG	 1.955 MB/sec
	 FL_IO_W                      	 FLASHLOG	 166,994 IO requests
	 FL_IO_W_SKIP_BUSY            	 FLASHLOG	 0 IO requests
	 FL_IO_W_SKIP_BUSY_MIN        	 FLASHLOG	 0.0 IO/sec
	 FL_IO_W_SKIP_LARGE           	 FLASHLOG	 0 IO requests
	 FL_PREVENTED_OUTLIERS        	 FLASHLOG	 0 IO requests</pre>
<p><strong>6 When all these steps are completed proceed to the next storage server.</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Update database server node.</strong></p>
<p><strong>1 after all rolling update on cell nodes do database node update one by one.</strong></p>
<p><strong>2 Shutdown and disable Oracle Clusterware.  Database instances and other</strong><br />
     cluster resources will be stopped in this step.</p>
<p>     # GRID_HOME/grid/bin/crsctl stop crs<br />
     # GRID_HOME/grid/bin/crsctl disable crs<br />
<strong>3 apply patch 14793859</strong></p>
<p>     # cd /root/14793859<br />
     # ./p14793859.sh<br />
<strong>4 Activate the new firmware</strong><br />
  /opt/oracle.cellos/CheckHWnFWProfile -U /opt/oracle.cellos/iso/cellbits</p>
<p><strong>5 Confirm the ILOM update is complete.</strong></p>
<p>     # /opt/oracle.cellos/CheckHWnFWProfile -d | grep -A1 ILOMVersion<br />
     [ILOMVersion]<br />
      3.0.16.10.d r74499</p>
<p>     Run the CheckHWnFWProfile utility to verify firmware profile is supported</p>
<p>     # /opt/oracle.cellos/CheckHWnFWProfile -c loose<br />
     [SUCCESS] The hardware and firmware profile matches one of the supported profiles</p>
<p><strong>6 Enable and startup Oracle Clusterware.</strong></p>
<p>     # GRID_HOME/grid/bin/crsctl enable crs<br />
     # GRID_HOME/grid/bin/crsctl start crs</p>
<p><strong>7 Proceed to the next database server and end of all of firmware update.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vmcd.org/2013/03/update-exadata-flash-disk-firmware-due-to-poor-performance-on-x2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
