<?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>satishgaudo.com &#187; Uncategorized</title>
	<atom:link href="http://satishgaudo.com/satblog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://satishgaudo.com/satblog</link>
	<description>Understanding technology</description>
	<lastBuildDate>Thu, 26 Aug 2010 06:27:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ganglia : monitoring framework</title>
		<link>http://satishgaudo.com/satblog/2010/07/30/ganglia-monitoring-framework/</link>
		<comments>http://satishgaudo.com/satblog/2010/07/30/ganglia-monitoring-framework/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 11:37:45 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ganglia]]></category>
		<category><![CDATA[gmetd]]></category>
		<category><![CDATA[gmond]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[server health]]></category>
		<category><![CDATA[server monitoring]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=239</guid>
		<description><![CDATA[
			
				
			
		
Ganglia is a monitoring framework for clusters of servers. It records many statistics and can record custom defined ones too. It works in a distributed manner, with each machine you wish to collect statistics for running the Ganglia monitor deamon, gmond. Each monitoring deamon’s statistics are collected by a metadata daemon, gmetad, running on either [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F07%2F30%2Fganglia-monitoring-framework%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F07%2F30%2Fganglia-monitoring-framework%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Ganglia is a monitoring framework for clusters of servers. It records many statistics and can record custom defined ones too. It works in a distributed manner, with each machine you wish to collect statistics for running the Ganglia monitor deamon, gmond. Each monitoring deamon’s statistics are collected by a metadata daemon, gmetad, running on either one of the monitored hosts or a separate machine. Ganglia provides a PHP frontend which displays the data from gmetad in the form of pretty graphs.</p>
<p>For extra details: <a href="http://www.ibm.com/developerworks/wikis/display/WikiPtype/ganglia">http://www.ibm.com/developerworks/wikis/display/WikiPtype/ganglia</a></p>
<p>On installation ganglia will show default metrics like cluster load, cpu status etc.</p>
<div class="wp-caption alignnone" style="width: 460px"><img title="Ganglia web front" src="http://satishgaudo.com/satblog/ext_img/ganglia.jpg" alt="Ganglia web front" width="450" height="547" /><p class="wp-caption-text">Ganglia web front</p></div>
<p>Admin can define metrics that he want using &#8220;gmetric&#8221; command like</p>
<p><strong><span style="color: #ff0000;">/usr/bin/gmetric  -u hits -tfloat -n apache_status_200  -v 100</span></strong></p>
<p>where n is the metric name and v is the value</p>
<p>Following are the PHP scripts called on crontab,</p>
<p>1. <strong>Apache Access log metric to count hits status:</strong></p>
<p><span style="color: #000000;">$gmetric_command = &#8220;/usr/bin/gmetric&#8221;;<br />
//cat access.log | grep &#8220;31/Jul/2010:09&#8243; | cut -f9 -d &#8221; &#8221; | sort | uniq -c<br />
$sApacheLogFile=APACHE_LOG_DIR.&#8221;access.log&#8221;;<br />
$sCurrentDate=date(&#8221;d/M/Y:H&#8221;);<br />
$sStatCommand=&#8221;cat &#8220;.$sApacheLogFile.&#8221; | grep &#8216;&#8221;.$sCurrentDate.&#8221;&#8216; | cut -f9 -d &#8216; &#8216; | sort | uniq -c&#8221;;<br />
$aOutput=Array();<br />
$sOp=exec($sStatCommand,$aOutput);<br />
if(is_array($aOutput)){<br />
foreach($aOutput as $iK =&gt;$sValue) {<br />
$aData=Array();<br />
$aData=explode(&#8221; &#8220;,trim($sValue));<br />
if($aData[0]&gt;0){<br />
system($gmetric_command . &#8221; -u hits -tfloat -n apache_status_&#8221;.$aData[1].&#8221; -v &#8221; . $aData[0]);<br />
}<br />
}<br />
}</span></p>
<p><strong>2.  Mysql status metrics:</strong></p>
<p><span style="color: #000000;">//gmetric command<br />
$stats_command = &#8220;/usr/bin/mysqladmin -u root &#8211;password=mAnG0pp1 extended-status&#8221;;<br />
$gmetric_command = &#8220;/usr/bin/gmetric&#8221;;<br />
$aCounterMetrics = Array(<br />
&#8220;Bytes_received&#8221; =&gt; &#8220;bytes&#8221;,<br />
&#8220;Bytes_sent&#8221; =&gt; &#8220;bytes&#8221;,<br />
&#8220;Com_delete&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Com_insert&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Com_replace&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Com_select&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Com_update&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Key_reads&#8221; =&gt; &#8220;operations&#8221;,<br />
&#8220;Qcache_hits&#8221; =&gt; &#8220;hits&#8221;,<br />
&#8220;Questions&#8221; =&gt; &#8220;queries&#8221;,<br />
&#8220;Connections&#8221; =&gt; &#8220;connections&#8221;,<br />
&#8220;Threads_created&#8221; =&gt; &#8220;threads&#8221;,<br />
&#8220;Slow_queries&#8221; =&gt; &#8220;queries&#8221;<br />
);<br />
$aAbsoluteMetrics = array(<br />
&#8220;Threads_connected&#8221; =&gt; &#8220;threads&#8221;,<br />
&#8220;Threads_running&#8221; =&gt; &#8220;threads&#8221;<br />
);<br />
$sMysqlLogFile=LOG_DIR.&#8221;mysql_stats.txt&#8221;;</span></p>
<p><span style="color: #000000;">if(!file_exists($sMysqlLogFile)){<br />
//if no file , create a one<br />
system(&#8221;$stats_command &gt; $sMysqlLogFile&#8221;);<br />
}else {<br />
//get the old stats data<br />
$aStatsOld=file($sMysqlLogFile);<br />
$aMyStatsOld=Array();<br />
$i=0;<br />
if(is_array($aStatsOld)&amp;&amp; count($aStatsOld)&gt;0){<br />
for($i=3;$i&lt;(count($aStatsOld)-1);$i++){<br />
$aStatTemp=explode(&#8221;|&#8221;,$aStatsOld[$i]);<br />
$aMyStatsOld[trim($aStatTemp[1])]=trim($aStatTemp[2]);<br />
}<br />
}<br />
unset($aStatTemp);<br />
//get the time file modified last time<br />
$sFileModTime=filemtime($sMysqlLogFile);<br />
unlink($sMysqlLogFile);<br />
//get the current stats<br />
system(&#8221;$stats_command &gt; $sMysqlLogFile&#8221;);<br />
$sCurrentTime=time();<br />
$aStatsNew=file($sMysqlLogFile);<br />
$aMyStatsNew=Array();<br />
if(is_array($aStatsNew)&amp;&amp; count($aStatsNew)&gt;0){<br />
for($i=3;$i&lt;(count($aStatsNew)-1);$i++){<br />
$aStatTemp=explode(&#8221;|&#8221;,$aStatsNew[$i]);<br />
$aMyStatsNew[trim($aStatTemp[1])]=trim($aStatTemp[2]);<br />
}<br />
}<br />
$iTimeDiff=$sCurrentTime-$sFileModTime;<br />
if($iTimeDiff&lt;1){<br />
die(&#8221;Time difference can&#8217;t be less than 1&#8243;);<br />
}<br />
# Calculate deltas for counter metrics and send them to ganglia<br />
foreach($aCounterMetrics as $sMetric =&gt;$sUnit){<br />
//print $aMyStatsNew[$sMetric].&#8221; &#8211; &#8220;.$aMyStatsOld[$sMetric].&#8221;===&lt;br&gt;&#8221;;<br />
$iRate = ($aMyStatsNew[$sMetric] &#8211; $aMyStatsOld[$sMetric]) / $iTimeDiff;</span></p>
<p><span style="color: #000000;">if ($iRate&gt;=0) {<br />
system($gmetric_command . &#8221; -u &#8216;$sUnit/sec&#8217; -tfloat -n mysqld_&#8221; . $sMetric . &#8221; -v &#8221; . $iRate);<br />
}<br />
}<br />
//Just send absolute metrics. No need to calculate delta<br />
foreach($aAbsoluteMetrics as $sMetric =&gt;$sUnit){<br />
system($gmetric_command . &#8221; -u $sUnit -tuint16 -n mysqld_&#8221; .$sMetric. &#8221; -v &#8221; .$aMyStats[$sMetric]);<br />
}<br />
}</span></p>
<p><strong>3.  Memcache status:</strong></p>
<p><span style="color: #000000;">require_once(CLASS_PATH.&#8217;memcache.class.php&#8217;);<br />
$oCache = new Cache();<br />
$gmetric_command = &#8220;/usr/bin/gmetric&#8221;;<br />
$sMemcacheLogFile=LOG_DIR.&#8221;memcache_stats.txt&#8221;;<br />
$aOldStats=Array();<br />
//get the memcache stats<br />
$aNewStats=$oCache-&gt;getExtendedStats();<br />
if(!file_exists($sMemcacheLogFile)){<br />
$f=fopen($sMemcacheLogFile,&#8221;w&#8221;);<br />
fwrite($f,serialize($aNewStats));<br />
fclose($f);<br />
}else {<br />
$aOldStats=unserialize(file_get_contents($sMemcacheLogFile));<br />
$sFileModTime=filemtime($sMemcacheLogFile);<br />
$iTimeDiff=time()-$sFileModTime;</span></p>
<p><span style="color: #000000;">$f=fopen($sMemcacheLogFile,&#8221;w&#8221;);<br />
fwrite($f,serialize($aNewStats));<br />
fclose($f);<br />
}</span></p>
<p><span style="color: #000000;">#################################################################################<br />
# Memcache Hit Ratio<br />
#################################################################################<br />
foreach($aNewStats as $sHost =&gt;$aData){<br />
$sDisplayHost=$sHost;<br />
$sDisplayHost=str_replace(&#8221;.&#8221;,&#8221;_&#8221;,$sDisplayHost);<br />
$sDisplayHost=str_replace(&#8221;:&#8221;,&#8221;_&#8221;,$sDisplayHost);<br />
$iHits   = $aData['get_hits'];<br />
$iMisses = $aData['get_misses'];<br />
$iTotalReq = $iHits + $iMisses;<br />
$iHitRatio=0;<br />
if ($iTotalReq == 0 ) {<br />
$iHitRatio = 0.0;<br />
} else {<br />
$iHitRatio = $iHits / $iTotalReq;<br />
}</span></p>
<p><span style="color: #000000;">system($gmetric_command . &#8221; -u ratio -tfloat -n memcache_hit_ratio&#8221;.$sDisplayHost.&#8221; -v &#8221; . $iHitRatio);<br />
#################################################################################<br />
# Calculate Memcache Fill Ratio<br />
#################################################################################<br />
$iTotalBytes = 0;<br />
$iUsedBytes  = 0;<br />
$iCurrConnections = 0;<br />
$iCurrItems = 0;<br />
$iFillRatio = 0;<br />
$iEvictions = 0;<br />
$iBytesRead = 0;<br />
$iBytesWritten = 0;<br />
$iTotalBytes = $aData['limit_maxbytes'];<br />
$iUsedBytes  = $aData['bytes'];<br />
$iFillRatio = $iUsedBytes/$iTotalBytes;<br />
$iCurrConnections = $aData['curr_connections'];<br />
$iCurrItems = $aData['curr_items'];</span></p>
<p><span style="color: #000000;">$iEvictions = $aData['evictions'];<br />
$iBytesRead = $aData['bytes_read'];<br />
$iBytesWritten = $aData['bytes_written'];</span></p>
<p><span style="color: #000000;">system($gmetric_command . &#8221; -u ratio -tfloat -n memcache_fill_ratio&#8221;.$sDisplayHost.&#8221; -v &#8221; . $iFillRatio );<br />
system($gmetric_command . &#8221; -u connections -tfloat -n memcache_curr_connections&#8221;.$sDisplayHost.&#8221; -v &#8221; . $iCurrConnections );<br />
system($gmetric_command . &#8221; -u items -tfloat -n memcache_curr_items&#8221;.$sDisplayHost.&#8221; -v &#8221; . $iCurrItems );<br />
//calculate counter metrics such as bytes in/out and evictions</span></p>
<p><span style="color: #000000;">if (isset($aOldStats[$sHost]) &amp;&amp; $iBytesRead &gt;= $aOldStats[$sHost]['bytes_read']) {<br />
system($gmetric_command . &#8221; -u number -tuint32 -n memcache_evictions&#8221;.$sDisplayHost.&#8221; -v &#8221; . ($iEvictions &#8211; $aOldStats[$sHost]['evictions']) );<br />
system($gmetric_command . &#8221; -u bytes/s -tfloat -n memcache_bytes_read&#8221;.$sDisplayHost.&#8221; -v &#8221; . ( ($iBytesRead &#8211; $aOldStats[$sHost]['bytes_read']) / $iTimeDiff)  );<br />
system($gmetric_command . &#8221; -u bytes/s -tfloat -n memcache_bytes_written&#8221;.$sDisplayHost.&#8221; -v &#8221; . ( ($iBytesWritten &#8211; $aOldStats[$sHost]['bytes_written']) / $iTimeDiff ) );<br />
}</span></p>
<p><span style="color: #000000;">}</span></p>
<p><strong>&#8212;memcache.class.php</strong></p>
<p><span style="color: #000000;">&lt;?php<br />
/**<br />
*<br />
* Setup:<br />
*<br />
edit the singleton() metod<br />
and define the list of memcached servers in a 2-d array<br />
in the format<br />
array(<br />
array(&#8217;192.168.0.1&#8242;=&gt;&#8217;11211&#8242;),<br />
array(&#8217;192.168.0.2&#8242;=&gt;&#8217;11211&#8242;),<br />
);<br />
*<br />
*<br />
* Usage:<br />
*<br />
&lt;?php<br />
//include the class name<br />
include (&#8217;memcache.class.php&#8217;);</span></p>
<p><span style="color: #000000;">//store the variable<br />
Cache::set(&#8217;key&#8217;,'abc&#8217;);</span></p>
<p><span style="color: #000000;">//increment/decrement the integer value<br />
Cache::increment(&#8217;key&#8217;);<br />
Cache::decrement(&#8217;key&#8217;);</span></p>
<p><span style="color: #000000;">//fetch the value by it&#8217;s key<br />
echo Cache::get(&#8217;key&#8217;);</span></p>
<p><span style="color: #000000;">//delete the data<br />
echo Cache::delete(&#8217;key&#8217;);</span></p>
<p><span style="color: #000000;">//Clear the cache memory on all servers<br />
Cache::flush();</span></p>
<p><span style="color: #000000;">Cache::replace() and Cache::add are implemented also.</span></p>
<p><span style="color: #000000;">More information can be obtained here:<br />
http://www.danga.com/memcached/<br />
http://www.php.net/memcache</span></p>
<p><span style="color: #000000;">*/<br />
/** @ingroup classes<br />
*  This is the Classes group<br />
*  @{<br />
*/<br />
/**<br />
* @brief class Cache The class makes it easier to work with memcached servers and provides hints in the IDE like Zend Studio<br />
* @version 1<br />
*<br />
*/</span></p>
<p><span style="color: #000000;">class Cache {<br />
/**<br />
* Resources of the opend memcached connections<br />
* @var array [memcache objects]<br />
*/<br />
var $mc_servers = array();<br />
/**<br />
* Quantity of servers used<br />
* @var int<br />
*/</span></p>
<p><span style="color: #000000;">var $servers = array(</span></p>
<p><span style="color: #000000;">array(&#8217;127.0.0.1&#8242;=&gt;&#8217;11211&#8242;)<br />
);</span></p>
<p><span style="color: #000000;">var $mc_servers_count=1;</span></p>
<p><span style="color: #000000;">/**<br />
* Accepts the 2-d array with details of memcached servers<br />
*<br />
* @param array $servers<br />
*/<br />
function Cache(){</span></p>
<p><span style="color: #000000;">/*<br />
for ($i = 0, $n = count($this-&gt;servers); $i &lt; $n; ++$i){<br />
( $con = memcache_connect(key($this-&gt;servers[$i]), current($this-&gt;servers[$i])) )&amp;&amp;<br />
$this-&gt;mc_servers[] = $con;<br />
}<br />
$this-&gt;mc_servers_count = count($this-&gt;mc_servers);<br />
if (!$this-&gt;mc_servers_count){<br />
$this-&gt;mc_servers[0]=null;<br />
}<br />
*/<br />
}</span></p>
<p><span style="color: #000000;">/**<br />
* Get statistics of the server<br />
*<br />
* @param string $key<br />
* @param mix $value<br />
* @return bool<br />
*/<br />
function getExtendedStats() {<br />
$num=0;<br />
foreach ($this-&gt;servers[$num] as $host =&gt; $port) {<br />
$memcache_obj = memcache_pconnect($host, $port);<br />
}<br />
if (!$memcache_obj) return false;<br />
return $memcache_obj-&gt;getExtendedStats();<br />
}</span></p>
<p><span style="color: #000000;">//class end<br />
}</span></p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/07/30/ganglia-monitoring-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuning LAMP systems, Part 2: Optimizing Apache and PHP</title>
		<link>http://satishgaudo.com/satblog/2010/05/07/tuning-lamp-systems-part-2-optimizing-apache-and-php/</link>
		<comments>http://satishgaudo.com/satblog/2010/05/07/tuning-lamp-systems-part-2-optimizing-apache-and-php/#comments</comments>
		<pubDate>Fri, 07 May 2010 05:47:23 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Part 2: Optimizing Apache and PHP]]></category>
		<category><![CDATA[Tuning LAMP systems]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=196</guid>
		<description><![CDATA[
			
				
			
		
Here is an link from digg.com, Tuning LAMP systems, Part 2: Optimizing Apache and PHP
Tuning LAMP systems, Part 2: Optimizing Apache and PHP
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F05%2F07%2Ftuning-lamp-systems-part-2-optimizing-apache-and-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F05%2F07%2Ftuning-lamp-systems-part-2-optimizing-apache-and-php%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Here is an link from digg.com, Tuning LAMP systems, Part 2: Optimizing Apache and PHP</p>
<p><a class="wp-caption" title="Tuning LAMP systems, Part 2: Optimizing Apache and PHP" href="http://digg.com/d38pEi" target="_blank"><span style="text-decoration: underline;"><span style="color: #ff0000;">Tuning LAMP systems, Part 2: Optimizing Apache and PHP</span></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/05/07/tuning-lamp-systems-part-2-optimizing-apache-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux commands</title>
		<link>http://satishgaudo.com/satblog/2010/01/30/linux-commands/</link>
		<comments>http://satishgaudo.com/satblog/2010/01/30/linux-commands/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 07:22:18 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=143</guid>
		<description><![CDATA[
			
				
			
		
sed -i &#8217;s/abc/xyz/g&#8217; *.php
This command is used for mass replacemet using regular expression.
In the above command &#8220;abc&#8221; is replace with &#8220;xyz&#8221; from all the files extension &#8220;php&#8221;.
find /var/www/html/sch_admin/ -mtime -1
This command is used to list all the files within the specified folder,say &#8220;var/www/html/sch_admin/&#8221;, which have been created or modified within the period specified,say &#8220;-1&#8243; which [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F30%2Flinux-commands%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F30%2Flinux-commands%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>sed -i &#8217;s/abc/xyz/g&#8217; *.php</strong><br />
This command is used for mass replacemet using regular expression.<br />
In the above command &#8220;abc&#8221; is replace with &#8220;xyz&#8221; from all the files extension &#8220;php&#8221;.</p>
<p><strong>find /var/www/html/sch_admin/ -mtime -1</strong></p>
<p>This command is used to list all the files within the specified folder,say &#8220;var/www/html/sch_admin/&#8221;, which have been created or modified within the period specified,say &#8220;-1&#8243; which is last one day.</p>
<p><strong>tar xvzf pig-0.5.0.tar.gz</strong><br />
untar the tar.gz file</p>
<p>Add /pig-n.n.n/bin to your path. Use export (bash,sh,ksh) or setenv (tcsh,csh). For example:<br />
<strong> export PATH=/root/pig-0.5.0/bin:$PATH</strong></p>
<p>Set JAVA_HOME as follows using syntax export JAVA_HOME=
<path-to-java>.<br />
If your path is set to /usr/java/jdk1.5.0_07/bin/java, set it as follows:<br />
<strong>export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre</strong></p>
<p>Tip: Use the following command to find out exact path to which java executable under UNIX / Linux:<br />
<strong>$ which java</strong></p>
<p>* export command is used to set environment variable relevant on during the current session</p>
<p>For permanent setup &#8211; edit .bash_profile &#8211; as it get all the vars set on login</p>
<p><strong>vi ~/.bash_profile</strong><br />
<strong>export JAVA_HOME=/usr</strong><br />
<strong>export PATH=/root/pig-0.5.0/bin:$PATH</strong></p>
<p><strong>Display date And time for each command</strong><br />
$ HISTTIMEFORMAT=&#8221;%d/%m/%y %T &#8221;</p>
<p>OR </p>
<p>$ echo &#8216;export HISTTIMEFORMAT=&#8221;%d/%m/%y %T &#8220;&#8216; >> ~/.bash_profile</p>
<p>To see history type:<br />
$ history</p>
<p>Output Sample:<br />
1002  12/03/10 11:50:24 echo &#8216;export HISTTIMEFORMAT=&#8221;%d/%m/%y %T &#8220;&#8216; >> ~/.bash_profile</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/01/30/linux-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
