<?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>AhmadT&#039;s blog</title>
	<atom:link href="http://ahmadt.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ahmadt.wordpress.com</link>
	<description>IT, Unix, Management, Wiki, Tips, Automation.. and anything I like :)</description>
	<lastBuildDate>Wed, 07 Jul 2010 17:56:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ahmadt.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>AhmadT&#039;s blog</title>
		<link>http://ahmadt.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ahmadt.wordpress.com/osd.xml" title="AhmadT&#039;s blog" />
	<atom:link rel='hub' href='http://ahmadt.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Blog has been moved</title>
		<link>http://ahmadt.wordpress.com/2010/07/07/blog-has-been-moved/</link>
		<comments>http://ahmadt.wordpress.com/2010/07/07/blog-has-been-moved/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:55:25 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=189</guid>
		<description><![CDATA[Dears, Blog has been moved to http://www.AlTwaijiry.com, please join us.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=189&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dears,</p>
<p>Blog has been moved to http://www.AlTwaijiry.com, please join us.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=189&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2010/07/07/blog-has-been-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://ahmadt.wordpress.com/2010/07/07/124/</link>
		<comments>http://ahmadt.wordpress.com/2010/07/07/124/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:37:04 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=124</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=124&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
<img src="http://ahmadt.files.wordpress.com/2009/02/etisalat.gif?w=83&#038;h=111" alt="Etisalat" title="Etisalat" width="83" height="111" class="aligncenter size-full wp-image-122" /><img src="http://ahmadt.files.wordpress.com/2009/02/31960_mb_file_c78b6.jpg?w=152&#038;h=140" alt="Mobily" title="Mobily" width="152" height="140" class="aligncenter size-full wp-image-121" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=124&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2010/07/07/124/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>

		<media:content url="http://ahmadt.files.wordpress.com/2009/02/etisalat.gif" medium="image">
			<media:title type="html">Etisalat</media:title>
		</media:content>

		<media:content url="http://ahmadt.files.wordpress.com/2009/02/31960_mb_file_c78b6.jpg" medium="image">
			<media:title type="html">Mobily</media:title>
		</media:content>
	</item>
		<item>
		<title>How to add additional mountpoint to Storage HA-Plus resource in SUN Cluster</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/how-to-add-additional-mountpoint-to-storage-ha-plus-resource-in-sun-cluster/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/how-to-add-additional-mountpoint-to-storage-ha-plus-resource-in-sun-cluster/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:45:02 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=187</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. 1. Run the following command to get the current mount points that the cluster is controlling them (replace HAPLUS with your StorageHA-Plus resource name) root@local# scrgadm -vvp &#124; grep FilesystemMountPoints &#124; grep value &#124; grep  HAPLUS (resourcegroup:HAPLUS:FilesystemMountPoints) Res property value: /apps /database 2. Now for example [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=187&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join us</a>.</strong></span></h1>
<p><span style="color:#ff0000;"><strong><br />
</strong></span></p>
<blockquote><p><strong>1. Run the following command to get the current mount points that the cluster is controlling them (replace HAPLUS with your StorageHA-Plus resource name)</strong></p>
<p>root@local# scrgadm -vvp | grep FilesystemMountPoints | grep value | grep  <span style="text-decoration:underline;"><span style="color:#ff9900;">HAPLUS</span></span><br />
(resourcegroup:HAPLUS:FilesystemMountPoints) Res property value: <strong>/apps /database</strong></p>
<p><strong><br />
</strong></p>
<p><strong>2. Now for example if we want this resource also to control the directory </strong><strong>/log , AFTER we create the file system in the same metaset and we add it to /etc/vfstab and we also test it (mount and umount in all node) we run the following command:</strong></p>
<p>scrgadm -c -j <span style="text-decoration:underline;"><span style="color:#ff9900;">HAPLUS </span></span>-x FileSystemMountPoints=&#8221;/apps,/database<strong>,/log</strong>&#8220;<br />
<strong><br />
</strong></p>
<p><strong>After running the command above the cluster will auto mount the filesystem /log automaticly (if it&#8217;s already mounted it will no remount it, also FYI this command can be executed while the cluster/application is running.</strong></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=187&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/how-to-add-additional-mountpoint-to-storage-ha-plus-resource-in-sun-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>Integrate Oracle database with SUN Cluster</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/integrate-oracle-database-with-sun-cluster/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/integrate-oracle-database-with-sun-cluster/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:33:11 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=184</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. 1. Run the following command create the Oracle listener resource: scrgadm -a -j ctl-ora-lsnr-res -g ctlprod-rg -t SUNW.oracle_listener:5 \ -x ORACLE_HOME=/oracle/ctlprod/9.2.0 \ -y Resource_dependencies=ctl-db-hasp-res1,ctl-db-hasp-res2,ctl-db-hasp-res3 A. ctl-ora-lsnr-res is the new resource name for the oracle listener B. ORACLE_HOME=/oracle/ctlprod/9.2.0 Oracle home directory. C. Resource_dependencies:  Any resource dependency D. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=184&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong></p>
<p><strong>1. Run the following command create the Oracle listener resource:</strong></p>
<p>scrgadm -a -j ctl-ora-lsnr-res -g ctlprod-rg -t SUNW.oracle_listener:5 \<br />
-x ORACLE_HOME=/oracle/ctlprod/9.2.0 \<br />
-y Resource_dependencies=ctl-db-hasp-res1,ctl-db-hasp-res2,ctl-db-hasp-res3</p>
<p><strong>A. ctl-ora-lsnr-res </strong>is the new resource name for the oracle listener</p>
<p><strong>B. ORACLE_HOME=/</strong><strong>oracle/ctlprod/9.2.0</strong> Oracle home directory.</p>
<p><strong>C. </strong><strong>Resource_dependencies</strong>:  Any resource dependency</p>
<p><strong>D. ctlprod-rg:</strong> resource group name</p>
<p><strong>2. The command above will create the resource and will leave it offline, you will have to online it manually.</strong></p>
<p>scswitch -e -j ctl-ora-lsnr-res</p>
<p><strong>3. Run the following command create the Oracle Server resource:</strong></p>
<p>scrgadm -a -j ctl-ora-srv-res -g ctlprod-rg -t SUNW.oracle_server:5 \<br />
-x ORACLE_HOME=/oracle/ctlprod/9.2.0 \<br />
-x ORACLE_SID=ctlprod \<br />
-x Alert_log_file=/oracle/ctlprod/admin/bdump/alert_ctlprod.log \<br />
-x Connect_string=suncluster/password \<br />
-y Resource_dependencies=ctl-db-hasp-res1,ctl-db-hasp-res2,ctl-db-hasp-res3</p>
<p><strong>A. ctl-ora-srv-res-g: </strong>the new resource name for the oracle server/database</p>
<p><strong>B. ORACLE_HOME=/</strong><strong>oracle/ctlprod/9.2.0</strong> Oracle home directory.</p>
<p><strong>C. </strong><strong>Resource_dependencies</strong>:  Any resource dependency</p>
<p><strong>D. ctlprod-rg:</strong> resource group name</p>
<p><strong>E. ORACLE_SID:</strong> Oracle database SID name</p>
<p><strong>F. Alert_log_file:</strong> Oracle database alert log file full path</p>
<p><strong>G. Connect_string: </strong>Connection string , the user name and the password that the cluster will use it to connect to the database in order to monitor it.</p>
<p><strong>4. The command above will create the resource and will leave it offline, you will have to online it manually.</strong></p>
<p>scswitch -e -j ctl-ora-srv-res</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=184&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/integrate-oracle-database-with-sun-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>IBM HMC (Hardware Management Console) commands</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/ibm-hmc-hardware-management-console-commands/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/ibm-hmc-hardware-management-console-commands/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:14:50 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[AIX]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=180</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. Few command lines you can use them when you ssh to any HMC (I usualy use it when I have a slow connection and I want to do something very fast) 1. List all th managed system in the HMC lssyscfg -r sys -F name 2. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=180&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
<strong>Few command lines you can use them when you ssh to any HMC (I usualy use it when I have a slow connection and I want to do something very fast)</strong></p>
<p><strong><br />
</strong></p>
<p><strong>1. List all th managed system in the HMC</strong></p>
<p><em>lssyscfg -r sys -F name</em></p>
<p><strong>2. List all the LPars running in any system</strong></p>
<p><em>lssyscfg -m &#8216;SYSTEM_NAME&#8217; -r lpar -F name</em></p>
<p><strong>3. Run a terminal/console for any system</strong></p>
<p><em>vtmenu</em></p>
<p><strong>4.  Display the state of all Lpars in a system managed by the HMC</strong></p>
<p><em>lssyscfg -m &#8216;SYSTEM_NAME&#8217; -r lpar -F name,lpar_id,state</em></p>
<p><strong>5. Reboot Lpar immediatly</strong></p>
<p><em>chsysstate -m &#8216;SYSTEM_NAME&#8217; -r lpar -n &#8216;LPAR_NAME&#8217; -o shutdown &#8211;immed &#8211;restart</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=180&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/ibm-hmc-hardware-management-console-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to enable mail relay with sendmail in Solaris and AIX and other</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/script-to-enable-mail-relay-with-sendmail-in-solaris-and-aix-and-other/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/script-to-enable-mail-relay-with-sendmail-in-solaris-and-aix-and-other/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:05:31 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=178</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. Run the following script if you want the system to forward all the mails to an SMTP server that is responsible to send all your mails: PS: replace **SERVER** with your mail relay server (SMTP Server) and youremail@yourdomain.com with your email #!/bin/bash cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.org perl [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=178&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
Run the following script if you want the system to forward all the mails to an SMTP server that is responsible to send all your mails:</p>
<blockquote><p><em><strong>PS: replace **SERVER** with your mail relay server (SMTP Server) and </strong></em><strong>youremail@yourdomain.com with your email</strong></p>
<p>#!/bin/bash</p>
<p>cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.org<br />
perl -i -pe &#8216;s/^DS.*/DS**SERVER**/g&#8217; /etc/mail/sendmail.cf<br />
/etc/init.d/sendmail stop<br />
/etc/init.d/sendmail start<br />
banner `hostname` | /usr/lib/sendmail -v youremail@yourdomain.com</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=178&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/script-to-enable-mail-relay-with-sendmail-in-solaris-and-aix-and-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>Get WWN for all HBAs in AIX</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/get-wwn-for-all-hbas-in-aix/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/get-wwn-for-all-hbas-in-aix/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 09:58:45 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[AIX]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=176</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. Simple!! for i in `lscfg -vp &#124;grep fcs&#124; awk &#8216;{print $1}&#8217;` do echo $i &#38;&#38; lscfg -vp -l $i &#124;grep &#8220;Network Address&#8221; done AIX1:/&#62;for i in `lscfg -vp &#124;grep fcs&#124; awk &#8216;{print $1}&#8217;` &#62; do &#62; echo $i &#38;&#38; lscfg -vp -l $i &#124;grep &#8220;Network Address&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=176&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
Simple!!</p>
<blockquote><p>
for i in `lscfg -vp |grep fcs| awk &#8216;{print $1}&#8217;`<br />
do<br />
echo $i &amp;&amp; lscfg -vp -l $i |grep &#8220;Network Address&#8221;<br />
done</p></blockquote>
<blockquote><p>AIX1:/&gt;for i in `lscfg -vp |grep fcs| awk &#8216;{print $1}&#8217;`<br />
&gt; do<br />
&gt; echo $i &amp;&amp; lscfg -vp -l $i |grep &#8220;Network Address&#8221;<br />
&gt; done<br />
fcs1<br />
Network Address&#8230;&#8230;&#8230;&#8230;.10000000C95A2E3F<br />
fcs0<br />
Network Address&#8230;&#8230;&#8230;&#8230;.10000000C95A31CE<br />
AIX1:/&gt;</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=176&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/get-wwn-for-all-hbas-in-aix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>How to remove a reservation key from a lun that is not used anymore</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-a-reservation-key-from-a-lun-that-is-not-used-anymore/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-a-reservation-key-from-a-lun-that-is-not-used-anymore/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 09:55:51 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=173</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. If you try to add a LUN to a server and you are not able to do anything on this LUN (e.g.: metainit is not working) most probubly this luns was used somewhere before and the reservation key was not removed from it. in order to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=173&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
If you try to add a LUN to a server and you are not able to do anything on this LUN (e.g.: metainit is not working) most probubly this luns was used somewhere before and the reservation key was not removed from it.</p>
<p>in order to remove the reservation key (BEFORE you remove it make sure the LUN has been removed from the other system and it&#8217;s not needed anymore otherwise you will lose your data and the other system will panic)</p>
<p>1. Check if you have reservation key in the LUN (you will need the sun cluster to be installed, if you don&#8217;t have it in the system try to mount the directory /usr/cluster from any sun cluster node to your server (nfs), I know it&#8217;s a dirty trick, but it will help <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p><strong><span style="color:#0000ff;">root@localhost# /usr/cluster/lib/sc/scsi -c inkeys -d /dev/rdsk/c8t6005076300C0B334000000000000170Ed0s2</span></strong><br />
Reservation keys(4):<br />
0x420773ee00000001<br />
0x420773ee00000002<br />
0x420773ee00000004<br />
0x420773ee00000003 <em><strong>&lt;&#8212; reservation key number</strong></em></p>
<p><span style="color:#0000ff;"><strong>root@localhost# /usr/cluster/lib/sc/scsi -c inresv -d /dev/rdsk/c8t6005076300C0B334000000000000170Ed0s2</strong></span><br />
Reservations(1):<br />
0x420773ee00000002<br />
type &#8212;&gt; 5</p></blockquote>
<p>2. Run the following command to clean/remove the reservation keys</p>
<blockquote><p><span style="color:#0000ff;"><strong>root@localhost# /usr/cluster/lib/sc/scsi -c scrub -d  /dev/rdsk/c8t6005076300C0B334000000000000170Ed0s2</strong></span><br />
Reservation keys currently on disk:<br />
0x420773ee00000001<br />
0x420773ee00000002<br />
0x420773ee00000004<br />
0x420773ee00000003<br />
Attempting to remove all keys from the disk&#8230;<br />
Scrubbing complete, use &#8216;/usr/cluster/lib/sc/scsi -c inkeys -d /dev/rdsk/c8t6005076300C0B334000000000000170Ed0s2&#8242; to verify success</p></blockquote>
<blockquote>
<blockquote><p><span style="color:#ff0000;"><br />
</span></p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:93px;width:1px;height:1px;">format -e /dev/rdsk/c8t6005076300C0B334000000000000170Ed0s2<br />
0504429967</div>
</blockquote>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=173&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-a-reservation-key-from-a-lun-that-is-not-used-anymore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>How to remove DISKs/LUNs FROM Solaris</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-disksluns-from-solaris/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-disksluns-from-solaris/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 09:44:22 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=171</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. 1. Identify the file systems. 2. Get the disks that belong to the file system. 3. Check them in the metaset/metadevice and make sure no one else is using them (no other soft partition). 4. Clean the metadevice from the  metaset 5. REMOVE THE DISKS FROM [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=171&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong></p>
<p>1. Identify the file systems.<br />
2. Get the disks that belong to the file system.<br />
3. Check them in the metaset/metadevice and make sure no one else is using them (no other soft partition).<br />
4. Clean the metadevice from the  metaset<br />
5. REMOVE THE DISKS FROM THE METASET<br />
6. REMOVE THE METADB FOR THE DISKS THAT YOU WANT TO REMOVE<br />
7. ASK data storage to remove the disks<br />
8. Configure the controllers after you confirm that the disks has been removed in all nodes<br />
9. Run devfsadm -Cv in all nodes<br />
9. Run scgdevs in ONE NODE (in case you are using SUN Cluster)<br />
10. Run scdidadm -C in ONE NODE (in case you are using SUN Cluster)<br />
11. Check all nodes have the same number of LUNS (in case you are using SUN Cluster)<br />
For more information check http://docs.sun.com/app/docs/doc/817-1673/6mhcv6m38?a=view</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=171&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/how-to-remove-disksluns-from-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to convert Firewall ACL 2 Excel (very basic)</title>
		<link>http://ahmadt.wordpress.com/2009/06/08/script-to-convert-firewall-acl-2-excel-very-basic/</link>
		<comments>http://ahmadt.wordpress.com/2009/06/08/script-to-convert-firewall-acl-2-excel-very-basic/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 09:39:34 +0000</pubDate>
		<dc:creator>Ahmad AlTwaijiry</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://ahmadt.wordpress.com/?p=169</guid>
		<description><![CDATA[Blog has been moved to http://www.AlTwaijiry.com, please join us. This script will convert all firewall ACL to excel sheet, I use it sometime when I receive list of ACL and I need present it to someone, the script is very basic and it does what I need (I can&#8217;t gurrentee that it will work with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=169&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>Blog has  been moved to</strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong> <a href="http://www.AlTwaijiry.com" target="_self">http://www.AlTwaijiry.com</a>, </strong></span></h1>
<h1 style="text-align:center;"><span style="color:#ff0000;"><strong>please <a href="http://www.AlTwaijiry.com">join  us</a>.</strong></span></h1>
<p><strong><br />
</strong><br />
This script will convert all firewall ACL to excel sheet, I use it sometime when I receive list of ACL and I need present it to someone, the script is very basic and it does what I need (I can&#8217;t gurrentee that it will work with you)</p>
<p>save the firewall rules in firewall.txt.log and then run the following perl script</p>
<p><pre class="brush: plain;">

#!/usr/bin/perl

$output='';

open(DATA,&quot;&amp;lt;firewall.txt.log&quot;) || die(&quot;File NOT FOUND (firewall.txt.log)&quot;);
@Rules = &amp;lt;DATA&amp;gt;;
close DATA;

foreach(@Rules){
@acl = split(/ /,$_);
if($acl[3] ne 'permit') { die(&quot;ACL format is not supported&quot;);}

$proto = $acl[4];

if($acl[5] eq 'host'){
$source=$acl[6];
}else{
$source=$acl[5] . '/' . $acl[6];
}

if($acl[7] eq 'host'){
$dest=$acl[8];
}else{
$dest=$acl[7] . '/' . $acl[8];
}

if($acl[9] ne 'object-group' &amp;amp;&amp;amp; $acl[9] ne 'eq' &amp;amp;&amp;amp; $acl[9] ne 'range') { die(&quot;ACL format not supported\n$_\n&quot;.$acl[9].&quot;\n\n&quot;);}

if($acl[9] eq 'eq'){
$port = $acl[10];
}elsif($acl[9] eq 'range'){
$port = $acl[10] . ' to ' . $acl[11];
}elsif($acl[9] eq 'object-group'){
$port = $acl[9] . '/' . $acl[10];
}else{
die(&quot;ACL format not supported\n$_\n&quot;.$acl[9].&quot;\n\n&quot;);
}
chomp($port);

#print $_;
$output .= &quot;$source,$dest,$proto,$port\n&quot;;
}

if($output ne ''){
print &quot;Source,Destination,Proto,Ports\n&quot;;
print $output;
}

</pre></p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:0;width:1px;height:1px;">#!/usr/bin/perl</p>
<p>$output=&#8221;;</p>
<p>open(DATA,&#8221;&lt;firewall.txt.log&#8221;) || die(&#8220;File NOT FOUND (firewall.txt.log)&#8221;);<br />
@Rules = &lt;DATA&gt;;<br />
close DATA;</p>
<p>foreach(@Rules){<br />
@acl = split(/ /,$_);<br />
if($acl[3] ne &#8216;permit&#8217;) { die(&#8220;ACL format is not supported&#8221;);}</p>
<p>$proto = $acl[4];</p>
<p>if($acl[5] eq &#8216;host&#8217;){<br />
$source=$acl[6];<br />
}else{<br />
$source=$acl[5] . &#8216;/&#8217; . $acl[6];<br />
}</p>
<p>if($acl[7] eq &#8216;host&#8217;){<br />
$dest=$acl[8];<br />
}else{<br />
$dest=$acl[7] . &#8216;/&#8217; . $acl[8];<br />
}</p>
<p>if($acl[9] ne &#8216;object-group&#8217; &amp;&amp; $acl[9] ne &#8216;eq&#8217; &amp;&amp; $acl[9] ne &#8216;range&#8217;) { die(&#8220;ACL format not supported\n$_\n&#8221;.$acl[9].&#8221;\n\n&#8221;);}</p>
<p>if($acl[9] eq &#8216;eq&#8217;){<br />
$port = $acl[10];<br />
}elsif($acl[9] eq &#8216;range&#8217;){<br />
$port = $acl[10] . &#8216; to &#8216; . $acl[11];<br />
}elsif($acl[9] eq &#8216;object-group&#8217;){<br />
$port = $acl[9] . &#8216;/&#8217; . $acl[10];<br />
}else{<br />
die(&#8220;ACL format not supported\n$_\n&#8221;.$acl[9].&#8221;\n\n&#8221;);<br />
}<br />
chomp($port);</p>
<p>#print $_;<br />
$output .= &#8220;$source,$dest,$proto,$port\n&#8221;;<br />
}</p>
<p>if($output ne &#8221;){<br />
print &#8220;Source,Destination,Proto,Ports\n&#8221;;<br />
print $output;<br />
}</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahmadt.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahmadt.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahmadt.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahmadt.wordpress.com&amp;blog=5001368&amp;post=169&amp;subd=ahmadt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahmadt.wordpress.com/2009/06/08/script-to-convert-firewall-acl-2-excel-very-basic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">AhmadT</media:title>
		</media:content>
	</item>
	</channel>
</rss>
