<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Passion for technology</title>
	<atom:link href="http://oramasters.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oramasters.com</link>
	<description>Challenging the challenges over a decade. Place for Oracle DBAs, Oracle Apps DBAs, Unix Administrators and Developers</description>
	<lastBuildDate>Wed, 18 Jan 2012 13:22:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='oramasters.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Passion for technology</title>
		<link>http://oramasters.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oramasters.com/osd.xml" title="Passion for technology" />
	<atom:link rel='hub' href='http://oramasters.com/?pushpress=hub'/>
		<item>
		<title>ASM Part-1</title>
		<link>http://oramasters.com/2012/01/14/asm-part-1/</link>
		<comments>http://oramasters.com/2012/01/14/asm-part-1/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 09:03:51 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[ASM]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=395</guid>
		<description><![CDATA[Summary of ASMCMD command SMASIN SCOPE=1 [oracle@rhas4 ~]$ export ORACLE_SID=+ASM [oracle@rhas4 ~]$ asmcmd ASMCMD&#62; help 1         cd 2         cp 3         du 4         find 5         ls 6         lsct 7         lsdg 8         mkalias 9         mkdir 10         pwd 11         rm 12         rmalias 13         lsdsk 14 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=395&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table width="980" border="0" cellspacing="0" cellpadding="0">
<col width="64" />
<col width="149" />
<col width="703" />
<col width="64" />
<tbody>
<tr>
<td colspan="3" width="916" height="20"><strong>Summary of ASMCMD command</strong></td>
<td width="64"></td>
</tr>
<tr>
<td height="20"></td>
<td><strong><span style="color:#00ff00;">SMASIN SCOPE=1</span></strong></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td colspan="3" width="916">[oracle@rhas4 ~]$ export ORACLE_SID=+ASM</td>
</tr>
<tr>
<td height="20"></td>
<td colspan="2" width="852">[oracle@rhas4 ~]$ asmcmd</td>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td width="149">ASMCMD&gt; help</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">1</td>
<td width="149">        cd</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">2</td>
<td width="149">        cp</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">3</td>
<td width="149">        du</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">4</td>
<td width="149">        find</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">5</td>
<td width="149">        ls</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">6</td>
<td width="149">        lsct</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">7</td>
<td width="149">        lsdg</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">8</td>
<td width="149">        mkalias</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">9</td>
<td width="149">        mkdir</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">10</td>
<td width="149">        pwd</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">11</td>
<td width="149">        rm</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">12</td>
<td width="149">        rmalias</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">13</td>
<td width="149">        lsdsk</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">14</td>
<td width="149">        remap</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">15</td>
<td width="149">        md_backup</td>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" height="20">16</td>
<td width="149">        md_restore</td>
<td colspan="2">md_backup and md_restore can be used to dump the metadata of ASM disk groups into a flat file and can use this backup to restore the metadata in case the diskgroup needs to be rebuild.</td>
</tr>
</tbody>
</table>
<p><span style="font-size:small;"><span style="line-height:normal;">&#8220;[contact-form] </span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=395&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2012/01/14/asm-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://oramasters.com/2012/01/05/385/</link>
		<comments>http://oramasters.com/2012/01/05/385/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 17:10:22 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=385</guid>
		<description><![CDATA[=========== Small script: It will delete the audit files older than 90 days. =========== [oracle@LONDT778W-D4 ~]$ cat test_aud_del.sh #!/usr/bin/ksh ORACLE_SID=SANJAY export ORACLE_SID ORACLE_HOME=/sanjay/sw/oracle/database/11.2.0.2 export ORACLE_HOME LOGFILE=&#8221;/tmp/delete_old_aud.log&#8221; echo `date` &#62;&#62;$LOGFILE if [ $ORACLE_SID = "SANJAY" ] &#62;&#62;$LOGFILE then echo &#8220;Deleting the audit files older than 90 days for database `echo $ORACLE_SID`&#8221; &#62;&#62;$LOGFILE echo &#8220;Audit files older [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=385&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>===========<br />
<strong>Small script: It will delete the audit files older than 90 days.</strong><br />
===========</p>
<p>[oracle@LONDT778W-D4 ~]$ cat test_aud_del.sh<br />
#!/usr/bin/ksh</p>
<p>ORACLE_SID=SANJAY<br />
export ORACLE_SID<br />
ORACLE_HOME=/sanjay/sw/oracle/database/11.2.0.2<br />
export ORACLE_HOME</p>
<p>LOGFILE=&#8221;/tmp/delete_old_aud.log&#8221;</p>
<p> echo `date` &gt;&gt;$LOGFILE<br />
if  [ $ORACLE_SID = "SANJAY" ]  &gt;&gt;$LOGFILE<br />
then</p>
<p> echo &#8220;Deleting the audit files older than 90 days for database `echo $ORACLE_SID`&#8221; &gt;&gt;$LOGFILE</p>
<p> echo &#8220;Audit files older than 90 days are: `find /sanjay/sw/oracle/database/admin/SANJAY/adump/*.aud -type f -mtime +90| wc -l`&#8221; &gt;&gt;$LOGFILE</p>
<p>find /sanjay/sw/oracle/database/admin/SANJAY/adump/*.aud -type f -mtime +90 -ls -exec rm {} \;</p>
<p> echo &#8220;Space usage at this moment is:<br />
`df -h /sanjay/sw/oracle/`&#8221; &gt;&gt;$LOGFILE<br />
else<br />
echo &#8220;Environment is not set properly&#8221; &gt;&gt;$LOGFILE</p>
<p>fi<br />
exit</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=385&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2012/01/05/385/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix Script Part-1</title>
		<link>http://oramasters.com/2011/12/13/unix-script-part-1/</link>
		<comments>http://oramasters.com/2011/12/13/unix-script-part-1/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 22:59:31 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=364</guid>
		<description><![CDATA[How to create a shell script in unix. open a file in vi editor and save it with .sh extention to run in backgrougn use nohup sh filename.sh &#38; to see the job status $jobs ( it will show runing or done etc) to bring/send in forward/background. ctrl+z fg ctrl +z bg below is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=364&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>How to create a shell script in unix.</strong></p>
<p>open a file in vi editor and save it with .sh extention<br />
to run in backgrougn use nohup sh filename.sh &amp;<br />
to see the job status $jobs ( it will show runing or done etc)<br />
to bring/send in forward/background. ctrl+z fg ctrl +z bg</p>
<p><strong>below is a very simple example to start shell script.<br />
</strong><br />
&#8220;SHELL=/bin/ksh<br />
export SHELL<br />
export ORACLE_SID=instance_name<br />
export ORACLE_HOME=/oraclehome ( can try $ORACLE_HOME also).<br />
export ORACLE_BASE=/oraclebase<br />
sqlplus /nolog &lt;<br />
connect username/password@instance_name<br />
write full command here ;<br />
exit ;</p>
<p><strong>For example if you want to delete files older than 30 days.</strong></p>
<p>find /u1/database/prod/udump/ -type f -mtime +30 -exec rm {} \;</p>
<p>Or as bash script:<br />
Code:<br />
#!/bin/bash</p>
<p>find /u1/database/prod/arch -type f -mtime +30 -exec rm {} \;<br />
The only 2 commands used are find and rm.</p>
<p>Find looks for files older then 30 days (-type f -mtime +30). All its findings are given to rm (-exec rm {} \; ).</p>
<p>You can place the rm statement outside of find, which is supposed to be faster:</p>
<p>find /u1/database/prod/arch -type f -mtime +3 | xargs rm</p>
<p><strong>Now you can crontab it to remove old files (more than 30 days) in a script.</strong></p>
<p>&#8220;[contact-form]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/364/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=364&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/12/13/unix-script-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix Command building</title>
		<link>http://oramasters.com/2011/12/13/unix-command-building/</link>
		<comments>http://oramasters.com/2011/12/13/unix-command-building/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 22:51:12 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=360</guid>
		<description><![CDATA[&#62;ps –ef&#124;grep “ora_”&#124;grep –v grep&#124;grep $ORACLE_SID&#124;awk ‘{print $2}’&#124;xargs kill –9 We ‘ll walk through the process of building the command. To begin, we want to get a list of active processes on the server. We can do that using the following command: &#62;ps –ef If we execute ps –ef on our server, we’ ll see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=360&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&gt;ps –ef|grep “ora_”|grep –v grep|grep $ORACLE_SID|awk ‘{print $2}’|xargs kill –9											</p>
<p>We ‘ll walk through the process of building the command. To begin, we want to get a list of active processes on the server. We can do that using the following command:											</p>
<p>&gt;ps –ef											</p>
<p>If we execute ps –ef on our server, we’ ll see a long list of processes &#8211;  both for Oracle and for many other things. However, we want to limit your output to only those processes that are related to the Oracle Database. The grep command can be used to do this. Oracle background process names always begin with “ora_”, so piping the output of ps –ef through grep “ora_” will remove all but the Oracle background processes. For example:											</p>
<p>&gt;ps –ef |grep “ora_”<br />
	oracle	12011	1	0	06-Dec	…	ora_dbwr_JAP<br />
	oracle	12789	20202	0	12:10:55	00:00	grep ora_<br />
	oracle	13202	1	0	06-Dec	…	ora_smon_JAP<br />
	oracle	14983	1	0	06-Dec	…	ora_arch_JAP<br />
	oracle	10209	1	0	06-Dec	…	ora_pmon_JAP<br />
	oracle	2090	1	0	06-Dec	…	ora_reco_JAP<br />
	oracle	10404	1	0	06-Dec	…	ora_lgwr_JAP<br />
	oracle	10403	1	0	06-Dec	…	ora_dbwr_TEST<br />
	oracle	10401	1	0	06-Dec	…	ora_lgwr_TEST				</p>
<p>In the above output as we can see it includes the process that’s running grep command. Pipe this output through grep –v grep to remove the grep command, so you don’t kill your own process. T											</p>
<p>&gt;ps –ef |grep “ora_”|grep –v grep<br />
	oracle	12011	1	0	06-Dec	…	ora_dbwr_JAP<br />
	oracle	13202	1	0	06-Dec	…	ora_smon_JAP<br />
	oracle	14983	1	0	06-Dec	…	ora_arch_JAP<br />
	oracle	10209	1	0	06-Dec	…	ora_pmon_JAP<br />
	oracle	2090	1	0	06-Dec	…	ora_reco_JAP<br />
	oracle	10404	1	0	06-Dec	…	ora_lgwr_JAP<br />
	oracle	10403	1	0	06-Dec	…	ora_dbwr_TEST<br />
	oracle	10401	1	0	06-Dec	…	ora_lgwr_TEST				</p>
<p>Next, we should filter out all processes except those for the current ORACLE_SID. That way we delete the background processes only for that one instance instead of for all instances (if there are multiple database instance running). Do that by grepping for the SID name:											</p>
<p>&gt;ps –ef |grep “ora_”|grep –v grep|grep $ORACLE_SID<br />
	oracle	12011	1	0	06-Dec	…	ora_dbwr_JAP<br />
	oracle	13202	1	0	06-Dec	…	ora_smon_JAP<br />
	oracle	14983	1	0	06-Dec	…	ora_arch_JAP<br />
	oracle	10209	1	0	06-Dec	…	ora_pmon_JAP<br />
	oracle	2090	1	0	06-Dec	…	ora_reco_JAP<br />
	oracle	10404	1	0	06-Dec	…	ora_lgwr_JAP				</p>
<p>Now that we have an accurate list of processes that you want to kill, you can use the awk command to get the process ID (PID) for each of these processes. The PID is in the second column, so we will use the awk ‘{print $2}’ command to display only that column:											</p>
<p>&gt;ps –ef |grep “ora_”|grep –v grep|grep $ORACLE_SID|awk ‘{print $2}’<br />
12011<br />
13202<br />
14983<br />
10209<br />
2090<br />
10404											</p>
<p>Now we have a list of process Id numbers for the Oracle background processes. For the last step, we use the xargs command to pipe the list of PIDs to the kill command. For example:											</p>
<p>&gt;ps –ef |grep “ora_”|grep –v grep|grep $ORACLE_SID|awk ‘{print $2}’|xargs kill –9<br />
Now that we’ve created this compound command, we can assign it to a Unix alias or we can put it in a file and make it a shell script so that we can execute it with a single short command.											</p>
<p>===================<br />
Find command usage:<br />
===================</p>
<p>The Simplest Example<br />
To print the names of all of the files in the directory and all subdirectories<br />
find . -print<br />
find ~ ~barnett /usr/local -print<br />
find ~ ~barnett /usr/local -print<br />
find / -print</p>
<p><strong>Using find with other commands</strong></p>
<p>ls -ld `find . -print`</p>
<p><strong>Using xargs with find</strong></p>
<p>ls -ld `find / -print`</p>
<p>find / -print | xargs ls -ld</p>
<p><strong>Looking for files with particular names<br />
</strong></p>
<p>find . -name *.o -print<br />
find . -name &#8216;*.o&#8217; -print<br />
find . -name &#8216;[a-zA-Z]*.o&#8217; -print</p>
<p><strong>Looking for files by type</strong></p>
<p>find . -type f -print | xargs ls -l</p>
<p>find . -type l -print | xargs ls -ld | awk &#8216;{print $10}&#8217;</p>
<p><strong>Looking for files by sizes</strong></p>
<p>find . -size 27 -print</p>
<p>find . -size +10000c -size -32000c -print</p>
<p><strong>Searching for old files</strong></p>
<p>find . -mtime 7 -print</p>
<p>find . -mtime +6 -mtime -8 -print</p>
<p>find . -type f -atime +30 -print</p>
<p><strong>Searching for files by permission</strong></p>
<p>find . -name *.o -perm 664 -print</p>
<p>find . -type d -perm 777 -print</p>
<p>find . -perm -20 -print</p>
<p>find . -perm -100 -print</p>
<p><strong>Owners and groups<br />
</strong></p>
<p>find . -user root -perm -4000 -print</p>
<p>find . -group staff -perm -2000 -print</p>
<p>find . -user 0 -perm -4000 -print<br />
find . -group 10 -perm -2000 -print</p>
<p><strong>Find and commands</strong></p>
<p>find . -ls</p>
<p>find . -print | xargs ls -gilds</p>
<p><strong>Find and Cpio</strong></p>
<p>find . -depth -cpio &gt;/dev/rmt0<br />
find . -depth -ncpio &gt;/dev/rmt0<br />
find . -depth -print | cpio -oB &gt;/dev/rmt0<br />
find . -depth -print | cpio -ocB &gt;/dev/rmt0</p>
<p><strong>Using Find to Execute Commands</strong></p>
<p>find . -exec echo {} ;</p>
<p>find . -exec echo {} &#8216;;&#8217;</p>
<p>find `pwd` -group staff -exec find {} -type l -print ;</p>
<p>find . -perm -20 -exec chmod g-w {} ;</p>
<p>or<br />
find . -perm -20 -print | xargs chmod g-w</p>
<p>find . -inum 31246 -exec rm [] &#8216;;&#8217;</p>
<p><strong>File comparisons</strong></p>
<p>find /usr -newer /usr/FirstFile -print</p>
<p><strong>Expressions</strong></p>
<p>find /usr ! -newer /FirstFile -print<br />
&#8220;find . ( -name a.out -o -name *.o ) -print<br />
&#8220;</p>
<p><strong>Keeping find from going too far</strong></p>
<p>find * -type f -print -o -type d -prune</p>
<p>find . -print -o -name SCCS -prune</p>
<p>&#8220;[contact-form] </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=360&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/12/13/unix-command-building/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>RMAN Part-2</title>
		<link>http://oramasters.com/2011/12/03/rman-part-2/</link>
		<comments>http://oramasters.com/2011/12/03/rman-part-2/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 19:09:32 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Backup and Recovery]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=356</guid>
		<description><![CDATA[======== Rman can back up the following types of files: ========= • Archived redo log files • Backup pieces • Control files • Datafiles Spfile • spfile. Note: It is ABCDS RMAN will back up full backups, incremental backups, control file autobackups, and archive redo log files. Keep in mind that flashback logs, online redo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=356&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>========<br />
<strong>Rman can back up the following types of files:</strong><br />
=========</p>
<p>• Archived redo log files<br />
• Backup pieces<br />
• Control files<br />
• Datafiles Spfile<br />
• spfile.</p>
<p>Note: It is ABCDS</p>
<p>RMAN will back up full backups, incremental backups, control file autobackups, and archive redo<br />
log files. Keep in mind that flashback logs, online redo log files, and the current control file are not backed up.</p>
<p>Note:  Always enable the autobackup for spfile (only backed up if db starting using spfile) and control file feature.<br />
=====</p>
<p>RMAN&gt; configure controlfile autobackup on;</p>
<p>RMAN&gt; configure spfile autobackup on;</p>
<p>========</p>
<p>How to configure RMAN to write to specific locations on disk.</p>
<p>RMAN&gt; configure channel 1 device type disk format &#8216;/ora01/rman/rman1_%U.bk&#8217;;</p>
<p>Note: CONFIGURE command must be executed before you run the BACKUP command.</p>
<p>=========<br />
<strong>Backup Database.</strong><br />
=========</p>
<p>The term &#8220;RMAN level 0 incremental backup&#8221; doesn&#8217;t exactly describe itself very well, either. A level<br />
0 incremental backup is backing up the exact same blocks as a full backup. In other words, the following<br />
two commands back up the exact same blocks in a database:</p>
<p>RMAN&gt; backup as backupset full database;</p>
<p>RMAN&gt; backup as backupset incremental level=0 database;</p>
<p>RMAN&gt; backup database not backed up since time=&#8217;sysdate-1&#8242;;</p>
<p>RMAN&gt; backup database skip readonly skip offline skip inaccessible;  backup database skip offline;</p>
<p>RMAN&gt; backup database skip readonly;</p>
<p>RMAN&gt; backup database skip inaccessible;</p>
<p>&#8212;&#8212;&#8212;&#8212;-</p>
<p>Backup Sets versus Image Copies</p>
<p>The default backup mode of RMAN instructs it to only back up blocks that have been used in a datafile;<br />
these are known as backup sets. RMAN can also make byte-for-byte copies of the datafiles; these are<br />
known as image copies. Creating a backup set is the default type of backup that RMAN creates. The next<br />
command creates a backup set backup of the database:</p>
<p>RMAN&gt; backup database;   backup as backupset database;</p>
<p>You can instruct RMAN to create image copies by using the AS COPY command. The following<br />
creates image copies of every datafile in the database:</p>
<p>RMAN&gt; backup as copy database;  backup incremental level=0 database plus archivelog;</p>
<p>=======<br />
<strong>Backup tablespace.</strong><br />
======</p>
<p>RMAN&gt; backup tablespace system, sysaux;</p>
<p>RMAN&gt; configure exclude for tablespace users;  configure exclude for tablespace users clear; &lt;== to clear the excluded tablespace.</p>
<p>=======<br />
<strong>Backup datafile.</strong><br />
======</p>
<p>RMAN&gt; backup datafile &#8216;/app/sanjay/11R2/system01.dbf&#8217;;</p>
<p>RMAN&gt; backup datafile 1,5;</p>
<p>RMAN&gt; backup as copy datafile 3;</p>
<p>RMAN&gt; backup incremental level 1 datafile 4;</p>
<p>RMAN&gt; backup database not backed up; &lt;== To backup the datafile not backed up.</p>
<p>=======<br />
<strong>Backup controlfile.</strong><br />
======</p>
<p>RMAN&gt; backup current controlfile;</p>
<p>RMAN&gt; configure controlfile autobackup format for device type disk to &#8216;/app/sanjay/rman/rman_ctl_%F.bk&#8217;;</p>
<p>=======<br />
<strong>Backup spfile.</strong><br />
======</p>
<p>RMAN&gt; backup spfile;</p>
<p>Note: RMAN can only back up the spfile if the instance was started using a spfile.</p>
<p>=========<br />
<strong>Backup Archive logs.</strong><br />
=========</p>
<p>RMAN&gt; backup archivelog all;</p>
<p>RMAN&gt; backup archivelog all delete input;</p>
<p>RMAN&gt; backup archivelog sequence 300;</p>
<p>RMAN&gt; backup archivelog sequence between 300 and 400 thread 1;</p>
<p>RMAN&gt; backup archivelog from time &#8220;sysdate-7&#8243; until time &#8220;sysdate-1&#8243;;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=356&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/12/03/rman-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>OEM</title>
		<link>http://oramasters.com/2011/11/06/oem/</link>
		<comments>http://oramasters.com/2011/11/06/oem/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 19:08:55 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[OEM]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=338</guid>
		<description><![CDATA[OEM 11g Docs http://download.oracle.com/docs/cd/E11857_01/index.htm OEM 10g Docs http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e10953/toc.htm &#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=338&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>OEM 11g Docs</p>
<p>http://download.oracle.com/docs/cd/E11857_01/index.htm</p>
<p>OEM 10g Docs</p>
<p>http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e10953/toc.htm</p>
<p>&#8220;[contact-form] </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=338&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/11/06/oem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>PL/SQL Part-1</title>
		<link>http://oramasters.com/2011/10/12/324/</link>
		<comments>http://oramasters.com/2011/10/12/324/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 10:35:38 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=324</guid>
		<description><![CDATA[What is PL/SQL? PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation to enhance the capabilities of SQL. What is PL/SQL Engine? Oracle uses PL/SQL engine to processes the PL/SQL statements, A PL/SQL code can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=324&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What is PL/SQL?</p>
<p>PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation to enhance the capabilities of SQL.<br />
What is PL/SQL Engine?</p>
<p>Oracle uses PL/SQL engine to processes the PL/SQL statements, A PL/SQL code can be stored in the client system (client-side) or in the database (server-side).</p>
<p>What are advantages of PL/SQL?</p>
<p>A.	Block Structures: PL/SQL consists of blocks of code, which can be nested within each other. Each block forms a unit of a task or a logical module. PL/SQL Blocks can be stored in the database and reused.<br />
B.	 Procedural Language Capability: PL/SQL consists of procedural language constructs such as conditional statements and loops.<br />
C.	 Better Performance: PL SQL engine processes multiple SQL statements simultaneously as a single block, thereby reducing network traffic.<br />
D.	Error Handling: PL/SQL handles errors or exceptions effectively during the execution of a PL/SQL program. Once an exception is caught, specific actions can be taken depending upon the type of the exception or it can be displayed to the user with a message.</p>
<p>What are PL/SQL Placeholders?<br />
Placeholders are temporary storage area, those can be any of Variables, Constants and Records. Oracle defines placeholders to store data temporarily, which are used to manipulate data during the execution of a PL SQL block. Depending on the kind of data you want to store, you can define placeholders with a name and a data type. Few of the data types used to define placeholders are as under.<br />
Number (n,m) , Char (n) , Varchar2 (n) , Date , Long , Long raw, Raw, Blob, Clob, Nclob, Bfile</p>
<p>What is a PL/SQL Block?<br />
Each PL/SQL program consists of SQL and PL/SQL statements which from a PL/SQL block and a PL/SQL block consist three sections:<br />
A.	The Declaration section (optional).<br />
B.	The Execution section (mandatory).<br />
C.	The Exception or Error handling section (optional).</p>
<p>A.	The Declaration section (optional):<br />
The Declaration section of a PL/SQL Block starts with the reserved keyword DECLARE.  This section is optional and is used to declare any placeholders. Placeholders (may be any of below type) which stores data temporarily.<br />
1. Variables<br />
2. Constants<br />
3. Cursors<br />
4. Records<br />
5. Records those are used to manipulate data in the execution section. </p>
<p>B.	The Execution section (mandatory):<br />
The Execution section of a PL/SQL Block starts with the reserved keyword BEGIN and ends with END. This is a MUST section where the program logic is written to perform any task/s. The programmatic constructs like form the part of execution section.<br />
1. Conditional statement<br />
2. SQL statements<br />
3. Loops</p>
<p>C.	The Exception or Error handling section (optional):<br />
The Exception section of a PL/SQL Block starts with the reserved keyword EXCEPTION.  Any errors in the program can be handled in this section, so that the PL/SQL Blocks terminates gracefully. If the PL/SQL Block contains exceptions that cannot be handled, the Block terminates abruptly with errors.<br />
1. Every statement in the above three sections must end with ; (semicolon).<br />
2. PL/SQL blocks can be nested within other PL/SQL blocks.<br />
3. Comments can be used to document code.<br />
This is how a sample PL/SQL Block looks. </p>
<p>1. HOW to count and group together.</p>
<p>select distinct(column_1),count(*) from table_name group by column_1 ;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=324&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/10/12/324/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix Solaris</title>
		<link>http://oramasters.com/2011/10/10/unix-solaris/</link>
		<comments>http://oramasters.com/2011/10/10/unix-solaris/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 12:24:34 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=322</guid>
		<description><![CDATA[============= HOW TO COLLECT EXPLORER LOGS FOR SOLARIS ============= # /opt/SUNWexplo/bin/explorer run it on the box.. the output is available in: cd /opt/SUNWexplo/output 1. to see the memory size. prtconf 2. to see the details ======================== prtdiag and prtdiag -v for 1. CPU status 2. Memory configuration 3. IO Cards 4. Environment status a. system [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=322&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>=============<br />
HOW TO COLLECT EXPLORER LOGS FOR SOLARIS<br />
=============<br />
# /opt/SUNWexplo/bin/explorer</p>
<p>run it on the box..</p>
<p>the output is available in:</p>
<p>cd /opt/SUNWexplo/output</p>
<p>1. to see the memory size.<br />
prtconf </p>
<p>2. to see the details<br />
========================<br />
prtdiag  and prtdiag -v  for<br />
1. CPU status<br />
2. Memory configuration<br />
3. IO Cards<br />
4. Environment status<br />
   a. system temperature.<br />
   b. Front panel status<br />
   c. Disk status<br />
   d. Fan status<br />
   e. Power suply<br />
   f.<br />
========================</p>
<p>3. to see file i/o<br />
iostat -xtnM 5 </p>
<p>show from time to time 2-3 procent %w , (for /var and /export) </p>
<p>The Database server is a V440 with 16 Gb ram / 4 x 1,3Ghz CPU Only 1 scsi bus</p>
<p>yesterday 1528 study / 92539 object arrive</p>
<p>sk@sanjay01:/usr/sk] $ prtconf<br />
System Configuration: Sun Microsystems sun4u<br />
Memory size: 16384 Megabytes<br />
System Peripherals (Software Nodes):</p>
<p>4.<br />
/var/adm/messages</p>
<p>5.<br />
/etc/vfstab</p>
<p>6.<br />
format (as root user will scan all disk (san disk from san server)<br />
See below.</p>
<p>================================<br />
HOW TO CHECK O.S. LEVEL FILES.<br />
================================</p>
<p>/var/adm/messages</p>
<p>/var/opt/SUNWscor/oracle_server/messages.log.oracle</p>
<p>/var/opt/SUNWscor/oracle_listener/messages.log.listener</p>
<p>/var/opt/SUNWscor/oracle_listener</p>
<p>/var/opt/SUNWscor/oracle_server</p>
<p>/data/logs/impax.log</p>
<p>/data/logs/oracle/bdump/alert_sk.log</p>
<p>==============================<br />
prtdiag -v   SAMPLE OUTPUT<br />
==============================</p>
<p>    prtdiag -v</p>
<p>[sk@sanjay01:/usr/sk] $ prtdiag -v<br />
System Configuration:  Sun Microsystems  sun4u Sun Fire V490<br />
System clock frequency: 150 MHz<br />
Memory size: 8192 Megabytes</p>
<p>========================= CPUs ===============================================</p>
<p>          Run   E$  CPU     CPU<br />
Brd  CPU  MHz   MB  Impl.   Mask<br />
&#8212; &#8212;&#8211; &#8212;- &#8212;- &#8212;&#8212;- &#8212;-<br />
 A  0, 16 1500 32.0 US-IV+   2.2<br />
 A  2, 18 1500 32.0 US-IV+   2.2</p>
<p>========================= Memory Configuration ===============================</p>
<p>          Logical  Logical  Logical<br />
     MC   Bank     Bank     Bank         DIMM    Interleave  Interleaved<br />
Brd  ID   num      size     Status       Size    Factor      with<br />
&#8212;  &#8212;  &#8212;-     &#8212;&#8212;   &#8212;&#8212;&#8212;&#8211;  &#8212;&#8212;  &#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;&#8211;<br />
 A    0     0      1024MB   no_status     512MB     8-way        0<br />
 A    0     1      1024MB   no_status     512MB     8-way        0<br />
 A    0     2      1024MB   no_status     512MB     8-way        0<br />
 A    0     3      1024MB   no_status     512MB     8-way        0<br />
 A    2     0      1024MB   no_status     512MB     8-way        0<br />
 A    2     1      1024MB   no_status     512MB     8-way        0<br />
 A    2     2      1024MB   no_status     512MB     8-way        0<br />
 A    2     3      1024MB   no_status     512MB     8-way        0</p>
<p>========================= IO Cards =========================</p>
<p>                    Bus  Max<br />
 IO  Port Bus       Freq Bus  Dev,<br />
Type  ID  Side Slot MHz  Freq Func State Name                              Model<br />
&#8212;- &#8212;- &#8212;- &#8212;- &#8212;- &#8212;- &#8212;- &#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
PCI   8    B    3    33   33  3,0  ok    SUNW,XVR-100                      SUNW,375-3290<br />
PCI   8    B    5    33   33  5,0  ok    scsi-pci1000,30.1000.10c0.8/disk+ LSI,1030<br />
PCI   8    B    5    33   33  5,1  ok    scsi-pci1000,30.1000.10c0.8/disk+ LSI,1030<br />
PCI   8    A    0    66   66  1,0  ok    SUNW,qlc-pci1077,2312.1077.149.2+<br />
PCI   8    A    1    66   66  2,0  ok    SUNW,qlc-pci1077,2312.1077.149.2+</p>
<p>=========================  Environmental Status =========================</p>
<p>System Temperatures (Celsius):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Device          Temperature     Status<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
CPU0             48             OK<br />
CPU2             50             OK<br />
DBP0             23             OK</p>
<p>=================================</p>
<p>Front Status Panel:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Keyswitch position: NORMAL</p>
<p>System LED Status:</p>
<p>  LOCATOR   FAULT    POWER<br />
  &#8212;&#8212;-  &#8212;&#8212;-  &#8212;&#8212;-<br />
   [OFF]    [OFF]    [ ON]</p>
<p>=================================</p>
<p>Disk Status:<br />
&#8212;&#8212;&#8212;&#8212;<br />
DISK 0: [NO_FAULT]<br />
DISK 1: [NO_FAULT]</p>
<p>=================================</p>
<p>Fan Status:<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>Fan Tray        Fan              RPM    Status<br />
&#8212;&#8212;&#8212;&#8211;     &#8212;-            &#8212;&#8211;   &#8212;&#8212;&#8212;-<br />
FAN_TRAY_0      CPU0_FAN         5454   [NO_FAULT]<br />
FAN_TRAY_0      CPU1_FAN         4054   [NO_FAULT]<br />
FAN_TRAY_0      CPU2_FAN         3947   [NO_FAULT]<br />
FAN_TRAY_1      IO0_FAN          4054   [NO_FAULT]<br />
FAN_TRAY_1      IO1_FAN          4166   [NO_FAULT]</p>
<p>=================================</p>
<p>Power Supplies:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Supply     Status        Fault     Fan Fail   Temp Fail<br />
&#8212;&#8212;    &#8212;&#8212;&#8212;&#8212;   &#8212;&#8212;&#8211;  &#8212;&#8212;&#8212;  &#8212;&#8212;&#8212;<br />
PS0      [NO_FAULT    ]   OFF       OFF       OFF<br />
PS1      [NO_FAULT    ]   OFF       OFF       OFF</p>
<p>=================================</p>
<p>========================= HW Revisions =======================================</p>
<p>System PROM revisions:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
OBP 4.18.1 2005/06/13 11:39</p>
<p>IO ASIC revisions:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
         Port<br />
Model     ID  Status Version<br />
&#8212;&#8212;&#8211; &#8212;- &#8212;&#8212; &#8212;&#8212;-<br />
Schizo    8     ok      7<br />
Schizo    9     ok      7<br />
[sk@sanjay01:/usr/sk] $</p>
<p>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br />
<strong>PERFORMANCE RELATED QUERIES</strong><br />
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</p>
<p>Introduction to iostat , vmstat and netstat</p>
<p>This document is primarily written with reference to solaris performance monitoring and tuning but these tools are available in other unix variants also with slight syntax difference.</p>
<p>iostat , vmstat and netstat are three most commonly used tools for performance monitoring . These comes built in with the operating system and are easy to use .iostat stands for input output statistics and reports statistics for i/o devices such as disk drives . vmstat gives the statistics for virtual Memory and netstat gives the network statstics .</p>
<p>Following paragraphs describes these tools and their usage for performance monitoring.</p>
<p>Table of content :<br />
1. Iostat<br />
* Syntax<br />
* example<br />
* Result and Solutions</p>
<p>2. vmstat<br />
* syntax<br />
* example<br />
* Result and Solutions</p>
<p>3. netstat<br />
* syntax<br />
* example<br />
* Result and Solutions</p>
<p>Input Output statistics ( iostat )<br />
iostat reports terminal and disk I/O activity and CPU utilization. The first line of output is for the time period since boot &amp; each subsequent line is for the prior interval . Kernel maintains a number of counters to keep track of the values.</p>
<p>iostat’s activity class options default to tdc (terminal, disk, and CPU). If any other option/s are specified, this default is completely overridden i.e. iostat -d will report only statistics about the disks.</p>
<p>syntax:<br />
Basic synctax is iostat interval count<br />
option – let you specify the device for which information is needed like disk , cpu or terminal. (-d , -c , -t or -tdc ) . x options gives the extended statistics .</p>
<p>interval – is time period in seconds between two samples . iostat 4 will give data at each 4 seconds interval.</p>
<p>count – is the number of times the data is needed . iostat 4 5 will give data at 4 seconds interval 5 times</p>
<p>Example</p>
<p>====================<br />
$ iostat -xtc 10 5<br />
====================<br />
                        extended disk statistics       tty         cpu<br />
     disk r/s  w/s Kr/s Kw/s wait actv svc_t  %w  %b  tin tout us sy wt id<br />
     sd0   2.6 3.0 20.7 22.7 0.1  0.2  59.2   6   19   0   84  3  85 11 0<br />
     sd1   4.2 1.0 33.5  8.0 0.0  0.2  47.2   2   23<br />
     sd2   0.0 0.0  0.0  0.0 0.0  0.0   0.0   0    0<br />
     sd3  10.2 1.6 51.4 12.8 0.1  0.3  31.2   3   31</p>
<p>The fields have the following meanings:<br />
      disk    name of the disk<br />
      r/s     reads per second<br />
      w/s     writes per second<br />
      Kr/s    kilobytes read per second<br />
      Kw/s    kilobytes written per second<br />
      wait    average number of transactions waiting for service (Q length)<br />
      actv    average number of transactions  actively being serviced<br />
(removed  from  the  queue but not yet completed)<br />
      %w      percent of time there are transactions  waiting<br />
              for service (queue non-empty)<br />
      %b      percent of time the disk is busy  (transactions<br />
                  in progress)<br />
Results and Solutions<br />
The values to look from the iostat output are:<br />
* Reads/writes per second (r/s , w/s)<br />
* Percentage busy (%b)<br />
* Service time (svc_t)</p>
<p>If a disk shows consistently high reads/writes along with , the percentage busy (%b) of the disks is greater than 5 percent, and the average service time (svc_t) is greater than 30 milliseconds, then one of the following action needs to be taken</p>
<p>1.) Tune the application to use disk i/o more efficiently by modifying the disk queries and using available cache facilities of application servers .</p>
<p>2.) Spread the file system of the disk on to two or more disk using disk striping feature of volume manager /disksuite etc.</p>
<p>3.) Increase the system parameter values for inode cache , ufs_ninode , which is Number of inodes to be held in memory. Inodes are cached globally (for UFS), not on a per-file system basis</p>
<p>4.) Move the file system to another faster disk /controller or replace existing disk/controller to a faster one.</p>
<p>========================================<br />
<strong>Virtual Memory Statistics ( vmstat )</strong><br />
========================================</p>
<p>vmstat – vmstat reports virtual memory statistics of process, virtual memory, disk, trap, and CPU activity.</p>
<p>On multicpu systems , vmstat averages the number of CPUs into the output. For per-process statistics .Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted.</p>
<p>syntax<br />
Basic synctax is vmstat interval count</p>
<p>option – let you specify the type of information needed such as paging -p , cache -c ,.interrupt -i etc.</p>
<p>if no option is specified information about process , memory , paging , disk ,interrupts &amp; cpu is displayed .</p>
<p>interval – is time period in seconds between two samples . vmstat 4 will give data at each 4 seconds interval.</p>
<p>count – is the number of times the data is needed . vmstat 4 5 will give data at 4 seconds interval 5 times.</p>
<p>Example<br />
The following command displays a summary of what the system<br />
is doing every five seconds.</p>
<p>example% vmstat 5</p>
<p>     procs  memory          page             disk      faults        cpu<br />
     r b w swap  free re mf pi p fr de sr s0 s1 s2 s3  in  sy  cs us sy id<br />
     0 0 0 11456 4120 1  41 19 1  3  0  2  0  4  0  0  48 112 130  4 14 82<br />
     0 0 1 10132 4280 0   4 44 0  0  0  0  0 23  0  0 211 230 144  3 35 62<br />
     0 0 1 10132 4616 0   0 20 0  0  0  0  0 19  0  0 150 172 146  3 33 64<br />
     0 0 1 10132 5292 0   0  9 0  0  0  0  0 21  0  0 165 105 130  1 21 78</p>
<p>The fields of vmstat&#8217;s display are<br />
procs<br />
r     in run queue<br />
b     blocked for resources I/O, paging etc.<br />
w     swapped<br />
memory (in Kbytes)<br />
swap &#8211;  amount  of  swap   space   currently   available<br />
free   &#8211; size of the free list</p>
<p>page ( in units per second).<br />
re    page reclaims &#8211;  see  -S  option  for  how  this<br />
field is modified.<br />
mf    minor faults &#8211;  see  -S  option  for  how    this<br />
field is modified.<br />
pi    kilobytes paged in<br />
po    kilobytes paged out<br />
fr    kilobytes freed<br />
de    anticipated short-term memory shortfall (Kbytes)<br />
sr    pages scanned by clock algorithm<br />
disk  ( operations per second )<br />
There are  slots for up to four disks,<br />
 labeled with a single letter and number.<br />
The letter indicates  the  type  of disk<br />
 (s = SCSI, i = IPI, etc).<br />
The number is  the logical unit number.</p>
<p>faults<br />
in    (non clock) device interrupts<br />
sy    system calls<br />
cs    CPU context switches</p>
<p>cpu  &#8211;   breakdown of percentage usage of CPU  time.<br />
 On multiprocessors  this is an a<br />
 average across all processors.<br />
us    user time<br />
sy    system time<br />
id    idle time<br />
Results and Solution from iostat</p>
<p>A. CPU issues<br />
Following columns has to be watched to determine if there is any cpu issue</p>
<p>1. Processes in the run queue (procs r)<br />
2. User time (cpu us)<br />
3. System time (cpu sy)<br />
4. Idle time (cpu id)</p>
<p>     procs      cpu<br />
     r b w    us sy  id<br />
     0 0 0    4  14  82<br />
     0 0 1    3  35  62<br />
     0 0 1    3  33  64<br />
     0 0 1    1  21  78<br />
Problem symptoms</p>
<p>A.) Number of processes in run queue<br />
1.) If the number of processes in run queue (procs r) are consistently greater than the number of CPUs on the system it will slow down system as there are more processes then available CPUs .<br />
2.) if this number is more than four times the number of available CPUs in the system then system is facing shortage of cpu power and will greatly slow down the processess on the system.<br />
3.) If the idle time (cpu id) is consistently 0 and if the system time (cpu sy) is double the user time (cpu us) system is facing shortage of CPU resources.</p>
<p>Resolution<br />
Resolution to these kind of issues involves tuning of application procedures to make efficient use of cpu and as a last resort increasing the cpu power or adding more cpu to the system.</p>
<p>B. Memory Issues<br />
Memory bottlenecks are determined by the scan rate (sr) . The scan rate is the pages scanned by the clock algorithm per second. If the scan rate (sr) is continuously over 200 pages per second then there is a memory shortage.</p>
<p>Resolution<br />
1. Tune the applications &amp; servers to make efficient use of memory and cache.<br />
2. Increase system memory .<br />
3. Implement priority paging in s in pre solaris 8 versions by adding line “set priority paging=1? in<br />
/etc/system. Remove this line if upgrading from Solaris 7 to 8 &amp; retaining old /etc/system file.</p>
<p>========================================<br />
<strong>Network Statistics (netstat)</strong><br />
========================================</p>
<p>netstat displays the contents of various network-related data structures in depending on the options selected.</p>
<p>Syntax</p>
<p>netstat<br />
multiple options can be given at one time.</p>
<p>Options<br />
-a – displays the state of all sockets.<br />
-r – shows the system routing tables<br />
-i – gives statistics on a per-interface basis.<br />
-m – displays information from the network memory buffers. On Solaris, this shows statistics<br />
for STREAMS<br />
-p [proto] – retrieves statistics for the specified protocol<br />
-s – shows per-protocol statistics. (some implementations allow -ss to remove fileds with a value of 0 (zero) from the display.)<br />
-D – display the status of DHCP configured interfaces.<br />
-n do not lookup hostnames, display only IP addresses.<br />
-d (with -i) displays dropped packets per interface.<br />
-I [interface] retrieve information about only the specified interface.<br />
-v be verbose</p>
<p>interval – number for continuous display of statictics.</p>
<p>Example<br />
$netstat -rn</p>
<p>Routing Table: IPv4<br />
    Destination           Gateway               Flags  Ref   Use   Interface<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8211; &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;&#8212;<br />
192.168.1.0         192.168.1.11          U        1   1444      le0<br />
224.0.0.0           192.168.1.11          U        1   0            le0<br />
default             192.168.1.1           UG       1   68276<br />
127.0.0.1           127.0.0.1             UH       1   10497     lo0<br />
This shows the output on a Solaris machine who’s IP address is 192.168.1.11 with a default router at 192.168.1.1</p>
<p>Results and Solutions</p>
<p>A.) Network availability<br />
The command as above is mostly useful in troubleshooting network accessibility issues . When outside network is not accessible from a machine check the following</p>
<p>1. if the default router ip address is correct<br />
2. you can ping it from your machine.<br />
3. If router address is incorrect it can be changed with route add command. See man route for more information.</p>
<p>route command examples<br />
$route add default<br />
$route add 192.0.2.32</p>
<p>If the router address is correct but still you can’t ping it there may be some network cable /hub/switch problem and you have to try and eliminate the faulty component .</p>
<p>B.) Network Response<br />
$ netstat -i</p>
<p>Name Mtu 	Net/Dest Address 	Ipkts 	Ierrs 	Opkts Oerrs 	Collis 	Queue<br />
lo0 8232 	loopback localhost 	77814 	0 	77814 	0 	0 	0<br />
hme0 1500 	server1 server1 	10658 	3 	48325 	0 	279257 	0<br />
This option is used to diagnose the network problems when the connectivity is there but it is slow in response .</p>
<p>Values to look at:</p>
<p>* Collisions (Collis)<br />
* Output packets (Opkts)<br />
* Input errors (Ierrs)<br />
* Input packets (Ipkts)</p>
<p>The above values will give information to workout</p>
<p>i. Network collision rate as follows :</p>
<p>Network collision rate = Output collision counts / Output packets</p>
<p>Network-wide collision rate greater than 10 percent will indicate</p>
<p>* Overloaded network,<br />
* Poorly configured network,<br />
* Hardware problems.</p>
<p>ii. Input packet error rate as follows :</p>
<p>Input Packet Error Rate = Ierrs / Ipkts.</p>
<p>If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems.</p>
<p>C. Network socket &amp; TCP Connection state</p>
<p>Netstat gives important information about network socket and tcp state . This is very useful in<br />
finding out the open , closed and waiting network tcp connection .</p>
<p>Network states returned by netstat are following</p>
<p>CLOSED       &#8212;-  Closed.  The socket  is  not  being used.<br />
LISTEN       &#8212;-  Listening for incoming connections.<br />
SYN_SENT     &#8212;-  Actively trying to  establish  connection.<br />
SYN_RECEIVED &#8212;- Initial synchronization of the connection under way.<br />
ESTABLISHED  &#8212;-  Connection has been established.<br />
CLOSE_WAIT   &#8212;-  Remote shut down; waiting  for  the socket to close.<br />
FIN_WAIT_1   &#8212;-  Socket closed; shutting  down  connection.<br />
CLOSING      &#8212;-  Closed,<br />
then   remote   shutdown; awaiting acknowledgement.<br />
LAST_ACK     &#8212;-   Remote  shut  down,  then   closed ;awaiting acknowledgement.<br />
FIN_WAIT_2   &#8212;-  Socket closed; waiting for shutdown from remote.<br />
TIME_WAIT    &#8212;-  Wait after close for  remote  shutdown retransmission..<br />
Example</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
#netstat -a<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Local Address 	Remote Address 	Swind   	Send-Q 	Rwind 	Recv-Q 	State<br />
*.* 	*.* 	0 	0 	24576 	0 	IDLE<br />
*.22 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.22 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.* 	*.* 	0 	0 	24576 	0 	IDLE<br />
*.32771 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.4045 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.25 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.5987 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.898 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.32772 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.32775 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.32776 	*.* 	0 	0 	24576 	0 	LISTEN<br />
*.* 	*.* 	0 	0 	24576 	0 	IDLE<br />
192.168.1.184.22 	192.168.1.186.50457 	41992 	0 	24616 	0 	ESTABLISHED<br />
192.168.1.184.22 	192.168.1.186.56806 	38912 	0 	24616 	0 	ESTABLISHED<br />
192.168.1.184.22 	192.168.1.183.58672 	18048 	0 	24616 	0 	ESTABLISHED<br />
if you see a lots of connections in FIN_WAIT state tcp/ip parameters have to be tuned because the<br />
connections are not being closed and they gets accumulating . After some time system may run out of<br />
resource . TCP parameter can be tuned to define a time out so that connections can be released and used by new connection.</p>
<p>==============<br />
<strong>CPU information</strong><br />
==============</p>
<p>[sk@sanjay01:/tmp] $ psrinfo<br />
0       on-line   since 04/20/2011 22:22:44<br />
1       on-line   since 04/20/2011 22:22:44<br />
2       on-line   since 04/20/2011 22:22:44<br />
3       on-line   since 04/20/2011 22:22:42<br />
16      on-line   since 04/20/2011 22:22:44<br />
17      on-line   since 04/20/2011 22:22:44<br />
18      on-line   since 04/20/2011 22:22:44<br />
19      on-line   since 04/20/2011 22:22:44<br />
[sk@sanjay01:/tmp] $ psrinfo -p<br />
4<br />
[sk@sanjay01:/tmp] $<br />
[sk@sanjay01:/tmp] $ psrinfo -pv<br />
The UltraSPARC-IV physical processor has 2 virtual processors (0, 16)<br />
The UltraSPARC-IV physical processor has 2 virtual processors (1, 17)<br />
The UltraSPARC-IV physical processor has 2 virtual processors (2, 18)<br />
The UltraSPARC-IV physical processor has 2 virtual processors (3, 19)</p>
<p>&#8220;[contact-form] </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/322/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=322&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/10/10/unix-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>Automatic Storage Management</title>
		<link>http://oramasters.com/2011/10/07/automatic-storage-management/</link>
		<comments>http://oramasters.com/2011/10/07/automatic-storage-management/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 15:55:03 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[ASM]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=319</guid>
		<description><![CDATA[ASM<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=319&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>ASM</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=319&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/10/07/automatic-storage-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix commands for DBA Part-1</title>
		<link>http://oramasters.com/2011/10/06/unix-commands-for-dba-part-1/</link>
		<comments>http://oramasters.com/2011/10/06/unix-commands-for-dba-part-1/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 16:03:42 +0000</pubDate>
		<dc:creator>Sanjay</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://oramasters.com/?p=313</guid>
		<description><![CDATA[1. How to sort based on column [sanjay@rwgdbwf01:/tmp] $ ps -ef&#124; grep LOCAL=NO&#124; sort +5 sanjay 21148     1  0   May 01 ?       1886:04 oracleSanjay (LOCAL=NO) sanjay  4480     1  0   Apr 03 ?       145:05 oracleSanjay (LOCAL=NO) sanjay 1815     1  0   Apr 03 ?       305:34 oracleSanjay (LOCAL=NO) sanjay 4394     1  0   Apr 03 ?       413:50 oracleSanjay (LOCAL=NO) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=313&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>1. How to sort based on column</strong></p>
<p>[sanjay@rwgdbwf01:/tmp] $ ps -ef| grep LOCAL=NO| sort +5<br />
sanjay 21148     1  0   May 01 ?       1886:04 oracleSanjay (LOCAL=NO)<br />
sanjay  4480     1  0   Apr 03 ?       145:05 oracleSanjay (LOCAL=NO)<br />
sanjay 1815     1  0   Apr 03 ?       305:34 oracleSanjay (LOCAL=NO)<br />
sanjay 4394     1  0   Apr 03 ?       413:50 oracleSanjay (LOCAL=NO)</p>
<p><strong>2. Different options with &#8216;find&#8217;.</strong><br />
2.1 To find a file named &#8220;wherewere.you&#8221; under all sub-directories of /usr/oracle<br />
find /usr/oracle -name wherewere.you -print</p>
<p>2.2 To remove all the files under /usr/oracle which end with .tmp<br />
find /usr/oracle -name &#8220;*.tmp&#8221; -print -exec rm -f {} \;</p>
<p>2.3 To list all files under /usr/oracle which are older than a week.<br />
find /usr/oracle -mtime +7 -print</p>
<p>2.4 To list all files under /usr/oracle which are modified within a week.<br />
find /usr/oracle -mtime -7 -print</p>
<p>2.5 To compress all files which end with .dmp and are more than 2 MB.<br />
find /usr/oracle -size +2097152c -name &#8220;*.dmp&#8221; -print -exec compress {} \;</p>
<p><strong>3. Shared memory segment sizes</strong><br />
ipcs -mb<br />
ipcs -b<br />
ipcrm -m       &lt;== Use for the Shared Memory entry<br />
ipcrm -s       &lt;== Use for the Semaphore entry</p>
<p><strong>4. How to see the users logged in to the server and their IP address</strong><br />
who -T</p>
<p><strong>5. How to convert the contents of a text file to </strong></p>
<p><strong>A. UPPERCASE<br />
</strong>tr &#8220;[a-z]&#8221; &#8220;[A-Z]&#8221; &lt; filename &gt; newfilename</p>
<p><strong>6. How to convert the contents of a text file to  lowercase.</strong><br />
tr &#8220;[A-Z]&#8221; &#8220;[a-z]&#8221; &lt; filename &gt; newfilename</p>
<p><strong>7. How to see lines 100 to 120 of a file</strong><br />
head -120 filename | tail -20</p>
<p><strong>8. How to see the versions of all Oracle products installed on the server.<br />
</strong>$ORACLE_HOME/orainst/inspdver</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oramasters.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oramasters.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oramasters.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oramasters.com&amp;blog=18486720&amp;post=313&amp;subd=oramasters&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oramasters.com/2011/10/06/unix-commands-for-dba-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/670fc7ff9a0af72c04ee478368173cb5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dbaacademy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
