<?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>Abbas &#124; Bassu</title>
	<atom:link href="http://bashukhan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bashukhan.com</link>
	<description>Life&#039;s having zeros and ones all over</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:00:32 +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>Maildir search at its best!</title>
		<link>http://bashukhan.com/maildir-search-at-its-best/</link>
		<comments>http://bashukhan.com/maildir-search-at-its-best/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 17:47:17 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[maildir searching]]></category>
		<category><![CDATA[mu better than mairix]]></category>
		<category><![CDATA[mu installation on centos 5]]></category>
		<category><![CDATA[mu tools]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=271</guid>
		<description><![CDATA[Search, search and search &#8211; that&#8217;s what we all do in daily inhabitance. When it comes to maildir, the &#8216;mu-tools&#8217; are its best. Mairix is one sort of alternative but mu is quite powerful and more customizable. The only problem is its installation on an RHEL5 based system such as CentOS5. The problem starts on [...]]]></description>
			<content:encoded><![CDATA[<p>Search, search and search &#8211; that&#8217;s what we all do in daily inhabitance. When it comes to maildir, the &#8216;<a href="http://www.djcbsoftware.nl/code/mu/" target="_blank">mu-tools&#8217;</a> are its best. Mairix is one sort of alternative but mu is quite powerful and more customizable. The only problem is its installation on an RHEL5 based system such as CentOS5. The problem starts on the fact that development of mu seems to have happened on a Debian based distro which by all means is more advanced in system core packages. Debian or Ubuntu is meant for the cutting-edge technology with latest up-to-date packages while Red Hat on other side doesn&#8217;t really like to keep all of the system core RPMs most up-to-date till their next major release or at least until then point when there are severe security flaws found in those packages. For example, you found a new tool, check with apt-get; you find it, install 1, 2, 3 and you&#8217;re ready to go! However, that&#8217;s not same thing with RHEL, even after loading bunch of third party repositories. Those who interact with both Debian and Red Hat Enterprise Linux on daily basis may know how difficult installing new applications can become. I hate it whenever this happens. Red Hat chose &#8216;stability&#8217; over &#8216;updates&#8217;. Both of these infrastructures have their own downsides. Perhaps, that&#8217;s the reason why RHEL is widely deployed as server OS comparative to other distributions.</p>
<p>With that said, installation of mu is not that simple. Earlier in mu 0.4 it was a nightmare as I had to go through lots of and different installation errors, but now with thanks to developer Dirk-jan Binnema who fixed a bug for me and made a few changes to leisure its installation, it&#8217;s not that hard if you know the calculated amount of steps involved:</p>
<ul>
<li>Compiling glib 2.24</li>
<li>Compiling and installing xapian and xapin-config</li>
<li>Adding /usr/local/bin/pkg-config to current PKG_CONFIG_PATH</li>
<li> Fixing that notorious bug of &#8220;undefined reference to sqlite3_prepare_v2&#8243; in sqlite-dev package that exists in all RHEL related packages (not needed as version 0.7 eliminates sqlite dependency by using xapian instead)</li>
</ul>
<p>Presuming that you&#8217;ve all compiling and development tools (gcc, gcc++, libtool), installation involves these underlined steps. Try not to use package versions other than the ones mentioned. Trust me, when I say that<strong>.<br />
</strong></p>
<p><em><strong>1. Installing glib2, updating system library and exporting pkg-config path.<br />
</strong></em></p>
<pre class="brush: bash;">
# wget http://ftp.gnome.org/pub/gnome/sources/glib/2.24/glib-2.24.1.tar.gz
# tar zxvf glib-2.24.1.tar.gz
# cd glib-2.24.1/
# ./configure
# make
# make install
# echo &quot;/usr/local/lib/&quot; &gt;&gt; /etc/ld.so.conf.d/glib2-i386.conf
# ldconfig
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
</pre>
<p><em><strong>2. Installing gmime<br />
</strong></em></p>
<pre class="brush: bash;">
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/atrpms-package-config-120-3.el5.i386.rpm
# rpm -ivh atrpms-package-config-120-3.el5.i386.rpm
# yum --enablerepo=atrpms install gmime-2.4.7-1.99 gmime-devel-2.4.7-1.99
</pre>
<p><em><strong>3. Installing xapian</strong></em></p>
<pre class="brush: bash;">
# wget http://centos.karan.org/kbsingh-CentOS-Extras.repo -0 /etc/yum.repos.d/kbsingh-CentOS-Extras.repo
# yum install --enable=kbs-CentOS-Testing xapian-core xapian-core-devel -y
</pre>
<p><em><strong>4. Compiling and installing mu<br />
</strong></em></p>
<pre class="brush: bash;">
# wget http://mu0.googlecode.com/files/mu-0.7.tar.gz
# git clone git://gitorious.org/mu/mu-ng.git
# tar zxvf mu-0.7.tar.gz
# rm -f mu-0.7/src/mu-cmd-index.c
# cp mu-ng/src/mu-cmd-index.c mu-0.7/src/
# cd mu-0.7/
# ./configure
# make
# make install
</pre>
<p>That&#8217;s all you need to get started. There&#8217;s no other tool like &#8216;mu view&#8217; (formerly mu-msginfo) for getting instant command line outputs of an email formatted in maildir format. I instantly fell in love with it when I first used.<br />
Wish a nice playing with it! <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/maildir-search-at-its-best/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PC speaker and CentOS 5</title>
		<link>http://bashukhan.com/pc-speaker-and-centos-5/</link>
		<comments>http://bashukhan.com/pc-speaker-and-centos-5/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 16:16:35 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux beep melodies]]></category>
		<category><![CDATA[pc beep stop in kernel 2.6.18.164]]></category>
		<category><![CDATA[pc speaker not working in centos 5]]></category>
		<category><![CDATA[pcspkr]]></category>

		<guid isPermaLink="false">http://bashukhan.com/pc-speaker-and-centos-5/</guid>
		<description><![CDATA[Ah, I just was lazy the other day and surfing around while I came across some pfSense stuff. I remembered the way it belled the beeps during startups and shutdowns being one of the good things that I liked about when I had it (yea, it pretty much sucked in my dual wan environment as [...]]]></description>
			<content:encoded><![CDATA[<p>Ah, I just was lazy the other day and surfing around while I came across some pfSense stuff. I remembered the way it belled the beeps during startups and shutdowns being one of the good things that I liked about when I had it (yea, it pretty much sucked in my dual wan environment as a load balancer so I tried to switching to ClearOS, of course an RHEL5 based firewall; nevertheless I totally agree to what Linus once said &#8216;I claim that Mach people (and apparently FreeBSD) are incompetent  idiots&#8217;) like you instantly click good features of a thing when you think about anything in first few thoughts. This is sometime really helpful for home-servers which don&#8217;t always have a monitor plugged into their consoles.</p>
<p>As I used &#8216;beep&#8217; program already a few times in Ubuntu I knew it would be interesting to use it with new &#8216;-n&#8217; feature instead of using issuing beep command for an each frequency beep. That is, the whole script here at<a href="http://redmine.pfsense.org/repositories/annotate/pfsense/usr/local/bin/beep.sh" target="_blank"> http://redmine.pfsense.org/repositories/annotate/pfsense/usr/local/bin/beep.sh</a> can be translated into a single beep command of:</p>
<pre class="brush: bash;">
beep -f 500 -l 155 -n -f 400 -l 155 -n -f 600 -l 155 -n -f 800 -l 155 -n -f 800 -l 155 -n -f 600 -l 155 -n -f 800 -l 155 -n -f 500 -l 155 -n -f 400 -l 155 -n -f 400 -l 155
</pre>
<p>But after installing beep and running didn&#8217;t make any sound. I witnessed that spkr kernel module as well as the motherboard speaker were well being detected but still no sound. After investigating, it turns out that its bug in kernel earlier than 2.6.18-164 interestingly using external speakers instead of PC&#8217;s internal one for producing system bells. Basically its a bug called as an &#8216;aggression&#8217; for a feature that breaks of with any newer kernel release. I saw multiple bugs relating to the problem in Red Hat&#8217;s bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=532444, https://bugzilla.redhat.com/show_bug.cgi?id=525390 and https://bugzilla.redhat.com/show_bug.cgi?id=526751. So, I hit upon the CentOS 5&#8242;s lastest kernel, 2.6.18-194.8.1.el5 and that gave me back my system beeps <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>[root@Bassu ~]# dmesg | grep -i &#8216;speaker&#8217;<br />
input: PC Speaker as /class/input/input2<br />
[root@Bassu ~]# lsmod | grep -i spkr<br />
pcspkr                  7105  0</p>
<p>Almost I finished adding beeps in rc.local and shutdown, I stumbled upon a good init script which I modified a bit and added chkconfig parameters so it can be added into RHEL&#8217;s ntsysv services &#8211; exactly what I needed! Then I found another beep melody for Beethoven&#8217;s theme <img src='http://bashukhan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: bash;">
beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 880 -l 230 -n -f 659 -l 230 -n -f 587 -l 230 -n -f 659 -l 460 -n -f 988 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 1047-l 230 -n -f 988 -l 230 -n -f 784 -l 230 -n -f 659 -l 230 -n -f 988 -l 230 -n -f 1318 -l 230 -n -f 659 -l 110 -n -f 587 -l 230 -n -f 587 -l 110 -n -f 494 -l 230 -n -f 740 -l 230 -n -f 659 -l 460
</pre>
<p>Add below script to file, /etc/init.d/beep, make it executable and do a &#8216;chkconfig &#8211;add beep&#8217; to add it as a system service.</p>
<pre class="brush: bash;">
#!/bin/sh
# chkconfig: 2345 95 20
# description: Beep PC speaker with analog melody on startup and stoppage
#
# processname: beep
NAME=beep
BEEP=/usr/bin/$NAME
MELODY_START=&quot;-f 65.4064 -l 100 -n -f 130.813 -l 100 -n -f 261.626 -l 100 -n -f 523.251 -l 100 -n -f 1046.50 -l 100 -n -f 2093.00 -l 100 -n -f 4186.01 -l 100&quot;
MELODY_STOP=&quot;-f 523.251 -l 100 -D 100 -n -f 391.995 -l 100 -D 100 -n -f 329.628 -l 100 -D 100 -n -f 261.626 -l 200&quot;
SCRIPTNAME=/etc/init.d/$NAME
#ARGS=&quot;-e /dev/input/event0&quot;
# Exit if the package is not installed
[ -x &quot;$BEEP&quot; ] || exit 0
case &quot;$1&quot; in
 start)
 $BEEP $ARGS $MELODY_START
 ;;
 stop)
 $BEEP $ARGS $MELODY_STOP
 ;;
 restart|force-reload)
 # Do nothing
 ;;
 *)
 echo &quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&quot; &gt;&amp;2
 exit 3
 ;;
esac
</pre>
<p><strong>With that said, coming out of Mario world and now going back to my laziness <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </strong></p>
<p><span style="text-decoration: underline;"><em><span style="color: #000080;"><strong>UPDATE:</strong></span></em></span></p>
<p>Talking about the Mario, I just created its beep command from some random junk of frequencies I found. So, here it goes:</p>
<pre class="brush: bash;">
beep -f 330 -l 137 -n -f 330 -l 275 -n -f 330 -l 137 -d 137 -n -f 262 -l 137 -n -f 330 -l 275 -n -f 392 -l 550 -d 550 -n -f 262 -l 412 -n -f 196 -l 137 -d 275 -n -f 164 -l 137 -d 137 -n -f 220 -l 275 -n -f 247 -l 137 -d 137 -n -f 233 -l 137 -n -f 220 -l 275 -n -f 196 -l 205 -n -f 330 -l 205 -n -f 392 -l 275 -n -f 440 -l 275 -n -f 349 -l 137 -n -f 392 -l 137 -d 137 -n -f 330 -l 275 -n -f 262 -l 137 -n -f 294 -l 137 -n -f 247 -l 412 -n -f 262 -l 412 -n -f 196 -l 137 -d 275 -n -f 164 -l 275 -d 137 -n -f 220 -l 275 -n -f 247 -l 137 -d 137 -n -f 233 -l 137 -n -f 220 -l 275 -n -f 196 -l 205 -n -f 330 -l 205 -n -f 392 -l 275 -n -f 440 -l 275 -n -f 349 -l 137 -n -f 392 -l 137 -d 137 -n -f 330 -l 275 -n -f 262 -l 137 -n -f 294 -l 137 -n -f 247 -l 412 -d 275 -n -f 392 -l 137 -n -f 370 -l 137 -n -f 349 -l 137 -n -f 311 -l 275 -n -f 330 -l 137 -d 137 -n -f 207 -l 137 -n -f 220 -l 137 -n -f 262 -l 137 -d 137 -n -f 220 -l 137 -n -f 262 -l 137 -n -f 294 -l 137 -d 275 -n -f 392 -l 137 -n -f 370 -l 137 -n -f 349 -l 137 -n -f 311 -l 275 -n -f 330 -l 137 -d 137 -n -f 523 -l 275 -n -f 523 -l 137 -n -f 523 -l 550 -n -f 392 -l 137 -n -f 370 -l 137 -n -f 349 -l 137 -n -f 311 -l 275 -n -f 330 -l 137 -d 137 -n -f 207 -l 137 -n -f 220 -l 137 -n -f 262 -l 137 -d 137 -n -f 220 -l 137 -n -f 262 -l 137 -n -f 294 -l 137 -d 275 -n -f 311 -l 275 -d 137 -n -f 294 -l 275 -n -f 262 -l 550 -d 550
</pre>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="350" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/42fsPaAkcag" /><embed type="application/x-shockwave-flash" width="350" height="300" src="http://www.youtube.com/v/42fsPaAkcag"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/pc-speaker-and-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple mistakes</title>
		<link>http://bashukhan.com/simple-mistakes/</link>
		<comments>http://bashukhan.com/simple-mistakes/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 08:32:49 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[folder permissions supercede filer permissions in linux]]></category>
		<category><![CDATA[linux permissions inheritence]]></category>
		<category><![CDATA[most common cause of permission denied bash]]></category>
		<category><![CDATA[root directory permissions]]></category>
		<category><![CDATA[simple mistake]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=253</guid>
		<description><![CDATA[I think there&#8217;s at least a time in human-being&#8217;s life when you feel impugned about the time that single small error, but really hard to be traced, wastes, obstructs and then makes you silly. Even an expert cannot deny this fact. In Linux, this could be more idiotic after you find out that the you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bashukhan.com/wp-content/uploads/2010/07/mistake_21-e1278317852697.gif" rel="lightbox[253]"><img class="alignleft size-full wp-image-255" title="mistake_2" src="http://bashukhan.com/wp-content/uploads/2010/07/mistake_21-e1278317852697.gif" alt="" width="160" height="147" /></a>I think there&#8217;s at least a time in human-being&#8217;s life when you feel impugned about the time that single small error, but really hard to be traced, wastes, obstructs and then makes you silly. Even an expert cannot deny this fact. In Linux, this could be more idiotic after you find out that the you already knew about how basic and simple the error was made of! Anyone having a basic know-how of Linux filesystem may know that <em><strong>directory permissions supercede file permissions.</strong></em> For instance, you may forgot to check permissions on all preceding directories, specially the root mount point, when it&#8217;s getting &#8216;permissions denied&#8217; error even having all rwx permissions on it. Despite the fact being simply understandable, it took time to find out that  the permissions of &#8216;/&#8217; root directory mount point were the culprits.</p>
<pre class="brush: bash;">
$ ssh -vl abbas 10.10.10.251

Last login: Mon Jul  5 03:58:16 2010 from 10.10.10.243
Could not chdir to home directory /home/abbas: Permission denied
/bin/bash: Permission denied
debug1: channel 0: free: client-session, nchannels 1
Connection to 10.10.10.251 closed.
Transferred: sent 2048, received 2072 bytes, in 0.0 seconds
Bytes per second: sent 51120.7, received 51719.8
debug1: Exit status 1

# stat /
File: `/'
Size: 4096          Blocks: 16         IO Block: 4096   directory
Device: fd00h/64768d    Inode: 2           Links: 23
Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-07-04 04:02:02.000000000 -0400
Modify: 2010-07-02 10:14:43.000000000 -0400
Change: 2010-07-05 03:58:50.000000000 -0400
</pre>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/simple-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nothing compares to a traditional tubewell!</title>
		<link>http://bashukhan.com/nothing-compares-to-a-traditional-tubewell/</link>
		<comments>http://bashukhan.com/nothing-compares-to-a-traditional-tubewell/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 22:05:01 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bore 150 feet]]></category>
		<category><![CDATA[mango granden]]></category>
		<category><![CDATA[tubewell]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=224</guid>
		<description><![CDATA[What do you guys say? Yea, don&#8217;t expect mangoes when you plant papayas. So, this weekend was really exciting. Had a chance to visit our village with brothers. The most enthusiastic part, of course, a bathe in the traditional tubewell. No matter how advance technology has gone through, no mater what stylish wadding pools you&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010018.jpg" rel="lightbox[224]"><img class="size-medium wp-image-225 alignleft" title="sm-26062010018" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010018-300x225.jpg" alt="" width="300" height="225" /></a> What do you guys say? Yea, don&#8217;t expect mangoes when you plant papayas.<br />
So, this weekend was really exciting. Had a chance to visit our village with brothers. The most enthusiastic part, of course, a bathe in the traditional tubewell. No matter how advance technology has gone through, no mater what stylish wadding pools you&#8217;ve &#8211; if you&#8217;ve once been under the sheer burst of cool water being pushed from the heart of earth and then pressuring your skin, you&#8217;ll be blown out of your mind and would forget modern swimming deluge. If don&#8217;t know <a href="http://en.wikipedia.org/wiki/Tube_well" target="_blank">what it is</a>, it&#8217;s just a modified form of a motor water-well pump with a small or large housing reservoir built out of it to hold water for a while but having adjusted drainages that keep water fresh while it flows off to fields to irrigate them, which of course is main purpose of having any pump in village fields.</p>
<p>Ours is just in the middle of mango trees&#8217; garden and it makes the whole adventure quite more fascinating than fun, it sounds <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  The borehole of well is more than 150 feet and seeing it from top makes your vision a bit dizzy and you can fall off right into it if you&#8217;re seeing by bending yourself. I&#8217;m afraid of heights but that doesn&#8217;t mean I may also be afraid of depths (holly shame-o, lol) but that&#8217;s exactly this level of depth does. It&#8217;s illusionary. So, I had to sit down, pull my hand above this 20&#8242; diameter of wide-open hole and take a snap from there, lol <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  But that&#8217;s not much scary if you go down by downstairs&#8217; side. Pump that throws water up is a 4HP.</p>
<p style="text-align: center;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010028.jpg" rel="lightbox[224]"><img class="aligncenter size-medium wp-image-233" title="sm-26062010028" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010028-300x225.jpg" alt="" width="300" height="225" /></a>There&#8217;s small sort of control room out of it that&#8217;s closed most of the times unless there&#8217;s a problem. In summer it runs all day usually! Then there&#8217;s when fun begins. When you put your head under full speed blowing  water, you get your ears and nose full of water. As water in reservoir was full up to my neck and above all its floor was slippery, I really cannot withstand compelling force of blazingly cold water and fell off couple of times. Hilarious but funny as hell! Check out rest of the snaps, while I try to find out a way of eating these mangoes floating on icy water in this bucket. You really don&#8217;t get mangoes if you seed papayas <img src='http://bashukhan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  !!!</p>
<p><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010020.jpg" rel="lightbox[224]"><img class="aligncenter size-medium wp-image-234" title="sm-26062010020" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010020-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010067.jpg" rel="lightbox[224]"><img class="size-medium wp-image-239 alignleft" title="sm-26062010067" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010067-300x127.jpg" alt="" width="300" height="127" /></a></p>
<p style="text-align: center;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/ss.png" rel="lightbox[224]"><img class="aligncenter size-medium wp-image-244" title="ss" src="http://bashukhan.com/wp-content/uploads/2010/06/ss-300x224.png" alt="" width="300" height="224" /></a></p>
<p style="text-align: left;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010035.jpg" rel="lightbox[224]"><img class="size-medium wp-image-236 alignleft" title="sm-26062010035" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010035-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010048.jpg" rel="lightbox[224]"><img class="aligncenter size-medium wp-image-237" title="sm-26062010048" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010048-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010055.jpg" rel="lightbox[224]"><img class="size-medium wp-image-238 alignleft" title="sm-26062010055" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010055-225x300.jpg" alt="" width="225" height="300" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: center;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010070.jpg" rel="lightbox[224]"><img class="aligncenter size-medium wp-image-240" title="sm-26062010070" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010070-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;"><a href="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010071.jpg" rel="lightbox[224]"><img class="size-medium wp-image-241 alignleft" title="sm-26062010071" src="http://bashukhan.com/wp-content/uploads/2010/06/sm-26062010071-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/nothing-compares-to-a-traditional-tubewell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mother India &#8211; copyrights?</title>
		<link>http://bashukhan.com/mother-india-copyrights/</link>
		<comments>http://bashukhan.com/mother-india-copyrights/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 03:56:56 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[free download]]></category>
		<category><![CDATA[Mother india]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=218</guid>
		<description><![CDATA[While I was listening to the song &#8216;Dunya mai aey ho tou jina hi paray ga&#8217; (you&#8217;ll have to live if you came in this world), I came across to one of the finest technicolor prints of Mother India movie. The original source of print of the legendary movie is unknown but yet one of [...]]]></description>
			<content:encoded><![CDATA[<p>While I was listening to the song &#8216;Dunya mai aey ho tou jina hi paray ga&#8217; (you&#8217;ll have to live if you came in this world), I came across to one of the finest technicolor prints of Mother India movie. The original source of print of the legendary movie is unknown but yet one of the bests I&#8217;ve ever seen so far! As old movies&#8217; copyrights are a lot gloomier than the modern ones, I&#8217;ve decided to share this movie as I couldn&#8217;t find any recent copyright owners or any proclamation for this film despite searching. It was released in 1957 and is first Indian movie to win an Oscar.  I&#8217;m going to post a link of it soon by the end of this weekend or as soon as I get some time.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/mother-india-copyrights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Highly transparent Squid proxy.</title>
		<link>http://bashukhan.com/highly-transparent-squid-proxy/</link>
		<comments>http://bashukhan.com/highly-transparent-squid-proxy/#comments</comments>
		<pubDate>Thu, 27 May 2010 16:14:03 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[forwarded_for]]></category>
		<category><![CDATA[highly transparent squid proxy]]></category>
		<category><![CDATA[via]]></category>

		<guid isPermaLink="false">http://bashukhan.com/highly-transparent-squid-proxy/</guid>
		<description><![CDATA[Most of the times you don&#8217;t want to show off the proxy server reference in your web requests despite the fact that it&#8217;s main purpose of any proxy software, for many reasons. With Squid 2.6, its quite easy to do. Add this to squid.conf. via off forwarded_for off And then the below &#8216;via&#8217; entity would [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the times you don&#8217;t want to show off the proxy server reference in your web requests despite the fact that it&#8217;s main purpose of any proxy software, for many reasons. With Squid 2.6, its quite easy to do. Add this to squid.conf.</p>
<pre class="brush: bash;">
via off
forwarded_for off
</pre>
<p>And then the below &#8216;via&#8217; entity would disappear from web header requests being sent from a web browser making recipient webservers unaware of the intermediary proxy location, you&#8217;re coming from!</p>
<p><a href="http://bashukhan.com/wp-content/uploads/2010/05/Squid_via_forwarded_for.png" rel="lightbox[206]"><img class="size-medium wp-image-216 alignleft" title="Squid_via_forwarded_for" src="http://bashukhan.com/wp-content/uploads/2010/05/Squid_via_forwarded_for-300x213.png" alt="" width="300" height="213" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/highly-transparent-squid-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crontab and Unicode Characters</title>
		<link>http://bashukhan.com/crontab-and-unicode-characters/</link>
		<comments>http://bashukhan.com/crontab-and-unicode-characters/#comments</comments>
		<pubDate>Sat, 08 May 2010 14:02:03 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[unicode characters not working in bash cron]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=187</guid>
		<description><![CDATA[Crontab in Linux likes to keep its own shell environment and this can really cause frustrating problems with output of your cron jobs if they don&#8217;t get fixed as its too much ironic to see not the same behiviour of your shell scripts when they are run in crons than to what you normally see [...]]]></description>
			<content:encoded><![CDATA[<p>Crontab in Linux likes to keep its own shell environment and this can really cause frustrating problems with output of your cron jobs if they don&#8217;t get fixed as its too much ironic to see not the same behiviour of your shell scripts when they are run in crons than to what you normally see in a bash.</p>
<p>I was running a script that included a few of other scripts and it was not showing unicode characters properly when it ran as in a cron. Solution is to include &#8216;export LANG=en_US.UTF-8&#8242; in  your shell script but the ideal way to do so I found was to pass on this environment variable directly in command parameter of a cron job.</p>
<p>The unicode character that was missing earlier &#8216;<a title="http://en.wikipedia.org/wiki/Degree_symbol" href="http://" target="_blank">degree</a>&#8216; symbol became visible as soon as I added the variable LANG=en_US.UTF-8 to crontab&#8217;s command.</p>
<pre class="brush: bash;">
# crontab -l
MAILTO=&quot;&quot;
57 9 * * * LANG=en_US.UTF-8 /root/back/hdd-report/report
</pre>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/crontab-and-unicode-characters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Messy Mesh</title>
		<link>http://bashukhan.com/messy-mesh/</link>
		<comments>http://bashukhan.com/messy-mesh/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 07:24:07 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[mess of cables]]></category>
		<category><![CDATA[photoblog]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=178</guid>
		<description><![CDATA[Just a teaser of being messy I can literally pinpoint each cable for where its going and what it does]]></description>
			<content:encoded><![CDATA[<p>Just a teaser of being messy <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I can literally pinpoint each cable for where its going and what it does <img src='http://bashukhan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://bashukhan.com/wp-content/uploads/2010/04/mess.jpg" rel="lightbox[178]"><img class="size-medium wp-image-177  aligncenter" title="mess" src="http://bashukhan.com/wp-content/uploads/2010/04/mess-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/messy-mesh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Raid tidbits &#8211; Monitoring all raid events and changing default email template</title>
		<link>http://bashukhan.com/more-raid-tidbits-monitoring-all-raid-events-and-changing-default-email-template/</link>
		<comments>http://bashukhan.com/more-raid-tidbits-monitoring-all-raid-events-and-changing-default-email-template/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:27:41 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[check all raid events]]></category>
		<category><![CDATA[customize default raid mdadm email template]]></category>
		<category><![CDATA[mdadm monitor warning level events]]></category>
		<category><![CDATA[monitor all raid events linux]]></category>
		<category><![CDATA[photoblog]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=157</guid>
		<description><![CDATA[A geek really knows the importance of his or her data and backups that just avoids pulling the hair off! When one of my hard drives on a server just died after having a well served 6000+ hours of life span, I found myself really lucky as other array component of RAID1 came to the [...]]]></description>
			<content:encoded><![CDATA[<p>A geek really knows the importance of his or her data and backups that just avoids pulling the hair off! When one of my hard drives on a server just died after having a well served 6000+ hours of life span, I found myself really lucky as other array component of RAID1 came to the rescue. Reason was a perhaps a short circuit which could have cost me the biggest loss of my data ever, I had in my life, so a blazing smile was well deserved. Electric power is one of the infinite things that doesn&#8217;t work here like it always (oh, its a long story &#8211; I should tell some of it sometime later)!</p>
<p>I got an email from mdmonitor telling me about DegradedArray event. So, when I was rebuilding the array, I noticed I got no alerts about rebuild process or  array status updates which I really wanted to investigate. Till that time, I wasn&#8217;t event knowing that &#8216;mdadm &#8211;monitor&#8217; only sends you the critical updates. So, I pulled up man pages and saw these are critical events:</p>
<ul>
<li>DeviceDisappeared</li>
<li> Fail</li>
<li> FailSpare</li>
<li> DegradedArray</li>
</ul>
<p>Rest of the events are not reported at all! Also, that RHEL5&#8242;s mdadm package has pre-compiled template of email that mdadm sends upon occurrence of a critical event which I wanted to change from as well cause it looks pretty immature:</p>
<pre class="brush: bash;">
This is an automatically generated mail message from mdadm running on HOSTNAME
A DegradedArray event had been detected on md device /dev/md1.
Faithfully yours, etc.

P.S. The /proc/mdstat file currently contains the following:
bla bla bla
</pre>
<p>Seriously, it says &#8220;faithfully&#8221;&#8230; wth? Lol. We know that all machines are faithful to a human unless they&#8217;re not broken or gay! <img src='http://bashukhan.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  It definitely needed to be changed. Checking /etc/init.d/mdmonitor at least gave an idea that its not something changeable but it uses default template when MAILADDR is specified while it doesn&#8217;t when PROGRAM parameter is used in /etc/mdadm.conf by passing on RAID array as arguments to the script which is used, instead.</p>
<p>I did this then.</p>
<pre class="brush: bash;">

# mdadm --detail --scan &gt;&gt; /etc/mdadm.conf

# echo &quot;PROGRAM /etc/raidalerter&quot; &gt;&gt; /etc/mdadm.conf
# sed -e '1i\DEVICE partitions' -i  /etc/mdadm.conf
# cat /etc/raidalerter    (create this file with below script)

#!/bin/bash
echo -e &quot;Likely an unfavourable or a bad thing just happened to your RAID. Even if its recovering, it was a bad thing which caused this! \n\n\n&quot; $(cat -A /proc/mdstat | sed 's/\$/\\n/g') | mail -s &quot;$1 on $2 $3 at $HOSTNAME&quot; some-mail-address@example.com

# chmod +x /etc/raidalerter
# service mdmonitor restart
</pre>
<p>Provided that you&#8217;ve an MTA working fine, mails would be delivered upon any of RAID incidents to the maximum verbosity possible. I don&#8217;t think that any of the hardware raids does so?!<br />
I then tested it on a small array to make sure that alerts are deliverable.</p>
<pre class="brush: bash;">

# mdadm /dev/md0 -f /dev/sdb1 -r /dev/sdb1
mdadm: set /dev/sdb1 faulty in /dev/md0
mdadm: hot removed /dev/sdb1
# mdadm /dev/md0 -a /dev/sdb1
mdadm: re-added /dev/sdb1
</pre>
<p><a href="http://bashukhan.com/wp-content/uploads/2010/03/Mdmonitor-Report-all-mdadm-monitor-events-.png" rel="lightbox[157]"><img class="aligncenter size-full wp-image-165" title="Mdmonitor - Report all mdadm monitor events" src="http://bashukhan.com/wp-content/uploads/2010/03/Mdmonitor-Report-all-mdadm-monitor-events-.png" alt="" width="693" height="292" /></a></p>
<p><strong>Preview: </strong></p>
<p>Subject: RebuildFinished on /dev/md0 at ToughGuy<br />
Likely an unfavorable or a bad thing just happened to your RAID. Even if its recovering, it was a bad thing which caused this!   Personalities :</p>
<p>[raid1]<br />
md1 : active<br />
raid1 sdb3[1] sda3[0]<br />
724555520 blocks [2/2] [UU]<br />
md0 : active<br />
raid1 sdb1[1] sda1[0]<br />
4008064 blocks [2/2] [UU]<br />
unused devices: &lt;none&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/more-raid-tidbits-monitoring-all-raid-events-and-changing-default-email-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux System Variables</title>
		<link>http://bashukhan.com/linux-system-variables/</link>
		<comments>http://bashukhan.com/linux-system-variables/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:53:50 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash environment variables]]></category>
		<category><![CDATA[linux built-in variables]]></category>

		<guid isPermaLink="false">http://bashukhan.com/?p=155</guid>
		<description><![CDATA[Ever wanted to list down all of system built-in global or local variables stored for your shell? Well, it can be with &#8216;env&#8216; and &#8216;set&#8216; commands. The env lists global variables and set lists local ones. Difference between the two is that, global variables are built-in into any shell while local variables include the ones [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to list down all of system built-in global or local variables stored for your shell? Well, it can be with &#8216;<strong>env</strong>&#8216; and &#8216;<strong>set</strong>&#8216; commands.<br />
The env lists global variables and set lists local ones. Difference between the two is that, global variables are built-in into any shell while local variables include the ones which are set by different applicatons. Such as MAILCHECK (which controls mail checking frequency and informs shell prompt when new mail arrives), only appears in &#8216;set&#8217; command&#8217;s output.</p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/linux-system-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
