<?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>Kudithipudi.Org &#187; Linux</title>
	<atom:link href="http://kudithipudi.org/category/technology/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://kudithipudi.org</link>
	<description>Too much time on hand!!!</description>
	<lastBuildDate>Tue, 13 Jul 2010 02:33:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>HOW TO : Improve Jboss startup times</title>
		<link>http://kudithipudi.org/2009/12/31/how-to-improve-jboss-startup-times/</link>
		<comments>http://kudithipudi.org/2009/12/31/how-to-improve-jboss-startup-times/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 22:11:41 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=749</guid>
		<description><![CDATA[We run multiple applications in Jboss at my work and one of the applications used to take an inordinate time to come up. A typical application would take &#60; 1 minute to get deployed and this particular application for some reason was taking ~7-8 minutes. We initially thought it was a bug in the code [...]]]></description>
			<content:encoded><![CDATA[<p>We run multiple applications in Jboss at my work and one of the applications used to take an inordinate time to come up. A typical application would take &lt; 1 minute to get deployed and this particular application for some reason was taking ~7-8 minutes. We initially thought it was a bug in the code and gave hell to our development team <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .. But on closer investigation, we found out that a feature we enabled in the Jboss server settings which allows content to be hosted on network storage was causing the issue.</p>
<p>I blogged the feature in Jboss to follow sym links here (<a href="http://kudithipudi.org/2008/07/25/howto-configure-jboss-to-follow-symbolic-links/">http://kudithipudi.org/2008/07/25/howto-configure-jboss-to-follow-symbolic-links/</a>). So essentially when Jboss was started, it was checking all the content in these network path to check for applications to deploy. And traversing a network share with 1000s of directories isn&#8217;t fun <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ..</p>
<p>We fixed it by making a simple edit to the start up script. Here&#8217;s the psuedo code for the script</p>
<ol>
<li>Remove soft links to network share</li>
<li>Start Jboss</li>
<li>Put soft links to network share</li>
</ol>
<p>And now the application starts in less than a minute <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>I guess there might be other elegant ways to do this. i.e. Configure Jboss to only deploy certain applications, but this did the trick for us <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/12/31/how-to-improve-jboss-startup-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Load/Stress test a Linux based server</title>
		<link>http://kudithipudi.org/2009/12/09/howto-loadstress-test-a-linux-based-server/</link>
		<comments>http://kudithipudi.org/2009/12/09/howto-loadstress-test-a-linux-based-server/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 01:03:25 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=738</guid>
		<description><![CDATA[We ran into an issue at work recently, which prompted us to do some performance testing on some of our Linux servers. The requirement was to stress test the key components of the server (CPU, RAM, HDD, Network) and prove that different servers with the same configuration were capable of performing identically. Pretty simple right [...]]]></description>
			<content:encoded><![CDATA[<p>We ran into an issue at work recently, which prompted us to do some performance testing on some of our Linux servers. The requirement was to stress test the key components of the server (<a href="http://en.wikipedia.org/wiki/Central_processing_unit">CPU</a>, <a href="http://en.wikipedia.org/wiki/RAM">RAM</a>, <a href="http://en.wikipedia.org/wiki/Hard_disk_drive">HDD</a>, Network) and prove that different servers with the same configuration were capable of performing identically. Pretty simple right <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .. The challenge was to find tools that could be run to stress test each of the components. There were a lot of tools for CPU and memory (RAM) testing, but not a lot for network and hard drive (HDD) testing. After searching high and low, we found a couple of tools, that I wanted to document here for future reference.</p>
<h2>HDD Testing :</h2>
<p>I found a pretty interesting tool called Iozone written by William Norcott (Oracle) and Don Capps. You can get the source code and builds for major OSs at <a href="http://iozone.org">http://iozone.org</a> . Despite installing the program using RPM, we were not able toÂ  run the program without specifying the complete path.</p>
<p>There are a ton of options for the program, but the easiest method to run it was in automated mode with the output going to an Excel spreadsheet (more like a glorified CSV file <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Here is the command we used</p>
<p><code> /opt/iozone/bin/iozone -a -Rb output_excel_file.xls </code></p>
<p>The &#8220;-a&#8221; is to tell the program in automated mode and the &#8220;-Rb&#8221; is to tell the program to format the output in Excel format. And you can then go ahead and open the spreadsheet in Excel and create 3D graphs to check and compare the output.</p>
<h2>Network Testing :</h2>
<p>Most of the information out there in terms of testing the network stack of a machine is either to copy large files over a network share or via FTP. We didn&#8217;t find that was enough to really max out a Gigport since there were protocol limitations that didn&#8217;t allow us to saturate the network port. After some searching, we stumbled across a tool called &#8220;ettcp&#8221; on Sourceforge. ettcp itself is an offshoot of ttcp. <a href="http://ftp.arl.mil/~mike/ttcp.html">ttcp</a> (stands for test tcp) was created to test network performance between two nodes. I couldn&#8217;t find any place to download ttcp itself, but you can download ettcp at http://ettcp.sourceforge.net/.</p>
<p>We used a server, to act as a common receiver for all the servers we intended to do a performance test on. Here are the commands we used to run the test</p>
<p>RECEIVER (Common Server)<br />
<code>./ettcp -r -s -f M </code></p>
<p>The options are</p>
<ul>
<li>&#8220;-r&#8221; for designating the machine as receiver</li>
<li>&#8220;-f M&#8221; for showing the output in Mega Bytes.</li>
</ul>
<p>TRANSMITTER (Test Servers)<br />
<code>./ettcp -t -s receiver_hostname -n 10000000 -f M</code></p>
<p>the options are</p>
<ul>
<li>&#8220;-t&#8221; for designating the machine as transmitter</li>
<li>&#8220;-s receiver_hostname&#8221; to define the receiver</li>
<li>&#8220;-n&#8221; to define the number of packets to send to the receiver</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/12/09/howto-loadstress-test-a-linux-based-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HOW TO : Improve performance on Samba</title>
		<link>http://kudithipudi.org/2009/07/08/how-to-improve-performance-on-samba/</link>
		<comments>http://kudithipudi.org/2009/07/08/how-to-improve-performance-on-samba/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:02:42 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=659</guid>
		<description><![CDATA[Adding the following options to the [Global] section in the samba (open source software providing windows compatible file sharing for *nix operating systems) will most likely speed your throughput socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192 The receive and send buffer seem to do the trick.]]></description>
			<content:encoded><![CDATA[<p>Adding the following options to the [Global] section in the <a href="http://www.samba.org/">samba</a> (open source software providing windows compatible file sharing for *nix operating systems) will most likely speed your throughput</p>
<pre><code>socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192</code></pre>
<p>The receive and send buffer seem to do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/07/08/how-to-improve-performance-on-samba/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>{awk} &#8211; One Liners</title>
		<link>http://kudithipudi.org/2009/05/22/awk-one-liners/</link>
		<comments>http://kudithipudi.org/2009/05/22/awk-one-liners/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:37:26 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=613</guid>
		<description><![CDATA[I ran across a cached Google entry for a good collection of awk one liners by Eric Pemant. Since I thought the original site was down, I decided to host it on my domain atÂ http://kudithipudi.org/misc/awk_one_liners.txt. But I did some digging and looks like Eric has his own site now and hosts a lot more resources [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across a <a href="http://kudithipudi.org/misc/awk_one_liners.txt">cached Google entry</a> for a good collection of <a href="http://en.wikipedia.org/wiki/AWK">awk</a> one liners by Eric Pemant. Since I thought the original site was down, I decided to host it on my domain atÂ <a href="http://kudithipudi.org/misc/awk_one_liners.txt">http://kudithipudi.org/misc/awk_one_liners.txt</a>. But I did some digging and looks like Eric has his own <a href="http://www.pement.org">site</a> now and hosts a lot more resources related to <a href="http://en.wikipedia.org/wiki/AWK">awk</a> atÂ <a href="http://www.pement.org/awk.htm">http://www.pement.org/awk.htm</a>. Thx for the great collection Eric..</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/22/awk-one-liners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Find which interface a particular IP address is configured on</title>
		<link>http://kudithipudi.org/2009/05/22/how-to-find-which-interface-a-particular-ip-address-is-configured-on/</link>
		<comments>http://kudithipudi.org/2009/05/22/how-to-find-which-interface-a-particular-ip-address-is-configured-on/#comments</comments>
		<pubDate>Fri, 22 May 2009 19:28:53 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=611</guid>
		<description><![CDATA[There are a ton of scripts to find how many IP addresses Â are configured on a system, but I could not find one, whic would show me which particular network interface an IP address was configured on. Here is a one liner, that will give you this information in Linux /sbin/ifconfig &#124; grep -B1 10.10.10.10 [...]]]></description>
			<content:encoded><![CDATA[<p>There are a ton of scripts to find how many IP addresses Â are configured on a system, but I could not find one, whic would show me which particular network interface an IP address was configured on. Here is a one liner, that will give you this information in <a href="http://en.wikipedia.org/wiki/Linux">Linux</a></p>
<p><code> /sbin/ifconfig | grep -B1 10.10.10.10 | awk '{if (NR==1) print $1}'</code></p>
<p>The same script can be changes a bit to support other operating systems too. Essentially, I am doing a grep (search) of the output of ifconfig, which shows all the network information on the system for a particular IP. At the same time, I am using the -B1 option, which will show the line above the matching line. Finally, I am piping this to awk and printing the first row in the first column.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/22/how-to-find-which-interface-a-particular-ip-address-is-configured-on/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HOW TO : Pass environment variables when using sudo</title>
		<link>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/</link>
		<comments>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/#comments</comments>
		<pubDate>Thu, 21 May 2009 04:27:17 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=604</guid>
		<description><![CDATA[Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes. For example, I want to start Oracle while I am logged in as another user (vinay), I [...]]]></description>
			<content:encoded><![CDATA[<p>Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes.</p>
<p>For example, I want to start Oracle while I am logged in as another user (vinay), I can start the database using dbstart by issues</p>
<p><code>"sudo su - oracle -c "dbstart /$ORACLE_HOME"</code></p>
<p>$ORACLE_HOME is an environmental variable listed under user oracle&#8217;s environment.</p>
<p>Needless to say, you need to ensure that you have sudo configured to allow your userID to su to oracle.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOW TO : Block outbound e-mails in Postfix</title>
		<link>http://kudithipudi.org/2009/05/15/how-to-block-outbound-e-mails-in-postfix/</link>
		<comments>http://kudithipudi.org/2009/05/15/how-to-block-outbound-e-mails-in-postfix/#comments</comments>
		<pubDate>Fri, 15 May 2009 23:49:23 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=601</guid>
		<description><![CDATA[I ran into a challenge at work, where we had to allow e-mail delivery for certain domains, but block all other domains. But at the same time, we had to ensure that the clients sending e-mails did not get a delivery error. We were using Postfix as the MTA running on Redhat Linux. Here&#8217;s how [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a challenge at work, where we had to allow e-mail delivery for certain domains, but block all other domains. But at the same time, we had to ensure that the clients sending e-mails did not get a delivery error. We were using <a href="http://www.postfix.org">Postfix</a> as the <a href="http://en.wikipedia.org/wiki/Mail_transfer_agent">MTA</a> running on <a href="http://en.wikipedia.org/wiki/Redhat_Linux">Redhat Linux</a>. Here&#8217;s how I resolved it</p>
<ul>
<li>Edit the main.cf file (the default location is in /etc/postfix) and add &#8220;transport_maps = hash:/etc/postfix/transport&#8221; (without the quotes) to the file.</li>
<li>Create a file named &#8220;transport&#8221; in /etc/postfix, if it doesn&#8217;t exist</li>
<li>Add the following at the end of the transport file</li>
</ul>
<p><code>DOMAIN1 :<br />
DOMAIN2 :<br />
* discard:<br />
</code></p>
<ul>
<li>Run &#8220;postmap /etc/transport&#8221; to create a hash of the transport file</li>
<li>Run &#8220;service postfix restart&#8221; to restart the postfix service</li>
</ul>
<p>This configuraiton will ensure that all e-mails address to DOMAIN1 and DOMAIN2 are delivered normally, but the rest of the e-mails are silently discarded.</p>
<p>Note : Ensure that you follow the syntax for where to place the : verbatim.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/15/how-to-block-outbound-e-mails-in-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : More examples of grep</title>
		<link>http://kudithipudi.org/2009/05/06/how-to-more-examples-of-grep/</link>
		<comments>http://kudithipudi.org/2009/05/06/how-to-more-examples-of-grep/#comments</comments>
		<pubDate>Wed, 06 May 2009 12:14:31 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=593</guid>
		<description><![CDATA[For my reference.. good article about command line usage of grep . http://arstechnica.com/open-source/news/2009/05/command-line-made-easy-five-simple-recipes-for-grep.ars . Older how to articles on my site related to this topic are here and here.]]></description>
			<content:encoded><![CDATA[<p>For my reference.. good article about command line usage of grep . <a href="http://arstechnica.com/open-source/news/2009/05/command-line-made-easy-five-simple-recipes-for-grep.ars">http://arstechnica.com/open-source/news/2009/05/command-line-made-easy-five-simple-recipes-for-grep.ars</a> . Older how to articles on my site related to this topic are <a href="http://kudithipudi.org/2008/02/29/howto-use-grep-to-exclude-a-pattern/">here</a> and <a href="http://kudithipudi.org/2008/09/23/howto-user-find-and-grep-together/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/06/how-to-more-examples-of-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Force expire sudo security permissions..</title>
		<link>http://kudithipudi.org/2009/03/26/howto-force-expire-sudo-security-permissions/</link>
		<comments>http://kudithipudi.org/2009/03/26/howto-force-expire-sudo-security-permissions/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 07:11:54 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=579</guid>
		<description><![CDATA[Ever run into a situation when you thought you had sudo rights on a machine and tried to issue the sudo command and upon finding that you don&#8217;t have them..get your name added to the sudoers list by begging the sysadmin.. and then frusrated when sudo keeps throwing an error that you are not part [...]]]></description>
			<content:encoded><![CDATA[<p>Ever run into a situation when you thought you had sudo rights on a machine and tried to issue the sudo command and upon finding that you don&#8217;t have them..get your name added to the sudoers list by begging the sysadmin.. and then frusrated when sudo keeps throwing an error that you are not part of the sudoers list? Hmm.. that is a long sentance <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ..</p>
<p>To expire any cached security permissions, so that sudo is forced to check the sudoers files, issue the following command</p>
<p><code>sudo -k</code></p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/03/26/howto-force-expire-sudo-security-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : View HTML pages in Linux (command line)</title>
		<link>http://kudithipudi.org/2009/01/30/howto-view-html-pages-in-linux-command-line/</link>
		<comments>http://kudithipudi.org/2009/01/30/howto-view-html-pages-in-linux-command-line/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 01:07:24 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=503</guid>
		<description><![CDATA[If you are stuck in a terminal on a Linux workstation and need to view a html file.. you can use the following command links NAME_OF_HTML_FILE Links displays the HTML code in the page by default..If you want to just view the rendered HTML, press &#8220;\&#8221; and you can toggle between HTML and Text views. [...]]]></description>
			<content:encoded><![CDATA[<p>If you are stuck in a terminal on a Linux workstation and need to view a html file.. you can use the following command</p>
<p><code>links NAME_OF_HTML_FILE</code></p>
<p>Links displays the HTML code in the page by default..If you want to just view the rendered HTML, press &#8220;\&#8221; and you can toggle between HTML and Text views.</p>
<p>P.S : You need to have <a href="http://elinks.or.cz/">links</a> installed to use it <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .. But most of the new distributions have it installed by default.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/01/30/howto-view-html-pages-in-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
