<?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>Ehsan Nourbakhsh’s Blog &#187; *nix</title>
	<atom:link href="http://www.nourbakhsh.ir/blog/category/nix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nourbakhsh.ir/blog</link>
	<description></description>
	<lastBuildDate>Tue, 18 May 2010 00:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>mininetstumbler on PDA device</title>
		<link>http://www.nourbakhsh.ir/blog/2007/08/mininetstumbler-on-pda-device/</link>
		<comments>http://www.nourbakhsh.ir/blog/2007/08/mininetstumbler-on-pda-device/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 00:49:32 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.nourbakhsh.ir/blog/archives/63</guid>
		<description><![CDATA[I am using a set of iPaq devices for some of my experiments here in UTD Distributed Systems lab. One of the devices is running WindowsCE 2003, the rest are running Familiar Distribution Linux. The WinCE one is collecting data about available wireless networks using mini-Netstumbler. The data gathered is not precise, but at the [...]]]></description>
			<content:encoded><![CDATA[<p>I am using a set of iPaq devices for some of my experiments here in <a href="http://dslab.utdallas.edu/" title="University of Texas at Dallas, Distributed Systems lab">UTD Distributed Systems lab</a>. One of the devices is running WindowsCE 2003, the rest are running <a href="http://familiar.handhelds.org/" title="Familiar Distribution of Linux for Handheld devices">Familiar Distribution Linux</a>. The WinCE one is collecting data about available wireless networks using <a href="http://www.netstumbler.com/about/">mini-Netstumbler</a>. The data gathered is not precise, but at the moment I only need only a general idea.</p>
<p style="text-align: center"><a href="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/img_2528.JPG" title="Linux and WinCE iPaqs" rel="lightbox"><img src="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/img_2528.thumbnail.JPG" alt="Linux and WinCE iPaqs" /></a></p>
<p>There have been a couple of problems about using the devices, which I will try to document here from now on. The first thing to note is about mini-Netstumbler. Netstumbler is &#8220;a tool for Windows that facilitates detection of Wireless LANs using the 802.11b, 802.11a and 802.11g WLAN standards&#8221;. In general Netstumbler needs a compatible device to be able to report noise levels. I was lucky to have an old SanDisk CompactFlash WiFi card which is able to report noise level.</p>
<p>I used a converter to connect the CompactFlash WiFi card to my notebook using the PCMCIA slot. Netstumbler under Windows XP was able to use this card without any other change. Below is a screenshot of Netstumbler.</p>
<p align="center"> <a href="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/overall.PNG" title="Changes of noise/signal level during experiment" rel="lightbox"><img src="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/overall.thumbnail.PNG" title="Changes of noise/signal level during experiment" alt="Changes of noise/signal level during experiment" border="0" height="119" width="164" /></a></p>
<p align="left">Running miniNetstumbler  needed one extra step. If you do not know this you may easily waste some hours. I had to to go to network settings, and add a wireless network setting with ESSID &#8220;<strong><em>ANY</em></strong>&#8220;, without encryption. Then connected to this &#8220;network&#8221; and ran miniNetstumbler. If you do not use the &#8220;ANY&#8221; network, you will see only statistics of the network you are connected to and not other networks.</p>
<p style="text-align: center"><a href="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/img_2524.JPG" title="iPaq WinCE screen, for network ANY" rel="lightbox"><img src="http://www.nourbakhsh.ir/blog/wp-content/uploads/2007/08/img_2524.thumbnail.JPG" title="iPaq WinCE screen, for network ANY" alt="iPaq WinCE screen, for network ANY" border="0" height="175" width="133" /></a></p>
<p align="left"> I will try to post more about these later.</p>
<p align="left"><font color="#ff0000">UPDATE:</font> The list of compatible devices provided by NetStumbler is *not* updated. I got a Linksys WUSBGV4 through the link in <a href="http://stumbler.net/compat/" title="NetStumbler Compatibility list">www.stumbler.com/compat</a> but it does not work with NetStumbler.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nourbakhsh.ir/blog/2007/08/mininetstumbler-on-pda-device/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lam-MPI</title>
		<link>http://www.nourbakhsh.ir/blog/2006/08/lam-mpi/</link>
		<comments>http://www.nourbakhsh.ir/blog/2006/08/lam-mpi/#comments</comments>
		<pubDate>Tue, 22 Aug 2006 15:40:03 +0000</pubDate>
		<dc:creator>ehsan</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://test3.nourbakhsh.ir/blog/archives/22</guid>
		<description><![CDATA[While I was in ADA lab, we had all sort of problems with running lam-mpi across our nodes. Anyway, it was worth it and was quiet fun sometimes to work with it. You can find good tutorials here on their website, but even after reading these you may encounter some unexpected problems. How to solve [...]]]></description>
			<content:encoded><![CDATA[<p>While I was in <a href="http://ada.ce.sharif.edu">ADA lab</a>, we had all sort of problems with running <a href="http://www.lam-mpi.org/">lam-mpi </a> across our nodes. Anyway, it was worth it and was quiet fun sometimes to work with it.</p>
<p><img src="http://www.nourbakhsh.ir/blog/wp-content/uploads/2006/08/mpi-clouds.jpg" alt="MPI Cloud" /></p>
<p>You can find good tutorials <a href="http://www.lam-mpi.org/tutorials/">here on their website</a>, but even after reading these you may encounter some unexpected problems. How to solve theseproblems? Always <strike>Google them</strike> use Google search engine to find the solution.</p>
<p>As you know, if you know lam-mpi, you should &#8220;wipe&#8221; the mp-cloud clean if you want to stop it; or if you want to restart it. It uses <a href="http://en.wikipedia.org/wiki/Remote_Shell">RSH</a> which is sometimes not very easy to deal with. I wrote some scripts to ease the start-up and cleaning process.</p>
<p><span id="more-22"></span></p>
<p>The following script first pings the broadcast address and gets currently available nodes. Then updates the lamhosts file. Next uses the updated lamhosts file to wipe the network clean, and run lam-mpi again. You can optionally instruct i not to update the lamhosts file.</p>
<p>This is the <em>probe</em> script:</p>
<p class="codebox"> #!/bin/bash<br />
#clear<br />
RES=`ping -b -c 10 192.168.0.255 | awk &#8216;{print $4}&#8217; | grep 192 | uniq | awk -F: &#8216;{print $1}&#8217; | sort -n | uniq `for i in $RES; do<br />
echo $i;<br />
done</p>
<p>This one is the <em>lam-run</em> script, which uses the previous one:</p>
<p class="codebox"> #!/bin/bash<br />
OPTION=&#8221;-c&#8221;;<br />
LAMHOSTS=&#8221;/home/user01/lamhosts&#8221;export LAMRSH=&#8221;rsh&#8221;</p>
<p>if [ -z $1 ]; then<br />
echo &#8220;usage: $0 {-c:update config and restart | -d: restart only}&#8221;<br />
exit<br />
fi;</p>
<p>cat &gt; $LAMHOSTS &lt;<eof><br />
EoF</eof></p>
<p>if [ $1 = $OPTION ]; then<br />
echo -e &#8220;updating lamhosts:\n&#8221;;<br />
for i in `/bin/bash /usr/local/bin/ada/probe`; do<br />
echo -e &#8220;$i\t user01&#8243;  &gt;&gt; $LAMHOSTS;<br />
done;<br />
fi;</p>
<p>echo -e &#8220;\nStopping previsou run, if any\n&#8221;<br />
/usr/bin/lamhalt<br />
/usr/bin/wipe $LAMHOSTS<br />
echo &#8220;DONE&#8221;<br />
echo -e &#8220;\nrunning lamboot&#8221;<br />
lamboot -d $LAMHOSTS<br />
echo &#8220;DONE&#8221;</p>
<p>Also, I had a <em>copier</em> script to copy the necessary files to all clients using rcp:</p>
<p class="codebox"> #!/bin/bashif [ -z $1 ] ||[ -z $2  ]; then<br />
echo -e &#8220;This script lets you copy a file to every client\n&#8221;;<br />
echo -e &#8220;usage: $0 PATH-TO-LOCAL-FILE PATH-ON-EACH-CLIENT\n&#8221;<br />
echo -e &#8220;example: $0 /tmp/file /home/user01/remote&#8221;<br />
exit;<br />
fi;</p>
<p>for i in `/usr/local/bin/ada/probe`; do<br />
if [ $i = "192.168.0.100" ]; then<br />
continue;<br />
fi;<br />
echo &#8220;copying file to $i&#8221;<br />
/usr/bin/rcp $1 $i:$2;<br />
done;</p>
<p>These are not appealing as scripts, I know. But were quiet handy and helped us alot. I had a directory for these in <em>/usr/local/bin/ada/</em>, and our clients had IP addresses in <em>192.168.0.100/24</em> range. These scripts are written based on these facts. It is easy to update them for your local network, if interested.</p>
<p>We had some other problems that I will add here whenever I remember them, but for the moment:</p>
<ul>
<li><strong>poll: protocol failure in circuit setup</strong></li>
<p>if you see</p>
<p class="codebox">poll: protocol failure in circuit setup</p>
<p>when you try to run a simple rsh command like</p>
<p class="codebox">rsh 192.168.0.101 -n -d -l user01 echo $SHELL</p>
<p> but you can login to the remote client using</p>
<p class="codebox">rsh 192.168.0.101</p>
<p> try turning off you firewall on both sides first, and then try again.  If this is the case, try something like this in your firewall rules:</p>
<p class="codebox">-A INPUT -i eth0 -j ACCEPT</p>
<p>where eth0 is connected to your internal network of lam nodes.</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.nourbakhsh.ir/blog/2006/08/lam-mpi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP stops suddenly on FreeBSD after restart</title>
		<link>http://www.nourbakhsh.ir/blog/2006/05/php-stops-suddenly-on-freebsd-after-restart/</link>
		<comments>http://www.nourbakhsh.ir/blog/2006/05/php-stops-suddenly-on-freebsd-after-restart/#comments</comments>
		<pubDate>Sun, 14 May 2006 17:24:40 +0000</pubDate>
		<dc:creator>ehsan</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://test3.nourbakhsh.ir/blog/archives/13</guid>
		<description><![CDATA[If you are a happy sysadmin of a FreeBSD machine with apache+php installed, watch out these days! After the new PHP 5.1.4 update last week, one of the servers was not restarted. When it was, Apache kindly served PHP as plain text! Fortunately, Babak was around to &#8220;make config&#8221; apache and make world a better [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a happy sysadmin of a FreeBSD machine with apache+php installed, watch out these days! After the new PHP 5.1.4 update last week, one of the servers was not restarted. When it was, Apache kindly served PHP as plain text!</p>
<p>Fortunately, <a href="http://www.farrokhi.net/blog/">Babak</a> was around to &#8220;make config&#8221; apache and make world a better place to live.</p>
<p>I found a forum thread with more details <a href="http://www.forbiddenweb.org/viewtopic.php?id=95110">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nourbakhsh.ir/blog/2006/05/php-stops-suddenly-on-freebsd-after-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
