<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; Linux</title>
	<atom:link href="http://shahidz.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Wed, 18 Aug 2010 07:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How A Microsoft Veteran Learned To Love Linux And Why It Matters</title>
		<link>http://shahidz.com/how-a-microsoft-veteran-learned-to-love-linux-and-why-it-matters/</link>
		<comments>http://shahidz.com/how-a-microsoft-veteran-learned-to-love-linux-and-why-it-matters/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 10:52:52 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Keith Curtis]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=88</guid>
		<description><![CDATA[Great Article
&#8220;After The Software Wars&#8221;, is a new book in which former Microsoft employee Keith Curtis explores the worlds of proprietary and free software. Quoting from the article:
While I came to not be all that thrilled with Fedora itself, I was floored merely by the installation process. It contained a graphical installer that ran all [...]]]></description>
			<content:encoded><![CDATA[<p>Great Article</p>
<p>&#8220;After The Software Wars&#8221;, is a new book in which former Microsoft employee Keith Curtis explores the worlds of proprietary and free software. Quoting from the article:</p>
<p>While I came to not be all that thrilled with Fedora itself, I was floored merely by the installation process. It contained a graphical installer that ran all the way to completion, it resized my NTFS partition &#8212; which I considered a minor miracle, setup dual boot, and actually did boot, and let me surf the Web. I didn&#8217;t have a clue what to do next, but the mere fact that this all worked told me more about the potential of Linux than anything I had read so far. You cannot, by accident, build an airplane that actually flies.</p>
<p>Read More : <a title="How A Microsoft Veteran Learned To Love Linux And Why It Matters" href="http://www.techflash.com/How_a_Microsoft_veteran_learned_to_love_Linux_and_why_it_matters_48542167.html" target="_blank">How A Microsoft Veteran Learned To Love Linux And Why It Matters</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fhow-a-microsoft-veteran-learned-to-love-linux-and-why-it-matters%2F&amp;linkname=How%20A%20Microsoft%20Veteran%20Learned%20To%20Love%20Linux%20And%20Why%20It%20Matters"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/how-a-microsoft-veteran-learned-to-love-linux-and-why-it-matters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autocompletion in Terminal is not working</title>
		<link>http://shahidz.com/autocompletion-in-terminal-is-not-working/</link>
		<comments>http://shahidz.com/autocompletion-in-terminal-is-not-working/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 06:59:23 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[teminal]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=84</guid>
		<description><![CDATA[One of the most helpful feature I find in linux boxes is it autocomplete fasility. This feature will make our job more easier. But in some servers or VPS this option is desabled by default or relevent packages for autocomplete where not installed. To enable autocomplete we need to two things.
1. Install the package &#8220;bash-completion&#8221;
$ [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most helpful feature I find in linux boxes is it autocomplete fasility. This feature will make our job more easier. But in some servers or VPS this option is desabled by default or relevent packages for autocomplete where not installed. To enable autocomplete we need to two things.</p>
<p>1. Install the package &#8220;<strong>bash-completion</strong>&#8221;</p>
<pre>$ sudo apt-get install bash-completion</pre>
<p>2. Add the following lines to the file ~/.bashrc or /etc/bash.bashrc</p>
<pre>if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fautocompletion-in-terminal-is-not-working%2F&amp;linkname=Autocompletion%20in%20Terminal%20is%20not%20working"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/autocompletion-in-terminal-is-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eucalyptus in Ubuntu Jaunty</title>
		<link>http://shahidz.com/eucalyptus-in-ubuntu-jaunty/</link>
		<comments>http://shahidz.com/eucalyptus-in-ubuntu-jaunty/#comments</comments>
		<pubDate>Fri, 01 May 2009 12:18:52 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[eucalyptus]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=79</guid>
		<description><![CDATA[The Ubuntu 9.04 Server Edition beta includes Eucalyptus, an open source software infrastructure for implementing “cloud computing” on clusters, such as Amazon’s EC2 (Elastic Compute Cloud). Eucalyptus is provided as a technology preview to allow users “to experiment with cloud computing”.
EUCALYPTUS &#8212; Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems &#8212; is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">The Ubuntu 9.04 Server Edition beta includes Eucalyptus, an open source software infrastructure for implementing “cloud computing” on clusters, such as Amazon’s EC2 (Elastic Compute Cloud). Eucalyptus is provided as a technology preview to allow users “to experiment with cloud computing”.</p>
<p style="text-align: justify;"><strong>EUCALYPTUS</strong> &#8212; <strong>Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems</strong> &#8212; is an open-source software infrastructure for implementing Elastic/Utility/Cloud computing using computing clusters and/or workstation farms.  The current interface to EUCALYPTUS is interface-compatible with Amazon.com&#8217;s EC2 (arguably the most commercially successful Cloud computing service), but the infrastructure is designed to be modified and extended so that multiple client-side interfaces can be supported.  In addition, EUCALYPTUS is implemented using commonly-available Linux tools and basic web service technology making it easy to install and maintain. For more information click <a href="http://open.eucalyptus.com/wiki/EucalyptusOverview" target="_blank">here</a>.</p>
<p style="text-align: justify;">Get the User Guide from this link <a href="http://http://open.eucalyptus.com/wiki/EucalyptusUserGuide_v1.4" target="_blank">http://open.eucalyptus.com/wiki/EucalyptusUserGuide_v1.4</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Feucalyptus-in-ubuntu-jaunty%2F&amp;linkname=Eucalyptus%20in%20Ubuntu%20Jaunty"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/eucalyptus-in-ubuntu-jaunty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to synchronize the System Times</title>
		<link>http://shahidz.com/how-to-synchronize-the-time-of-a-system/</link>
		<comments>http://shahidz.com/how-to-synchronize-the-time-of-a-system/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 18:51:14 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[ntpdate-debian]]></category>
		<category><![CDATA[openntpd]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://shahidz.com/how-to-synchronize-the-time-of-a-system/</guid>
		<description><![CDATA[Introduction
OpenNTPD is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.
OpenNTPD is primarily developed by Henning Brauer as part of the OpenBSD project. Its design goals include being secure (non-exploitable), easy to configure, accurate enough for most purposes and with source code [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p><a href="http://www.openntpd.org/" title="http://www.openntpd.org/"><em>OpenNTPD</em></a> is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.</p>
<p>OpenNTPD is primarily developed by <a href="http://en.wikipedia.org/w/index.php?title=Henning_Brauer&amp;action=edit&amp;redlink=1" class="new" title="Henning Brauer (page does not exist)">Henning Brauer</a> as part of the <a href="http://en.wikipedia.org/wiki/OpenBSD" title="OpenBSD">OpenBSD</a> project. Its design goals include being secure (<a href="http://en.wikipedia.org/wiki/Exploit_%28computer_security%29" title="Exploit (computer security)">non-exploitable</a>), easy to configure, accurate enough for most purposes and with <a href="http://en.wikipedia.org/wiki/Source_code" title="Source code">source code</a> that can be distributed under a <a href="http://en.wikipedia.org/wiki/BSD_license" class="mw-redirect" title="BSD license">BSD license</a>.</p>
<p>This tool helped me a lot. Using openntpd we can set the same time on multiple system.</p>
<h3>Installation</h3>
<pre>$ sudo apt-get install openntpd</pre>
<p>Openntp configuration file /etc/openntpd/ntpd.conf</p>
<p>To set the time use the command <strong>ntpdate-debian</strong></p>
<pre>$ sudo ntpdate-debian
[sudo] password for shahid:
 7 Aug 00:20:33 ntpdate[26597]: adjust time server 59.165.131.82 offset -0.089443 sec</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fhow-to-synchronize-the-time-of-a-system%2F&amp;linkname=How%20to%20synchronize%20the%20System%20Times"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/how-to-synchronize-the-time-of-a-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>website performance testing using httperf</title>
		<link>http://shahidz.com/website-performance-testing-using-httperf/</link>
		<comments>http://shahidz.com/website-performance-testing-using-httperf/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 18:00:59 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[httperf]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://shahidz.com/website-performance-testing-using-httperf/</guid>
		<description><![CDATA[Introduction
httperf is a tool to measure web server  performance.
Example
$ httperf --server haproxy.com --port=80 --uri /frontend_dev.php --num-conns=25
httperf --client=0/1 --server=haproxy.com --port=80 --uri=/frontend_dev.php --send-buffer=4096 --recv-buffer=16384 --num-conns=25 --num-calls=1
Maximum connect burst length: 1

Total: connections 25 requests 25 replies 25 test-duration 0.528 s

Connection rate: 47.4 conn/s (21.1 ms/conn, &#60;=1 concurrent connections)
Connection time [ms]: min 4.9 avg 21.1 max 408.2 median 4.5 [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>httperf is a tool to measure web server  performance.</p>
<h3>Example</h3>
<pre>$ httperf --server haproxy.com --port=80 --uri /frontend_dev.php --num-conns=25
httperf --client=0/1 --server=haproxy.com --port=80 --uri=/frontend_dev.php --send-buffer=4096 --recv-buffer=16384 --num-conns=25 --num-calls=1
Maximum connect burst length: 1

Total: connections 25 requests 25 replies 25 test-duration 0.528 s

Connection rate: 47.4 conn/s (21.1 ms/conn, &lt;=1 concurrent connections)
Connection time [ms]: min 4.9 avg 21.1 max 408.2 median 4.5 stddev 80.6
Connection time [ms]: connect 0.3
Connection length [replies/conn]: 1.000

Request rate: 250 req/s (3.1 ms/req)
Request size [B]: 78.0

Reply rate [replies/s]: min 250 avg 319.6 max 250 stddev 0.0 (1 samples)
Reply time [ms]: response 0.7 transfer 5.1
Reply size [B]: header 487.0 content 34774.0 footer 0.0 (total 35261.0)
Reply status: 1xx=0 2xx=25 3xx=0 4xx=0 5xx=0

CPU time [s]: user 0.07 system 0.42 (user 12.9% system 80.4% total 93.2%)
Net I/O: 2124.7 KB/s (17.4*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0</pre>
<p>In the above output you can see the line &#8221;</p>
<pre>Total: connections 25 requests 25 replies 25 test-duration 0.528 s</pre>
<p align="justify">This line means httperf gave request  for 25 connection (means 25 connections) and it get replies for all the 25 request. And time took to 25 request and 25 replies is the test-duration and in the above example it took 0.528 seconds.</p>
<p align="justify">The bellow line means</p>
<pre>Reply rate [replies/s]: min 250 avg 250 max 250 stddev 0.0 (1 samples)</pre>
<p align="justify">Replay rate gives various statistics for the  reply  rate.   In  the  example  above,  the minimum  (‘‘min’’)  reply  rate was 250 replies per second, the verage (‘‘avg’’) was 250  replies per second,  and  the  maximum (‘‘max’’) rate was 250 replies per second.  The standard deviation was 0.3 replies per second.  The number enclosed in parentheses  shows  that  60  reply  rate  samples were acquired.</p>
<p align="justify">You can test whether the Replay rates where correct by using the argument <em>&#8211;rate</em> with the httperf command.</p>
<pre>$ httperf --server haproxy.com --port=80 --uri /frontend_dev.php --num-conns=25 --rate 250</pre>
<p align="justify">The the line Replay Time means</p>
<pre>Reply time [ms]: response 0.7 transfer 5.1</pre>
<p align="justify">The line labeled ‘‘Reply Time’’ gives information on how long it took for the server to respond and how long it took  to  receive the  reply. In the above example, it took on average 0.7 milliseconds between sending the first byte of the request and receiving  the first byte of the reply.  The time  to ‘‘transfer’’, or read, the reply was 5.1 milliseconds.</p>
<p align="justify">For more help</p>
<p align="justify">$ man  httperf</p>
<p align="justify"><a href="http://www.hpl.hp.com/research/linux/httperf/" title="httperf">httperf</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fwebsite-performance-testing-using-httperf%2F&amp;linkname=website%20performance%20testing%20using%20httperf"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/website-performance-testing-using-httperf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables port forwarding on ubuntu</title>
		<link>http://shahidz.com/iptables-port-forwarding-on-ubuntu/</link>
		<comments>http://shahidz.com/iptables-port-forwarding-on-ubuntu/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 05:31:52 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Securities]]></category>
		<category><![CDATA[port forwarding]]></category>

		<guid isPermaLink="false">http://shahidz.com/iptables-port-forwarding-on-ubuntu/</guid>
		<description><![CDATA[What is Port Forwarding?
Port forwarding is a feature of the IPTables system.  It allows one computer to forward connections made to it so that another computer can actually process the request.  If you want a very simple metaphor you can think of it as mail forwarding.  Each computer has a number of [...]]]></description>
			<content:encoded><![CDATA[<h3>What is Port Forwarding?</h3>
<p align="justify">Port forwarding is a feature of the IPTables system.  It allows one computer to forward connections made to it so that another computer can actually process the request.  If you want a very simple metaphor you can think of it as mail forwarding.  Each computer has a number of addresses called ports, and IPTables allows connections to these ports to be sent to another computer. With port forwarders, you can redirect data connections from the Internet to  an internal, privately addressed machine behind your IP MASQ server.  This  forwarding ability includes network protocols such as TELNET, WWW, and SMTP.  Protocols such as FTP, legacy ICQ, and others require special handling via kernel modules.</p>
<h3 align="justify">Setup</h3>
<p>On Ubuntu you need to enable port forwarding. For doing this you have to be the root user.</p>
<pre>root@shahid-laptop:~# echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre>
<p>After this you need to write iptable rule.</p>
<pre>root@shahid-laptop:~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
root@shahid-laptop:~# iptables -t nat -A PREROUTING -p tcp -i eth0 -d 192.168.0.10 --dport 555 -j DNAT --to 192.168.0.12:22
root@shahid-laptop:~# iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.12 --dport 22 -j ACCEPT</pre>
<p align="justify">In this rule, when we tries to connect to the IP 192.168.0.10 through the port 555 this system redirects the connection to the IP and 192.168.0.12 and port 22.</p>
<p>To see the iptables rule use the command &#8216;iptables -L&#8217;</p>
<pre>root@shahid-laptop:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             192.168.0.12        tcp dpt:ssh 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination</pre>
<h3>Saving Data</h3>
<p align="justify">When you reboot the system the iptables rules will be removed from the kernel module , so either you need to use <em>iptables-save</em> and <em>iptables-restore</em>for saving and restoring iptable rules or you need to write a script which will execut on every boot for enabling and create the iptable rule.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fiptables-port-forwarding-on-ubuntu%2F&amp;linkname=iptables%20port%20forwarding%20on%20ubuntu"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/iptables-port-forwarding-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
