<?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>An It-Slave in the digital saltmine &#187; Geek stuff</title>
	<atom:link href="http://www.it-slav.net/blogs/category/geek-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.it-slav.net/blogs</link>
	<description>Another Blog from a Geek that has no life</description>
	<lastBuildDate>Tue, 10 Jan 2012 20:27:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Anonymise a network segment using TOR and OpenBSD</title>
		<link>http://www.it-slav.net/blogs/2012/01/10/anonymise-a-network-segment-using-tor-and-openbsd/</link>
		<comments>http://www.it-slav.net/blogs/2012/01/10/anonymise-a-network-segment-using-tor-and-openbsd/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 20:27:48 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[it-slav.net]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[The Onion Router]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2067</guid>
		<description><![CDATA[Background I&#160;have a FON&#160;router which allow anyone to connect to Intenet via my network connection. I&#160;like the openess and idea behind FON but I&#160;do not want to get in trouble if someone do bad things and using my network connection. One solution is to connect the FON&#160;accesspoint to a separate network segment and let all [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I&nbsp;have a FON&nbsp;router which allow anyone to connect to Intenet via my network connection. I&nbsp;like the openess and idea behind FON but I&nbsp;do not want to get in trouble if someone do bad things and using my network connection.</p>
<p>One solution is to connect the FON&nbsp;accesspoint to a separate network segment and let all traffic from that network go through TOR, the onion router.&nbsp;</p>
<p>Another feature is when I want to be anonymous on Internet I plugin my computer to that network segment.</p>
<p><span id="more-2067"></span></p>
<h2>Setup</h2>
<p>I use OpenBSD as my firewall and the first step is to download, compile and configure TOR.&nbsp;I&nbsp;downloaded the tarball from https://www.torproject.org and used the normal procedure:</p>
<pre># wget https://www.torproject.org/dist/tor-0.2.2.35.tar.gz

# tar xzvf tor-0.2.2.35.tar.gz 

# cd tor-0.2.2.35                                                                                                                                                                

# ./configure&amp;&amp;make&amp;&amp;make install</pre>
<p>&nbsp;</p>
<h2>Configure pf</h2>
<p>I use a specific ethernet interface, fxp0, which will route all traffic into tor.&nbsp;</p>
<p>&nbsp;</p>
<pre>--cut from /etc/pf.conf--

#Tor traffic

tor_if =&quot;fxp0&quot;

# Tor&#39;s TransPort

trans_port = &quot;9040&quot;

pass in quick on $tor_if inet proto udp to port domain rdr-to 127.0.0.1 port 5300 

pass in quick on $tor_if inet proto { tcp udp } to !($tor_if) rdr-to 127.0.0.1 port $trans_port

--end cut--</pre>
<h2>&nbsp;</h2>
<h2>Configure tor</h2>
<p>&nbsp;</p>
<pre># cat /usr/local/etc/tor/torrc

VirtualAddrNetwork 10.192.0.0/10

AutomapHostsOnResolve 1

TransPort 9040

DNSPort 5300

Log notice syslog

#Log debug stderr

RunAsDaemon 1</pre>
<p>&nbsp;</p>
<p>Note: I know that best practice is to let the tor process run as non root user. That requires read access to /dev/pf and I did not bother to get it working.</p>
<p>&nbsp;</p>
<h2>Dhcpd config</h2>
<p>I assume that a OpenBSD sysadmin knows how to setup dhcpd so I will just show the config addon I did to /etc/dhcpd.conf.</p>
<p>&nbsp;</p>
<pre>shared-network tor-net {

        option  domain-name &quot;it-slav-tor-net&quot;;

        option  domain-name-servers 10.1.2.1;

        option  ntp-servers 10.1.2.1;

        subnet 10.1.2.0 netmask 255.255.255.0 {

                option routers 10.1.2.1;

                range 10.1.2.100 10.1.2.200;

        }</pre>
<p>&nbsp;</p>
<p>The ip-adress of the fxp0 interface is 10.1.2.1</p>
<p>&nbsp;</p>
<h2>Start tor</h2>
<p>&nbsp;</p>
<pre># /usr/local/bin/tor

Jan 10 20:52:48.880 [notice] Tor v0.2.2.35 (git-b04388f9e7546a9f). This is experimental software. Do not rely on it for strong anonymity. (Running on OpenBSD i386)

Jan 10 20:52:48.885 [warn] It&#39;s a little hard to tell, but you seem to have Libevent 1.4.0-beta header files, whereas you have linked against Libevent 1.4.14b-stable.  This will probably make Tor crash.

Jan 10 20:52:48.886 [notice] Initialized libevent version 1.4.14b-stable using method kqueue. Good.

Jan 10 20:52:48.886 [notice] Opening Socks listener on 127.0.0.1:9050

Jan 10 20:52:48.887 [notice] Opening Transparent pf/netfilter listener on 127.0.0.1:9040

Jan 10 20:52:48.887 [notice] Opening DNS listener on 127.0.0.1:5300</pre>
<p>&nbsp;</p>
<h2>Final step</h2>
<p>Plugin your fon router and enjoy!</p>
<p>&nbsp;</p>
<h2>Links</h2>
<p>The hints to this article was found at:</p>
<ul>
<li><a href="https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TransparentProxy " target="_blank">&nbsp;https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TransparentProxy&nbsp;</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2012%2F01%2F10%2Fanonymise-a-network-segment-using-tor-and-openbsd%2F&amp;title=Anonymise%20a%20network%20segment%20using%20TOR%20and%20OpenBSD" id="wpa2a_2"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2012/01/10/anonymise-a-network-segment-using-tor-and-openbsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KVM virtualization, some best practice, part 2</title>
		<link>http://www.it-slav.net/blogs/2012/01/08/kvm-virtualization-some-best-practice-part-2/</link>
		<comments>http://www.it-slav.net/blogs/2012/01/08/kvm-virtualization-some-best-practice-part-2/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 11:30:19 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[op5]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2201</guid>
		<description><![CDATA[Background It really annoyed me that the iowait at the cpu on the Dom 0 system was approximatly 50% when the 4 virtual system was doing more or less nothing. I showed my earlier blogpost about VM virtualization to our sysadmin at op5. He gave me a couple of more hints that really make a [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>It really annoyed me that the iowait at the cpu on the Dom 0 system was approximatly 50% when the 4 virtual system was doing more or less nothing.</p>
<p>I showed my<a href="http://www.it-slav.net/blogs/2012/01/01/kvm-virtualization-some-best-practice/" target="_blank"> earlier blogpost</a> about VM virtualization to our sysadmin at op5. He gave me a couple of more hints that really make a big difference, the best part is that they are real simple to implement.</p>
<p>I also noticed that I forgot some parts in the previous article that was obvius to me.</p>
<p><span id="more-2201"></span></p>
<h3>&nbsp;</h3>
<h3>#1 use virtio drivers if possible</h3>
<p>This is probably the single most important step to get the most out of the hardware.</p>
<p>When the virtual systems wants to communicate with the hardware it uses drivers, if the drivers are simulating hardware to give a service to the virtual operating system it adds alot of overhed. A simple example:</p>
<ul>
<li>The virtual system wants to access the disk</li>
<li>The virtual system communicates via the driver to the hardware</li>
<li>The hardware is not real hardware, it is emulated hardware in sofware&nbsp;</li>
<li>The software that emulates the hardware sends the I/O to the Dom 0 virtualization engine</li>
<li>The Virtualization engine verifies that the access is ok, translate it to real hardware call via its driver</li>
<li>The hardware do the operation and send the result back up via all the steps to the virtual operating system</li>
</ul>
<p>All this transalations and software calls take alot of resources from the machine.</p>
<p>By using virtual drivers, so that there is no need to emulate hardware, many of the steps can be skipped or done with much less penalty. However not all operating system have virtio drivers.</p>
<h3>&nbsp;</h3>
<h3>#2 load the virtio modules in Dom 0</h3>
<p>This is a real god hint I got from our sysadmin, load the virtual drivers in the Dom 0 system asweell. According to him, the virtual drivers in the Dom 0 and Dom U:s communicate and makes the I/O much more effective. I have not found any information about this at any place so I was sceptical but I tried it.</p>
<pre># modprobe virtio_balloon
# modprobe virtio_blk
# modprobe virtio_net
# modprobe virtio_pci</pre>
<p>The virtual systems need to be rebooted as far as I know before the loaded drivers will have any effect.</p>
<p>At first no change at all, but after few hours I noticed that CPU idle raized and the iowait went from at least 50% down to below 5%.</p>
<p>A nice graph, created by <a href="http://www.op5.com/network-monitoring/op5-monitor/" target="_blank">op5 Monitor</a> showing the difference:</p>
<p><img alt="" height="505" src="http://www.it-slav.net/blogs/wp-content/uploads/Screen Shot 2012-01-05 at 10_24_45 AM.png" width="604" /></p>
<p>I loaded the virtual drivers approximately 4 pm, and it took until 10 pm before the performance boost showed up.</p>
<p>The correct way of making sure that the drivers are loaded directly would be to remake the kernel but I&#39;m lazy so I have just added the module load to /etc/rc.local</p>
<h2>&nbsp;</h2>
<h2>Conclusions</h2>
<p>It is always important to monitor systems. When doing changes it is not possible know if the changes do have any impact if you do not monitor and follow up how and if the changes does anything.</p>
<p>My former statement that KVM is not mature is more true then I have thought. The knowledge how to tune and maintain KVM systems seems to be like black art where the knowledge is not documented and well spread. I have read the RedHat virtualization and I have not found anything about that the virtual drivers should be loaded on the Dom0 system.</p>
<p>If there is anyone out there that has some documentation or more hints, please send me the link or comment this blogpost.</p>
<p>Links:</p>
<ul>
<li><a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html" target="_blank">RedHa</a>t virtualization doc</li>
<li><a href="http://www.op5.com/network-monitoring/op5-monitor/" target="_blank">op5 Monitor</a> that monitor and creates nice graphs</li>
<li><a href="http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/check_cpu_stats-2Esh/details" style="color: rgb(200, 0, 0); font-family: arial, verdana, sans-serif; text-align: justify; " target="_blank">check_cpu_stats</a>&nbsp;Nagios plugin to monitor cpustat</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2012%2F01%2F08%2Fkvm-virtualization-some-best-practice-part-2%2F&amp;title=KVM%20virtualization%2C%20some%20best%20practice%2C%20part%202" id="wpa2a_4"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2012/01/08/kvm-virtualization-some-best-practice-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KVM virtualization, some best practice, part 1</title>
		<link>http://www.it-slav.net/blogs/2012/01/01/kvm-virtualization-some-best-practice/</link>
		<comments>http://www.it-slav.net/blogs/2012/01/01/kvm-virtualization-some-best-practice/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 20:02:05 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[it-slav.net]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2181</guid>
		<description><![CDATA[Background As an it slave, I have the same problems as most datacenters: Running out of space because of more and more machines get into the datacenter Overheating Powerconsumption Added to the &#34;normal&#34; datacenter problems, I also have to deal with: Wife acceptance Noice, my neighbours has complained about the noice outside my basement. To [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>As an it slave, I have the same problems as most datacenters:</p>
<ul>
<li>Running out of space because of more and more machines get into the datacenter</li>
<li>Overheating</li>
<li>Powerconsumption</li>
</ul>
<p>Added to the &quot;normal&quot; datacenter problems, I also have to deal with:</p>
<ul>
<li>Wife acceptance</li>
<li>Noice, my neighbours has complained about the noice outside my basement.</li>
</ul>
<p>To address this issues I will run a consolidation project to get fewer machines by using virtualization. As virtualization engine, KVM is choosed.</p>
<p>This article will describe some pitfalls I run into and how I solved them.</p>
<p><span id="more-2181"></span></p>
<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<h2>KVM plattform</h2>
<p>KVM seems to be the future for virtualization within the Linux area since Xen has done some mistakes.</p>
<p>As I have good experience of running CentOS and has KVM included I decided to use CentOS as the plattform for my virtualization.</p>
<p>&nbsp;</p>
<h2>Issues</h2>
<h3>Bridge network</h3>
<p>To let the virtual boxes has full access to the network you need create a network bridge, it is rather straightforward and well documented so I will skip this part. I used the documentation on Red Hat customer support. Why KVM requires a bridge instead of a normal NIC is another question <img src='http://www.it-slav.net/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>&nbsp;</h3>
<h3>Snapshots</h3>
<p>One handy feature with virtualization is that the virtual systems can be one big fat file at the physical host, this gives the possibility to make full backups without turning the system down a.k.a snapshots.</p>
<p>However to get snapshot to work the filetype must be qcow2 and raw is the default format.</p>
<p>It is possible to convert from raw to qcow2 format by running the command:</p>
<pre>qemu-img convert -f raw -O qcow2 &lt;virtualhost&gt;.img &lt;virtualhost&gt;.img.qcow2</pre>
<p>Remember to turn of your virtual system by running:</p>
<pre>virsh shutdown &lt;virtualhost&gt;
</pre>
<p>After the conversion:</p>
<pre>virsh edit &lt;virtualhost&gt;
</pre>
<p>modify the type and path, i.e.</p>
<pre>      &lt;driver name=&#39;qemu&#39; type=&#39;qcow2&#39; cache=&#39;none&#39;/&gt;
      &lt;source file=&#39;/var/lib/libvirt/images/web.img.qcow2&#39;/&gt;
</pre>
<p>Start your virtual system:</p>
<pre>virsh start &lt;virtualhost&gt;</pre>
<p>&nbsp;</p>
<p>Take a snapshot with:</p>
<pre>qemu-img snapshot -c &lt;snapshotname&gt; &lt;virtualhost&gt;.img.preallc.qcow2</pre>
<p>&nbsp;</p>
<p>To create a full image of your snapshot you need to compile a more resent version of qemu-img then shipped with CentOS 6.2, I download a later version and compiled it from <a href="http://git.qemu.org/qemu.git/commit/?id=51ef67270b1d10e1fcf3de7368dccad1ba0bf9d1" target="_blank">here</a>, i renamed the new to qemu.img2 and copied it to /usr/local/bin</p>
<pre>qemu-img2 convert -p -f qcow2 -O qcow2 -s &lt;snapshotname&gt; &lt;virtualhost&gt;.img.preallc.qcow2 &lt;targetpath&gt;
</pre>
<p>Beware: This command can use all your resources and may affect all your virtual systems, use nice and ionice to prevent it.</p>
<h3>&nbsp;</h3>
<h3>Disk I/O</h3>
<p>After installing just a few virtual system I noticed that my physical host got alot of I/O wait, it can be seen by using tools like top.</p>
<p>To monitor this I installed the nagios plugins:</p>
<ul>
<li>check disk io, can be found <a href="https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_diskio" target="_blank">here</a></li>
<li>check cpu stats, can be found <a href="http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/check_cpu_stats-2Esh/details" target="_blank">here</a></li>
<li>check_libvirt, developed by <a href="http://www.op5.com" target="_blank">op5</a> and an <a href="http://www.op5.com/how-to/how-to-monitor-kvm-installation/" target="_blank">Howto </a></li>
</ul>
<p>However it seems like that though my virtual systems did more or less nothing they caused alot of disk I/O on the physical system.</p>
<p>I did some investigations and read quite many articles, fiddled and tested. The following is what worked for me in my setup.</p>
<h4>#1 Change disk scheduler</h4>
<p>The disk scheduler can be changed on runtime by modify the file:</p>
<pre>/sys/block/sda/queue/scheduler</pre>
<p>to see what scheduler you use now:</p>
<pre>cat /sys/block/sda/queue/scheduler</pre>
<p>Change sda to the device you have.</p>
<p>The scheduler that worked best for me is deadline</p>
<pre>echo deadline &gt; /sys/block/sda/queue/scheduler</pre>
<p>&nbsp;</p>
<h4>#2 Mount with noatime</h4>
<p>A feature in Unix and other Unixlike systems like Linux is that it normaly stores when a file is accessed. So one read always produce a write and if you are using raid like morroring this get worse, one reade always generate several writes. This creates alot of overhead for a feature soldom used.</p>
<p>So change /etc/fstab so it will mount the file systems with noatime.<br />
	An axample:</p>
<pre>UUID=a290aa4b-635c-45fa-b144-1fbef90b3735 /                       ext4    defaults,noatime        1 1</pre>
<p>&nbsp;</p>
<h4>#3 Preallocation disk images</h4>
<p>A real boost that is hidden in the featureset and not shown in the virtualmachine gui is using preallocation disk images. They cannot be created from the GUI so I install the virtual machine, turn it of and convert it afterwards.</p>
<pre>qemu-img convert -f qcow2 -O qcow2 -o preallocation=metadata &lt;virtualhost&gt;.img.qcow2 &lt;virtualhost&gt;.img.preallc.qcow2</pre>
<p>Change the path to new image name by editing the virtual machine settings</p>
<pre>virsh edit &lt;virtualhost&gt;</pre>
<p>&nbsp;</p>
<h2>Conclusions</h2>
<p>In my opinion it seems like KVM is still a little bit immature or at least the tools to handle it. Maybe it would be a good idea to have one linux distro focusing on beeing the best platform for virtualization.</p>
<p>I am convinced that I can get even more bang for the bucks out of my installation if I learn how to tweak it even more, so if you have any hints, do not hesitate to contact me. Preferably as a comment to this blogpost.</p>
<p>&nbsp;</p>
<h2>Referenses:</h2>
<ul>
<li><a href="http://www.op5.com/network-monitoring/op5-monitor/" target="_blank">op5 Monitor</a>, a nagios based enterprise monitor tool to monitor my environment</li>
<li><a href="http://www.op5.com/how-to/how-to-monitor-kvm-installation/" target="_blank">check_libvirt</a>, a nagios plugin done by op5 to monitor KVM</li>
<li><a href="https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_diskio" target="_blank">check_diskio</a>, a nagios plugin to monitor disk I/O</li>
<li><a href="http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/check_cpu_stats-2Esh/details" target="_blank">check_cpu_stats</a>, a nagios plugin to monitor cpu usage rather detailed</li>
<li>Another <a href="http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/" target="_blank">blogpost</a> which helped me</li>
<li><a href="http://www.google.se/url?sa=t&amp;rct=j&amp;q=redhat%206%20kvm%20howto&amp;source=web&amp;cd=6&amp;ved=0CE0QFjAF&amp;url=http%3A%2F%2Fwww.redhat.com%2Fsummit%2F2011%2Fpresentations%2Fsummit%2Fdecoding_the_code%2Fwednesday%2Fwagner_w_420_kvm_performance_improvements_and_optimizations.pdf&amp;ei=qzT-TtvGBsyB4AS8xNmkDg&amp;usg=AFQjCNEK6OMSA4WtSs7NYj6n-jsmauwcnw&amp;cad=rja" target="_blank">KVM performance improvements and optimizations</a> &#8211; Red Hat presentation</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2012%2F01%2F01%2Fkvm-virtualization-some-best-practice%2F&amp;title=KVM%20virtualization%2C%20some%20best%20practice%2C%20part%201" id="wpa2a_6"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2012/01/01/kvm-virtualization-some-best-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It-Slav.Net gets 100 Mbit/s</title>
		<link>http://www.it-slav.net/blogs/2012/01/01/it-slav-net-gets-100-mbits/</link>
		<comments>http://www.it-slav.net/blogs/2012/01/01/it-slav-net-gets-100-mbits/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 13:36:38 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[it-slav.net]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2175</guid>
		<description><![CDATA[After a couple of weeks fiddeling I can prodly announce that my new internet connection is in full use. The new access speed is 100 Mbit/s optical fiber, iperf tests show that I can get approx 97 Mbit/s in booth directions. Changes: 100 Mbit/s internet access provided by Ownit Updated firewall to OpenBSD 5.0 running [...]]]></description>
			<content:encoded><![CDATA[<p>After a couple of weeks fiddeling I can prodly announce that my new internet connection is in full use.</p>
<p>The new access speed is 100 Mbit/s optical fiber, iperf tests show that I can get approx 97 Mbit/s in booth directions.</p>
<p>Changes:</p>
<ul>
<li>100 Mbit/s internet access provided by Ownit</li>
<li>Updated firewall to OpenBSD 5.0 running on an Astaro appliance</li>
<li>Updated Webserver to Centos 6.2, virtulized with KVM</li>
<li>Updated Mailserver to Centos 6.2, virtulized with KVM</li>
</ul>
<p>&nbsp;</p>
<p>Happy new year</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2012%2F01%2F01%2Fit-slav-net-gets-100-mbits%2F&amp;title=It-Slav.Net%20gets%20100%20Mbit%2Fs" id="wpa2a_8"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2012/01/01/it-slav-net-gets-100-mbits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Telldus Tellstick on CentOS 6 or RedHat Enterprise Linux 6</title>
		<link>http://www.it-slav.net/blogs/2011/08/29/install-telldus-tellstick-on-centos-6-or-redhat-enterprise-linux-6/</link>
		<comments>http://www.it-slav.net/blogs/2011/08/29/install-telldus-tellstick-on-centos-6-or-redhat-enterprise-linux-6/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:08:21 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[telldus]]></category>
		<category><![CDATA[tellstick]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2109</guid>
		<description><![CDATA[Background I have a long time looked at Telldus Tellstick&#160;that can control wall-plug socket recievers and other devices. Finally I got my hands on one that my collegue wanted to sell. This article will describe how to get it up and running on a x86_64 CentOS 6 box, the procedure would be the same on [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I have a long time looked at Telldus <a target="_blank" href="http://www.telldus.se/products/tellstick">Tellstick</a>&nbsp;that can control wall-plug socket recievers and other <a target="_blank" href="http://www.telldus.se/products/compability">devices</a>. Finally I got my hands on one that my collegue wanted to sell.</p>
<p>This article will describe how to get it up and running on a x86_64 CentOS 6 box, the procedure would be the same on RHEL or Feodora and similiar on other Linux distributions. Unfortunatly the only distribution that has pre-made packages is Ubuntu so I will describe howto download the source code, compile it and get the amazing Telldus Tellstick up and running.</p>
<p>&nbsp;<a href="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/telldus.jpg"><img alt="" title="telldus" width="225" height="243" class="aligncenter size-full wp-image-2120" src="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/telldus.jpg" /></a></p>
<p>Kudos to Telldus that has understood the power of OpenSource and opened up the device to let third-part &nbsp;vendors make solutions based on the device.</p>
<p><span id="more-2109"></span></p>
<h2>&nbsp;</h2>
<h2>Installation</h2>
<p>Install packages needed for the compilation</p>
<p><code>yum install gcc gcc-c++ autoconf automake cmake</code></p>
<p>&nbsp;</p>
<p>Libconfuse is needed:&nbsp;</p>
<p><code>wget http://pkgs.repoforge.org/libconfuse/libconfuse-2.6-2.el6.rf.x86_64.rpm</code></p>
<p><code>wget http://pkgs.repoforge.org/libconfuse/libconfuse-devel-2.6-2.el6.rf.x86_64.rpm</code></p>
<p>&nbsp;</p>
<p>Install libconfuse:</p>
<p><code>rpm -Uvh libconfuse-*</code></p>
<p><code>warning: libconfuse-2.6-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY</code></p>
<p><code>Preparing... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;########################################### [100%]</code></p>
<p><code>&nbsp; &nbsp;1:libconfuse &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ########################################### [ 50%]</code></p>
<p><code>&nbsp; &nbsp;2:libconfuse-devel &nbsp; &nbsp; &nbsp; ########################################### [100%]</code></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Download, configure, compile, and install the Tellstick package from Telldus&nbsp;</p>
<div><code>wget http://download.telldus.se/TellStick/Software/telldus-core/telldus-core-2.0.4.tar.gz</code></div>
<div><code>tar xzvf telldus-core-2.0.4.tar.gz&nbsp;</code></div>
<div><code>cd telldus-core-2.0.4</code></div>
<div><code>cmake .</code></div>
<div><code>make&nbsp;</code></div>
<div><code>make install</code></div>
<div><code>&nbsp;</code></div>
<div>make use of new libs in&nbsp;/usr/local/lib</div>
<div><code>echo&nbsp;/usr/local/lib &gt;&nbsp;/etc/ld.so.conf.d/tellstick.conf</code></div>
<div><code>ldconfig</code></div>
<div>&nbsp;</div>
<div>Insert the needed module</div>
<div><code>modprobe ftdi_sio vendor=0x1781 product=0x0c30</code></div>
<div>&nbsp;</div>
<div>connected the telldus stick and in /var/log/messages you should see:</div>
<div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: new full speed USB device using ehci_hcd and address 4</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: New USB device found, idVendor=1781, idProduct=0c30</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Product: TellStick</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Manufacturer: Telldus</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: SerialNumber: A400gl7J</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: configuration #1 chosen from 1 choice</code></div>
<div><code>Aug 29 18:50:57 mother kernel: ftdi_sio 1-3.2:1.0: FTDI USB Serial Device converter detected</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Detected FT232RL</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Number of endpoints 2</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Endpoint 1 MaxPacketSize 64</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Endpoint 2 MaxPacketSize 64</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: Setting MaxPacketSize 64</code></div>
<div><code>Aug 29 18:50:57 mother kernel: usb 1-3.2: FTDI USB Serial Device converter now attached to ttyUSB0</code></div>
</div>
<div>&nbsp;</div>
<div>Strange is that the Tellstick uses /dev/tellstick even though the log tells ttyUSB0</div>
<div>&nbsp;</div>
<h2>Configure</h2>
<div>I bought <a target="_blank" href="http://www.kjell.com/?item=50219">#50219</a> from Kjell&amp;Co the price is approx 15&euro;</div>
<div>&nbsp;</div>
<div>Add to /etc/tellstick.conf</div>
<div>
<div><code>deviceNode = &quot;/dev/tellstick&quot;</code></div>
<div><code>device {</code></div>
<div><code>&nbsp; id = 2</code></div>
<div><code>&nbsp; name = &quot;Example device&quot;</code></div>
<div><code>&nbsp; protocol = &quot;arctech&quot;</code></div>
<div><code>&nbsp; model = &quot;selflearning-switch&quot;</code></div>
<div><code>&nbsp; parameters {</code></div>
<div><code>&nbsp; &nbsp; house = &quot;12345678&quot;</code></div>
<div><code>&nbsp; &nbsp; unit = &quot;2&quot;</code></div>
<div><code>&nbsp; }</code></div>
<div><code>}</code></div>
<div>&nbsp;</div>
<div>Put the powerswitch in selflearning mode and run:</div>
<div><code># tdtool --learn 2</code></div>
<div><code>Learning device: 2 Example device - Success</code></div>
</div>
<div>&nbsp;</div>
<div>Try</div>
<div>
<div><code># tdtool --on 2</code></div>
<div><code>Turning on device 2, Example device - Success</code></div>
</div>
<div>&nbsp;</div>
<div>and the device turned on and there were light!!</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><code># tdtool --off 2</code></div>
<div>And the light is off</div>
<div>&nbsp;</div>
<div>If you get&nbsp;</div>
<div><code>/var/state/telldus-core.conf:1: no such option 'deviceNode'</code></div>
<div>just remove&nbsp;/var/state/telldus-core.conf with</div>
<div><code>rm&nbsp;/var/state/telldus-core.conf</code></div>
<div>It seems like it can be removed without any problem.</div>
<div>&nbsp;</div>
<div>To annoy your wife/kids/dog or anybody else try</div>
<div><code>while true ; do tdtool --on 2; tdtool --off 2; done</code></div>
<div><code>&nbsp;</code></div>
<div>Have fun with your computer controlled powerdevices:-)</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Useful links:</h2>
<ul>
<li><a target="_blank" href="http://www.telldus.com/">Telldus</a></li>
<li>Different Telldus <a target="_blank" href="http://www.telldus.com/products/range">Tellsticks</a></li>
<li>Supported <a target="_blank" href="http://www.telldus.com/products/compability">devices</a></li>
</ul>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F08%2F29%2Finstall-telldus-tellstick-on-centos-6-or-redhat-enterprise-linux-6%2F&amp;title=Install%20Telldus%20Tellstick%20on%20CentOS%206%20or%20RedHat%20Enterprise%20Linux%206" id="wpa2a_10"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/08/29/install-telldus-tellstick-on-centos-6-or-redhat-enterprise-linux-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor FreeNAS raid disks with Nagios or op5 Monitor</title>
		<link>http://www.it-slav.net/blogs/2011/08/26/monitor-freenas-raid-disks-with-nagios-or-op5-monitor/</link>
		<comments>http://www.it-slav.net/blogs/2011/08/26/monitor-freenas-raid-disks-with-nagios-or-op5-monitor/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 20:05:36 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[freenas]]></category>
		<category><![CDATA[geom]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[op5]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1961</guid>
		<description><![CDATA[Background As a monitoring fanatic, I&#160;think that have mirrored disk without monitor the mirror is worse then not have a redundant disk system at all. If you think that you are safe and you are not, is worse then be aware of a risk and calculate with it. This article will describe how I&#160;did monitoring [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>As a monitoring fanatic, I&nbsp;think that have mirrored disk without monitor the mirror is worse then not have a redundant disk system at all. If you think that you are safe and you are not, is worse then be aware of a risk and calculate with it.</p>
<p>This article will describe how I&nbsp;did monitoring my&nbsp;FreeNAS system mirrored disks status&nbsp;using Nagios or op5 Monitoring. I&nbsp;assume basic knowledge of Nagios or op5 Monitor and that a Nagios agent is installed.</p>
<p>&nbsp;<br />
<span id="more-1961"></span></p>
<h2>Demarcation</h2>
<p>This article will focus on GEOM raid monitoring. Of cource all important services should be monitored, like HTTP, CIFS, SMB, disk space, CPU Load, memory usage and so on. However that is basic monitoring knowledge and there is alot of documentation on the net howto achive that.</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;</p>
<h2>Monitor the GEOM mirror</h2>
<p>The most interesting part is to monitor the GEOM mirror to make sure that that the raid1 is working.&nbsp;</p>
<p>After some googleing I&nbsp;found <a target="_blank" href="http://exchange.nagios.org/directory/Plugins/System-Metrics/Storage-Subsystem/check_geom/details">check_geom</a>, downloaded it and put it in /usr/local/libexec/nagios/ where the other plugins are located.</p>
<p>Add a line to /etc/nrpe.cfg</p>
<p><code>command[check_geom_mirror]=/usr/local/libexec/nagios/check_geom mirror</code></p>
<p>and test from Nagios/op5 Monitor host:</p>
<p><code># ./check_nrpe -H fnas -c check_geom_mirror<br />
OK mirror&nbsp; - mirror/2TBmirror0 COMPLETE { ad6 , ad4 }</code></p>
<p>It works!<br />
&nbsp;</p>
<h2>Configure Nagios or op5 Monitor</h2>
<p>In /opt/monitor/etc/services.cfg at the op5 Monitor host</p>
<p><code># service 'Disk Raid Mirrors'<br />
define service{<br />
&nbsp;&nbsp;&nbsp; use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default-service<br />
&nbsp;&nbsp;&nbsp; host_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fnas<br />
&nbsp;&nbsp;&nbsp; service_description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disk Raid Mirrors<br />
&nbsp;&nbsp;&nbsp; check_command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check_nrpe!check_geom_mirror<br />
&nbsp;&nbsp;&nbsp; contact_groups&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it-slav_mail,it-slav_jabber<br />
&nbsp;&nbsp;&nbsp; }</code></p>
<p>&nbsp;</p>
<h2>The result</h2>
<p>I tested unplugging the SATA cabel to one of the mirrored disk and after a couple of minutes I got an Critical notification that my disk mirror is broken, I plugged SATA cabel and got a Warning:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/geom.png"><img alt="" title="geom" width="507" height="97" class="aligncenter size-full wp-image-2100" src="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/geom.png" /></a></p>
<p>&nbsp;</p>
<p>After a couple of hours the mirror was OK.</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/Screen-Shot-2011-08-25-at-3.46.39-PM.png"><img alt="" title="Screen Shot 2011-08-25 at 3.46.39 PM" width="664" height="81" class="aligncenter size-full wp-image-2102" src="http://www.it-slav.net/blogs/wp-content/uploads/2011/08/Screen-Shot-2011-08-25-at-3.46.39-PM.png" /></a></p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>Useful links:</h2>
<ul>
<li><a target="_blank" href="http://www.it-slav.net/blogs/2011/08/25/monitor-freenas-with-op5-monitor-or-nagios/">Previous article</a> describing howto install nagios or op5 Monitor agent on FreeNAS</li>
<li><a href="http://www.op5.com">op5</a>, an Enterprise Monitor product company</li>
<li><a target="_blank" href="http://www.op5.com/network-monitoring/op5-monitor/">op5 Monitor</a>, Enterprise Monitoring based on opensource</li>
<li><a target="_blank" href="http://www.nagios.org">Nagios</a>, an excellent opensource monitor tool</li>
<li><a href="http://www.freenas.org/">FreeNAS</a>, very capable NAS based on FreeBSD</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F08%2F26%2Fmonitor-freenas-raid-disks-with-nagios-or-op5-monitor%2F&amp;title=Monitor%20FreeNAS%20raid%20disks%20with%20Nagios%20or%20op5%20Monitor" id="wpa2a_12"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/08/26/monitor-freenas-raid-disks-with-nagios-or-op5-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor FreeNAS with op5 Monitor or Nagios</title>
		<link>http://www.it-slav.net/blogs/2011/08/25/monitor-freenas-with-op5-monitor-or-nagios/</link>
		<comments>http://www.it-slav.net/blogs/2011/08/25/monitor-freenas-with-op5-monitor-or-nagios/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 12:31:58 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[freenas]]></category>
		<category><![CDATA[monitor]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2090</guid>
		<description><![CDATA[Background My old NAS built on top of CentOS has some performence issues and the disks are quit old now. The hardware is leftovers that is approx 8 years old and not highend at that time either. The disks age has worried my for a time and I would like to have higher redunduncy with [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>My old NAS built on top of CentOS has some performence issues and the disks are quit old now. The hardware is leftovers that is approx 8 years old and not highend at that time either. The disks age has worried my for a time and I would like to have higher redunduncy with raid1/mirrored disks.</p>
<p>After some research I decided to run my new NAS on FreeNAS, which has all the features I use, like: CIFS, NFS, FTP, SSH, Rsync, Unison, iSCSI and also easy administration and disk management.</p>
<p>This article will describe how I&nbsp;did setup Nagios or op5 Monitoring on my FreeNAS system. I&nbsp;assume basic knowledge of Nagios or op5 Monitor.</p>
<p>&nbsp;<span id="more-2090"></span></p>
<h2>Installing nrpe</h2>
<p>Nrpe is the agent that nagios and op5 Monitor uses to monitor a system from the inside.</p>
<p>From the webgui add group nagios and user nagios. User nagios should be a meber of group nagios.</p>
<p><code>&nbsp;freenas:~# pkg_add -r nrpe2<br />
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/Latest/nrpe2.tbz... Done.<br />
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/All/perl-5.10.1.tbz... Done.<br />
Removing stale symlinks from /usr/bin...<br />
&nbsp;&nbsp;&nbsp; Skipping /usr/bin/perl<br />
&nbsp;&nbsp;&nbsp; Skipping /usr/bin/perl5<br />
Done.<br />
Creating various symlinks in /usr/bin...<br />
&nbsp;&nbsp;&nbsp; Symlinking /usr/local/bin/perl5.10.1 to /usr/bin/perl<br />
&nbsp;&nbsp;&nbsp; Symlinking /usr/local/bin/perl5.10.1 to /usr/bin/perl5<br />
Done.<br />
cd: can't cd to /usr/include<br />
Cleaning up /etc/make.conf... Done.<br />
Spamming /etc/make.conf... Done.<br />
Cleaning up /etc/manpath.config... Done.<br />
Spamming /etc/manpath.config... Done.<br />
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/All/libiconv-1.13.1_1.tbz... Done.<br />
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/All/gettext-0.17_1.tbz... Done.<br />
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/All/nagios-plugins-1.4.14,1.tbz... Done.<br />
You already have a &quot;nagios&quot; group, so I will use it.<br />
You already have a &quot;nagios&quot; user, so I will use it.</p>
<p>**********************************************************************</p>
<p>&nbsp;Enable NRPE in /etc/rc.conf with the following line:</p>
<p>&nbsp;&nbsp; nrpe2_enable=&quot;YES&quot;</p>
<p>&nbsp;A sample configuration is available in /usr/local/etc/nrpe.cfg-sample.<br />
&nbsp;Copy to nrpe.cfg where required and edit to suit your needs.</p>
<p>**********************************************************************</code><br />
&nbsp;</p>
<p><code>freenas:~# cp /usr/local/etc/nrpe.cfg-sample /etc/nrpe.cfg</code></p>
<p>I changed the allowed_hosts line and added my op5 Monitor host.</p>
<div>&nbsp;</div>
<div>Unfortunatly the instructions to autostart nrpe do not work, my guess is that FreeNAS is not 100% FreeBSD compatible.</div>
<div>I modified /etc/rc and addded in the end of the file:</div>
<div>
<div>&nbsp;</div>
<div><code>#Added by peter@it-slav.net 20101114</code></div>
<div><code>echo 'nrpe'</code></div>
<div><code>/usr/local/sbin/nrpe2 -c /etc/nrpe.cfg -d</code></div>
<div><code>#End peter@it-slav.net</code></div>
<div><code>&nbsp;</code></div>
<div><code># Let the PHP functions know we've finished booting</code></div>
<div><code>BOOTING=0</code></div>
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Reboot the FreeNAS system.</div>
<div>&nbsp;</div>
<div>From the op5 Monitor/Nagios host run:</div>
<div><code># ./check_nrpe -H fnas -c check_load<br />
OK - load average: 0.72, 0.85, 0.81|load1=0.721;15.000;30.000;0; load5=0.847;10.000;25.000;0; load15=0.808;5.000;20.000;0;&nbsp;</code><br />
&nbsp;</div>
<p>So the nagios agent works.</p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<h2>Links</h2>
<ul>
<li><a href="http://www.op5.com">op5</a>, an Enterprise Monitor product company</li>
<li><a target="_blank" href="http://www.op5.com/network-monitoring/op5-monitor/">op5 Monitor</a>, Enterprise Monitoring based on opensource</li>
<li><a target="_blank" href="http://www.nagios.org">Nagios</a>, an excellent opensource monitor tool</li>
<li><a href="http://www.freenas.org/">FreeNAS</a>, very capable NAS based on FreeBSD</li>
</ul>
<div>&nbsp;</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F08%2F25%2Fmonitor-freenas-with-op5-monitor-or-nagios%2F&amp;title=Monitor%20FreeNAS%20with%20op5%20Monitor%20or%20Nagios" id="wpa2a_14"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/08/25/monitor-freenas-with-op5-monitor-or-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud monitoring with op5 Monitor or Nagios</title>
		<link>http://www.it-slav.net/blogs/2011/07/07/cloud-monitoring-with-op5-monitor-or-nagios/</link>
		<comments>http://www.it-slav.net/blogs/2011/07/07/cloud-monitoring-with-op5-monitor-or-nagios/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 18:44:57 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2076</guid>
		<description><![CDATA[Monitor the cloud with nagios or op5 monitor. ]]></description>
			<content:encoded><![CDATA[<p>Finally, the most important and useful widget to Ninja has arrived. As everybody in the IT industri today knows, the cloud is where we all want to go and nirvana will be accomplished. To get there it is a god idea to let your favorite monitor solution keep track of when you can read more about this holy graal.</p>
<p>The widget keeps track of how many times the word &quot;moln&quot; appear on idg.se webpage and displays it in a easy view in The Tactical Overview.</p>
<p>&nbsp;</p>
<p>Screenshoots from the different modes:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2011/07/idg_cloud_report.jpg"><img alt="" title="idg_cloud_report" width="400" height="425" class="aligncenter size-full wp-image-2077" src="http://www.it-slav.net/blogs/wp-content/uploads/2011/07/idg_cloud_report.jpg" /></a></p>
<p>&nbsp;</p>
<p>Links:</p>
<ul>
<li><a href="https://demo.op5.com/monitor/index.php/tac">op5 Sandbox with a live cloud widget online</a>, registration is necessary</li>
<li><a href="http://www.op5.org/community/plugin-inventory/op5-projects/ninja">Ninja, the new and inovative nagios gui</a></li>
<li><a href="http://www.op5.org/community/plugin-inventory/widgets">Widget</a> exchange area</li>
</ul>
<p>Kudos to op5 support that has created this excellent widget&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/07/07/cloud-monitoring-with-op5-monitor-or-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open ssh on the WAN inteface in OpenWRT</title>
		<link>http://www.it-slav.net/blogs/2011/04/02/open-ssh-on-the-wan-inteface-openwrt/</link>
		<comments>http://www.it-slav.net/blogs/2011/04/02/open-ssh-on-the-wan-inteface-openwrt/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 08:10:53 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2037</guid>
		<description><![CDATA[To be able to administrate my OpenWRT&#160;router from Internet I&#160;need to open the ssh port on the Wan interface. &#160; It is real simple, just add to following to /etc/config/firewall: #open ssh on wan interface config rule&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; option src&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wan &#160;&#160;&#160;&#160;&#160;&#160;&#160; option dest_port&#160;&#160;&#160;&#160;&#160;&#160;&#160; 22 &#160;&#160;&#160;&#160;&#160;&#160;&#160; option target&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ACCEPT&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; option proto&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; tcp&#160; And restart [...]]]></description>
			<content:encoded><![CDATA[<p>To be able to administrate my OpenWRT&nbsp;router from Internet I&nbsp;need to open the ssh port on the Wan interface.</p>
<p>&nbsp;</p>
<p>It is real simple, just add to following to /etc/config/firewall:</p>
<p><code>#open ssh on wan interface<br />
config rule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option src&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wan<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option dest_port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option target&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option proto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp&nbsp; </code></p>
<p>And restart the firewall:</p>
<p><code>#/etc/init.d/firewall restart</code></p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F04%2F02%2Fopen-ssh-on-the-wan-inteface-openwrt%2F&amp;title=Open%20ssh%20on%20the%20WAN%20inteface%20in%20OpenWRT" id="wpa2a_16"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/04/02/open-ssh-on-the-wan-inteface-openwrt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing OpenWRT on TP-Link TL-WR1043ND</title>
		<link>http://www.it-slav.net/blogs/2011/03/31/installing-openwrt-on-tp-link-tl-wr1043nd/</link>
		<comments>http://www.it-slav.net/blogs/2011/03/31/installing-openwrt-on-tp-link-tl-wr1043nd/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 19:06:06 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2029</guid>
		<description><![CDATA[Background After struggeling with my Linksys WRT-160NL to get OpenWRT&#160;stable I finally gave up. It ended upp with DD-WRT&#160;instead. Unfortunatly DD-WRT&#160;do not have the functionality I want like: -rndis device so I&#160;could use my Android phone to connect to Internet -1-wire device support -Nagios agent The solution was to buy another device where OpenWRT support [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>After struggeling with my Linksys WRT-160NL to get OpenWRT&nbsp;stable I finally gave up. It ended upp with DD-WRT&nbsp;instead. Unfortunatly DD-WRT&nbsp;do not have the functionality I want like:</p>
<p>-rndis device so I&nbsp;could use my Android phone to connect to Internet</p>
<p>-1-wire device support</p>
<p>-Nagios agent</p>
<p>The solution was to buy another device where <a href="http://openwrt.org/" target="_blank">OpenWRT</a> support is working better with USB and Gigabit interfaces. After some research I found TP-Link <a href="http://www.tp-link.com/products/productDetails.asp?class=wlan&amp;pmodel=TL-WR1043ND" target="_blank">TL-WR1043ND</a> for approx 50&euro;.</p>
<p>&nbsp;<span id="more-2029"></span></p>
<h2>Unpacking</h2>
<p>The TL-WR1043ND package is good looking and has a printed GPL license included, that is impressive.</p>
<p>The basic installation with TP-LINK installed firware was easy and stright forward with all information you need in a simple &quot;Quick installation Guide&quot;. No need for installing software on a windows machine to be able to access you new device. I think Cisco/Linksys has something to <a href="http://www.it-slav.net/blogs/2010/06/04/install-openwrt-on-linksys-wrt160nl/" target="_blank">learn.</a></p>
<p>&nbsp;</p>
<h2>Installing OpenWRT</h2>
<p>Find the Firmware upgrade menu and upload <a target="_blank" href="http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin">this</a> firmware. It worked perfectly well and seems very stable. A positive suprise is that the WLAN&nbsp;seems to reach longer then the WRT 160NL.</p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>The TP-LINK TL-WR1043ND seems to be a good Wlan router that has a good support for OpenWRT, with USB, Gigabit ethernetinterfaces and good Wlan range.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F03%2F31%2Finstalling-openwrt-on-tp-link-tl-wr1043nd%2F&amp;title=Installing%20OpenWRT%20on%20TP-Link%20TL-WR1043ND" id="wpa2a_18"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/03/31/installing-openwrt-on-tp-link-tl-wr1043nd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>op5 Monitor or Nagios dashboard using Merlin backend</title>
		<link>http://www.it-slav.net/blogs/2011/03/09/nagios-dashboard-using-merlin-backend/</link>
		<comments>http://www.it-slav.net/blogs/2011/03/09/nagios-dashboard-using-merlin-backend/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 10:42:32 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[merlin]]></category>
		<category><![CDATA[nagios dashboard]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=2010</guid>
		<description><![CDATA[Presenting collected Nagios data has been cumbersome. But now with op5 added funtionality, storing the data in a database makes it much easier. Morten Bekkelund has created a nice dashboard typically used in NOCs. The dashboard has been modified and improved by the community and an example can be seen at op5 sandbox dashboard and [...]]]></description>
			<content:encoded><![CDATA[<p>Presenting collected Nagios data has been cumbersome. But now with op5 added funtionality, storing the data in a database makes it much easier. Morten Bekkelund has created a nice dashboard typically used in NOCs.</p>
<p>The dashboard has been modified and improved by the community and an example can be seen at <a href="https://sandbox.op5.com/dashboard/" target="_blank">op5 sandbox dashboard</a> and can be downloaded from <a href="http://www.op5.org/community/plugin-inventory/dashboards/dashboard" target="_blank">op5 community</a>.</p>
<p>The original project place is <a href="http://dingleberry.me/2010/04/our-new-dashboard/" target="_blank">http://dingleberry.me/2010/04/our-new-dashboard/</a></p>
<p>&nbsp;<a href="http://www.it-slav.net/blogs/wp-content/uploads/2011/03/dashboard-1.0.png"><img src="http://www.it-slav.net/blogs/wp-content/uploads/2011/03/dashboard-1.0-1024x508.png" alt="" title="dashboard-1.0" class="aligncenter size-large wp-image-2016" style="width: 602px; height: 301px;" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2011%2F03%2F09%2Fnagios-dashboard-using-merlin-backend%2F&amp;title=op5%20Monitor%20or%20Nagios%20dashboard%20using%20Merlin%20backend" id="wpa2a_20"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2011/03/09/nagios-dashboard-using-merlin-backend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Today is the answer</title>
		<link>http://www.it-slav.net/blogs/2010/10/10/today-is-the-answer/</link>
		<comments>http://www.it-slav.net/blogs/2010/10/10/today-is-the-answer/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 15:19:59 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1953</guid>
		<description><![CDATA[&#160; As everybody knows, the answer is 42. Today is the date 101010, translate that binary number to decimal, you get 42.]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>As everybody knows, the answer is 42.</p>
<p>Today is the date 101010, translate that binary number to decimal, you get 42.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F10%2F10%2Ftoday-is-the-answer%2F&amp;title=Today%20is%20the%20answer" id="wpa2a_22"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/10/10/today-is-the-answer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A real geek is a geek even during vacation!</title>
		<link>http://www.it-slav.net/blogs/2010/08/12/a-real-geek-is-a-geek-even-during-vacation/</link>
		<comments>http://www.it-slav.net/blogs/2010/08/12/a-real-geek-is-a-geek-even-during-vacation/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:43:00 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[openstreetmap]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1927</guid>
		<description><![CDATA[When there is summer and Scandinavia closes down it is hard to be a geek. Everybody, including me, moves out to small cottages in the forrest where 3G coverage is bad which gives low bandwidth a new meaning.&#160; &#160; I have found one way of still doing geeky things combined with vacation. That is update [...]]]></description>
			<content:encoded><![CDATA[<p>When there is summer and Scandinavia closes down it is hard to be a geek. Everybody, including me, moves out to small cottages in the forrest where 3G coverage is bad which gives low bandwidth a new meaning.&nbsp;</p>
<p>&nbsp;</p>
<p>I have found one way of still doing geeky things combined with vacation. That is update <a target="_blank" href="http://www.openstreetmap.org">OpenStreetmap</a>. Take a peak at my updates at:</p>
<ul>
<li><a href="http://www.openstreetmap.org/?lat=56.4476895332336&amp;lon=14.0158939361572&amp;zoom=14">http://www.openstreetmap.org/?lat=56.4476895332336&amp;lon=14.0158939361572&amp;zoom=14</a></li>
<li><a href="http://www.openstreetmap.org/?lat=56.4213931560516&amp;lon=14.0284895896912&amp;zoom=14">http://www.openstreetmap.org/?lat=56.4213931560516&amp;lon=14.0284895896912&amp;zoom=14</a></li>
<li><a href="http://www.openstreetmap.org/?lat=60.1418289542198&amp;lon=15.4323390126228&amp;zoom=17">http://www.openstreetmap.org/?lat=60.1418289542198&amp;lon=15.4323390126228&amp;zoom=17</a></li>
</ul>
<p><span id="more-1927"></span></p>
<p>Openstreetmap is wikipedia for maps, and like wikipedia it is dependent of that people will update with correct data. One thing that fascinates me is that openstreetmap is extremly detailed in some areas. Probably a geek lives nearby.</p>
<p>&nbsp;</p>
<p>When the earthquake hit Haiti, OpenStreetmaps was <a target="_blank" href="http://wiki.openstreetmap.org/wiki/WikiProject_Haiti">used</a> by rescuers because all other maps was inaccurate. Alot of volunteers helped keeping the maps updated.</p>
<p>&nbsp;</p>
<p>If you want to participate in the project, the process is simple:</p>
<ol>
<li>Get an GPS reciever that can generate gpx tracks, I use my Android</li>
<li>Turn on the GPS and walk, run or bicycle around and gather GPS tracks</li>
<li>Upload the gpx to openstreetmap.org</li>
<li>Tag the roads, buildings and whatever you found</li>
</ol>
<p>&nbsp;To get started, read the <a target="_blank" href="http://wiki.openstreetmap.org/wiki/Beginners'_guide">beginners guide</a> at<a target="_blank" href="http://www.openstreetmap.org"> Openstreetmap</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F08%2F12%2Fa-real-geek-is-a-geek-even-during-vacation%2F&amp;title=A%20real%20geek%20is%20a%20geek%20even%20during%20vacation%21" id="wpa2a_24"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/08/12/a-real-geek-is-a-geek-even-during-vacation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My experience with installing Android 2.2 Froyo on HTC Desire</title>
		<link>http://www.it-slav.net/blogs/2010/08/03/my-experience-with-installing-android-2-2-froyo-on-htc-desire/</link>
		<comments>http://www.it-slav.net/blogs/2010/08/03/my-experience-with-installing-android-2-2-froyo-on-htc-desire/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 19:46:12 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[desire]]></category>
		<category><![CDATA[froyo]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[htc desire. android update]]></category>
		<category><![CDATA[HTC support]]></category>
		<category><![CDATA[swedroid]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1907</guid>
		<description><![CDATA[Background Finally it has arrived, Android 2.2 Froyo to HTC Desire. When I installed it I run into several problems and this is my guide how I solved it. It was a rather frustration experience and took a long while to solve. I ended up with a phone where almost everything was gone and I [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>Finally it has arrived, Android 2.2 Froyo to HTC Desire. When I installed it I run into several problems and this is my guide how I solved it. It was a rather frustration experience and took a long while to solve. I ended up with a phone where almost everything was gone and I have to reinstall all my apps and configurations again.</p>
<p>I have not rooted my phone or changed anything that HTC or Google allow, so no rooted phone. I&#8217;m probably a poweruser but there is no obvious reason why I ended up with all these problems.</p>
<p>During this process I tried to find any information at HTC support site but I could not find anything that helped me. The best source of information is to use different user forums. My opinion is that HTC support web is crap.</p>
<p>This guide shows how I solved the problems I run into, I guess there is better way of doing it because this was a cumbersome and painfull process. I do not take any responsiblity if you end up with a bricked phone or loss of data.</p>
<p>Happy reading!</p>
<p><span id="more-1907"></span></p>
<h2>&nbsp;</h2>
<h2>Installing, first try</h2>
<p>Roumors on a swedish site, <a target="_blank" href="http://www.swedroid.se">swedroids.se</a> claimed that Froyo was out. My Desire had not given me the message that an update was available automatically as it should. Probably it just do not check with a high enough frequency to detect it.</p>
<p>I did a manual check and yipii, there was a system update available.</p>
<p>I choosed to do the update over the air, meaning that I used the phones update function.</p>
<p>After downloading and installing approximatly 30 minutes, the phone just showed the HTC logo and after that rebooted over and over again.</p>
<p>My conclusion was that the update has failed.</p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>Recover, first try</h2>
<p>I pulled out the battery and put it back again, pushed vol- and power and keept vol- pushed. Then I get into a menu where I could do some choices, I picked recover.</p>
<p>Now the phone managed to get passed the HTC logo and started up. It gave i progress bar starting from 0%and counting up to 92%, after a while it showed an error message &quot;Sorry! Process system is not responding&quot; with 2 options &quot;wait&quot; or &quot;force restart&quot; (or similar). Independent of which I pick or none, after a while the phone restarts with the same progress bar and error message.&nbsp;</p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>Install, second try</h2>
<p>At this moment a couple of hours has passed and I was getting real frustrated. Google and swedroid forums showed me that alot of people seemed to have the same problems as I do.</p>
<p>I find the following guide that seemed to helped alot of people:</p>
<p>&nbsp;</p>
<p>1. Download the Android 2.2 firmware for the Desire&nbsp;<a href="http://liveimage.htc.com/OTA_Bravo_Froyo_HTC_WWE_2.09.405.8-1.21.405.2_release4dua3bcrut4wrv30.zip">http://liveimage.htc.com/OTA_Bravo_Froyo_HTC_WWE_2.09.405.8-1.21.405.2_release4dua3bcrut4wrv30.zip</a></p>
<p>2. Rename the file update.zip and copy it to your microSD card via USB. I used an USB 3G dongle with an microSD reader.</p>
<p>3. Power down your Desire</p>
<p>4. Hold down the &ldquo;Volume Down&rdquo; button as you power the phone back on.</p>
<p>5. A screen should appear showing your phone&rsquo;s system searching for various files. Scroll down to &ldquo;recovery&rdquo; and press the &ldquo;Power&rdquo; button.</p>
<p>6. When you see the triangle with an exclamation point symbol, press the &ldquo;Power&rdquo; and &ldquo;Volume Up&rdquo; buttons at the same time.</p>
<p>7. From the menu that appears, select &ldquo;Apply sdcard:update.zip.&rdquo;</p>
<p>8. When the screen displays &ldquo;Install from sdcard complete&rdquo; select &ldquo;reboot system now&rdquo; and wait for the phone to power back up.</p>
<p>It looked very promising, with text and progressbars showing that an installation was taking place. After a while the phone restarted and stoped with a triangle and exclamation mark. I tried it again and again and again&#8230;. With the same result.</p>
<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<h2>Calling for help</h2>
<p>At this point I get real desperate so I went to HTC supportweb and wrote an email describing my problems. After 1&frac12; days I have &nbsp;got an email that told me to send the phone to repair.&nbsp;</p>
<p>Then I tried to call HTC support, they answered very fast but the support only told me to send the phone to the reseller to get it fixed. No trouble shooting at all and no questions what I have done.</p>
<p>Because I have important data, like logins to mail account, sip PBX, monitor solutions, facebook account and so on I decided that I would not send in the phone until I have waited a couple of days to see if something new shows up on different forums.</p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>Install, twentieth something try</h2>
<p>At this point I realized that all my settings will be lost I did a clean cache and a factory reset and did a new try with manual installation and this time it looked all right. The phone started up normally and asked for email accounts, facebook credentials and so on.</p>
<p>All my personal settings and data was gone but the phone seemed to work. I started to download a app and the phone rebooted again, sic. Everytime I installed a new app it rebooted and the app did not install.</p>
<p>But I remembered that I read that this was a common problem I searched the forums and did some Googling. Some people has solved this issue by do a &quot;factory data reset&quot; from menu-&gt;settings-&gt;SD &amp; phone storage-&gt;Factory data reset.</p>
<p>So I tried that and everything was gone again, I entered the credentials to my accounts and did some setup. And tried to install a new app, and YES it did not reboot.</p>
<p>&nbsp;</p>
<h2>&nbsp;</h2>
<h2>Conclusions</h2>
<p>This behavior by a product that I have not hacked in any way is not acceptable. I work at a software company and know that there might be bugs but these bugs was so big and costed me so much time that it should have been tested better.</p>
<p>Even worse is that&nbsp;HTC support website give no hints what-so-ever how to solve these issues I had&nbsp;and HTC telephone support did not even try to help me. I think HTC has a lot todo to get a better and more professional support.</p>
<p>In this case enthusiasts and helpfull people that publish their knowledge helped me and probably many others, thanks. Especially <a target="_blank" href="http://www.swedroid.se">swedroid.se</a> which is an excellent site where swedish speaking people can get help with thier expensive Android phones.</p>
<p>I also think that HTC should encourage enthusiasts by be more open and support the possiblity to root the phones. I think that they will make more money in the long run, compare it with Linksys routers and <a href="http://www.openwrt.org">OpenWRT</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Update-Aug 8:th 2010</h2>
<p>I was contacted by HTC&nbsp;UK to get more feedback to their support site. It always make me happy when a company listen to the customer and try to improve the customer experience. Hopefully the HTC support web will contain enough info in the future so I&nbsp;could resolve the problems I&nbsp;had by going there. Good work HTC!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F08%2F03%2Fmy-experience-with-installing-android-2-2-froyo-on-htc-desire%2F&amp;title=My%20experience%20with%20installing%20Android%202.2%20Froyo%20on%20HTC%20Desire" id="wpa2a_26"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/08/03/my-experience-with-installing-android-2-2-froyo-on-htc-desire/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Install OpenWRT on LaFonera 2.0G router, FON2202</title>
		<link>http://www.it-slav.net/blogs/2010/06/28/install-openwrt-on-lafonera-2-0g-router-fon2202/</link>
		<comments>http://www.it-slav.net/blogs/2010/06/28/install-openwrt-on-lafonera-2-0g-router-fon2202/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 19:18:40 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[2.0G]]></category>
		<category><![CDATA[2202]]></category>
		<category><![CDATA[LaFonera]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1872</guid>
		<description><![CDATA[&#160; Background After waiting for the Hummingbird release for the LaFonera 2.0G a long time and discussed with the Fon support team when 3G&#160;dongles will work, I&#160;gave up and installed OpenWRT on my LaFonera 2.0G router. &#160; I&#8217;m sorry FON, you have a cool idea and nice routers but your unlogical approach to the users [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<h2>Background</h2>
<p>After waiting for the <a href="http://blog.fonosfera.org/fly-baby-fly-gari-the-hummingbird-is-born/">Hummingbird</a> release for the LaFonera 2.0G a long time and discussed with the Fon support team when 3G&nbsp;dongles will work, I&nbsp;gave up and installed OpenWRT on my LaFonera 2.0G router.</p>
<p>&nbsp;</p>
<p>I&#8217;m sorry FON, you have a cool idea and nice routers but your unlogical approach to the users and communtity, finally got me to install plain OpenWRT instead.</p>
<p>&nbsp;</p>
<h2>Installation</h2>
<p>After alot of googling and testing and downloading, reading and so on, I&nbsp;finally run into a <a href="http://linwin-solutions.com/index.php?option=com_blog&amp;view=comments&amp;pid=1&amp;Itemid=0" target="_blank">guide</a> that worked for me.</p>
<p>Most of the descriptions and howto assumes that the RedBoot will accept to download a new firmware via TFTP, this is true with the early releases of 2.0G , but the one sold now do not have this feature.</p>
<p>The trick is to install a firmware that allows changing the RedBoot partition of the memory, change the RedBoot parttion and install OpenWRT&nbsp;via TFTP.</p>
<p>&nbsp;</p>
<p>The guide is unfortunatly in French, but google translate helped me to <a href="http://translate.google.se/translate?u=http%3A%2F%2Flinwin-solutions.com%2Findex.php%3Foption%3Dcom_blog%26view%3Dcomments%26pid%3D1%26Itemid%3D0&amp;sl=fr&amp;tl=en&amp;hl=&amp;ie=UTF-8">translate it</a> to English.</p>
<p>
The pitfalls I&nbsp;run into is to reboot the device several timesafter installing the hacked version of FON&nbsp;firmware: FON2202_2.2.5.0_Flipper_RedBootC_VoteGOP.image</p>
<p>The only difference is that I used a later version of <a href="http://www.openwrt.org">OpenWRT</a>. I used Backfire <a href="http://downloads.openwrt.org/backfire/10.03/atheros/">10.03</a> instead of Kamikaze <a href="ftp://downloads.linwin-solutions.com/hxcwyxwr/fonera_openwrt/fon-flash-linux/">8.9.1</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F06%2F28%2Finstall-openwrt-on-lafonera-2-0g-router-fon2202%2F&amp;title=Install%20OpenWRT%20on%20LaFonera%202.0G%20router%2C%20FON2202" id="wpa2a_28"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/06/28/install-openwrt-on-lafonera-2-0g-router-fon2202/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto use 3G dongle Huawei E1750 in OpenWrt</title>
		<link>http://www.it-slav.net/blogs/2010/06/12/howto-use-3g-dongle-huawei-e1750-in-openwrt/</link>
		<comments>http://www.it-slav.net/blogs/2010/06/12/howto-use-3g-dongle-huawei-e1750-in-openwrt/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 18:38:03 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linksys]]></category>
		<category><![CDATA[Linksys WRT160NL]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[WRT160NL]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1838</guid>
		<description><![CDATA[Background After succesfully installed my new Linksys WRT160NL with OpenWrt, the next step is to configure it. As the summer is approaching and my need for Internet access in our summer cottage will arrise. The summer cottage is in the middle of nowhere so it would be handy to put a USB dongle and the [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>After <a href="http://www.it-slav.net/blogs/2010/06/04/install-openwrt-on-linksys-wrt160nl/">succesfully</a> installed my new Linksys WRT160NL with OpenWrt, the next step is to configure it. As the summer is approaching and my need for Internet access in our summer cottage will arrise. The summer cottage is in the middle of nowhere so it would be handy to put a USB dongle and the Wlan router in the spot with best 3G field strength and use the WiFi to connect several computers to the router and Internet.</p>
<p>The 3G USB&nbsp;modem is a Huawei modem I&nbsp;bought for 20&nbsp;EUR and unlocked using <a href="http://www.it-slav.net/blogs/2010/05/02/unlock-huawei-modems/">this</a> guide.</p>
<p>I found an excellent <a href="http://josefsson.org/openwrt/dongle.html">guide</a> describing excactly what I&nbsp;wanted todo but it did not work 100%&nbsp;in my environment so I will describe what I did to get it running. Read the <a href="http://josefsson.org/openwrt/dongle.html">guide</a> to get background and deeper explanation of how things are done. This guide assumes that you have read the <a href="http://josefsson.org/openwrt/dongle.html">guide</a>, basic knowledge of OpenWRT, howto edit files in a Linux environment and so on.<span id="more-1838"></span></p>
<p>&nbsp;</p>
<h3>Installation</h3>
<p>The USB&nbsp;hardware and the modem need some extra packages to be installed. I installed the following:</p>
<pre>
root@WRT160NL:~#opkg install kmod-ar9170 kmod-usb-acm kmod-usb-core kmod-usb-ohci kmod-usb-serial comgt
kmod-usb-serial-option kmod-usb-storage kmod-usb-uhci kmod-usb2&nbsp; usb-switch</pre>
<p>Probably not all of them are necessery but during my tests and fiddeling these are the ones I installed.</p>
<p>&nbsp;</p>
<h3>Configuration</h3>
<p>Create /etc/modules.d/60-usb-serial:</p>
<pre>
usbserial vendor=0x12d1 product=0x1446
 </pre>
<p>The vendor and product parameters can be found by attaching the 3G modem and run:</p>
<pre>
root@WRT160NL:~# cat /proc/bus/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.32.10 ehci_hcd
S:  Product=Atheros AR91xx built-in EHCI controller
S:  SerialNumber=ar71xx-ehci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  <span style="background-color: rgb(255, 255, 0);">Vendor=12d1 ProdID=1446</span> Rev= 0.00
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
 </pre>
<p>The parameters are marked in yellow above.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The next step is to configure usb switch. Create /etc/usb-modeswitch.conf</p>
<pre>
########################################################
# Huawei E270+  (HSPA+ modem)

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor=  0x12d1
TargetProductList=&quot;1001,1406,140c,14ac&quot;

CheckSuccess=20

MessageContent=&quot;55534243123456780000000000000011060000000000000000000000000000&quot;</pre>
<p>I have no clue of the syntax but I&nbsp;copied it from my Ubuntu machine /etc/usb_modeswitch.d/12d1:1446 and it works:-)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Add the following to /etc/config/network</p>
<pre>
config 'interface' 'ppp0'
    option 'ifname' 'ppp0'
    option 'proto' '3g'
    option 'device' '/dev/ttyUSB0'
    option 'apn' 'internet.tele2.se'
    option 'pincode' '1234'</pre>
<p>The pincode is obvious, the apn is local and given by your local operator. It is handy to configure it to work in Ubuntu and then look at the configuration Ubuntu creates. <br />
&nbsp;</p>
<p>&nbsp;</p>
<p>The firewall rules need to be updated and I added ppp0 to the wan section in /etc/config/firewall</p>
<pre>
config 'zone'
    option 'name' 'wan'
    option 'input' 'REJECT'
    option 'output' 'ACCEPT'
    option 'forward' 'REJECT'
    option 'masq' '1'
    option 'mtu_fix' '1'
    option 'network' 'wan ppp0'</pre>
<p>To make the change to take effect run:</p>
<pre>
root@WRT160NL:~# /etc/init.d/firewall restart
 </pre>
<h3>&nbsp;</h3>
<h3>Start it</h3>
<p>Attach the modem and run:</p>
<pre>
root@WRT160NL:~# usb_modeswitch

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found default devices (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
&nbsp;OK, driver found (&quot;usbserial_generic&quot;)
&nbsp;OK, driver &quot;usbserial_generic&quot; detached

SCSI inquiry data (for identification)
-------------------------
&nbsp; Vendor String: HUAWEI&nbsp;
&nbsp;&nbsp; Model String: Mass Storage&nbsp;&nbsp;&nbsp;
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
&nbsp;&nbsp;&nbsp;&nbsp; Product: HUAWEI Mobile
&nbsp; Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
&nbsp;OK, message successfully sent
&nbsp;Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
&nbsp;Original device is gone already, not checking
&nbsp;Searching for target devices ...
&nbsp;Searching for target devices ...
&nbsp;Searching for target devices ...
&nbsp;Searching for target devices ...
&nbsp;Searching for target devices ...
&nbsp;Found correct target device

Mode switch succeeded. Bye.
 </pre>
<p>&nbsp;</p>
<p>logread should now give something similiar to:</p>
<pre>
Jun 12 17:29:11 WRT160NL user.info kernel: generic ttyUSB0: generic converter now disconnected from ttyUSB0
Jun 12 17:29:11 WRT160NL user.info kernel: usbserial_generic 1-1:1.0: device disconnected
Jun 12 17:29:11 WRT160NL user.warn kernel: usb 1-1: usbfs: process 1345 (usb_modeswitch) did not claim interface 0 before use
Jun 12 17:29:11 WRT160NL user.info kernel: usb 1-1: USB disconnect, address 2
Jun 12 17:29:11 WRT160NL user.info kernel: generic ttyUSB1: generic converter now disconnected from ttyUSB1
Jun 12 17:29:11 WRT160NL user.info kernel: usbserial_generic 1-1:1.1: device disconnected
Jun 12 17:29:16 WRT160NL user.info kernel: usb 1-1: new high speed USB device using ar71xx-ehci and address 3
Jun 12 17:29:16 WRT160NL user.info kernel: usb 1-1: configuration #1 chosen from 1 choice
Jun 12 17:29:16 WRT160NL user.info kernel: option 1-1:1.0: GSM modem (1-port) converter detected
Jun 12 17:29:16 WRT160NL user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Jun 12 17:29:16 WRT160NL user.info kernel: option 1-1:1.1: GSM modem (1-port) converter detected
Jun 12 17:29:16 WRT160NL user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Jun 12 17:29:16 WRT160NL user.info kernel: option 1-1:1.2: GSM modem (1-port) converter detected
Jun 12 17:29:16 WRT160NL user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
Jun 12 17:29:16 WRT160NL user.info kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Jun 12 17:29:16 WRT160NL user.debug kernel: usb-storage: device found at 3
Jun 12 17:29:16 WRT160NL user.debug kernel: usb-storage: waiting for device to settle before scanning
Jun 12 17:29:16 WRT160NL user.info kernel: scsi4 : SCSI emulation for USB Mass Storage devices
Jun 12 17:29:16 WRT160NL user.debug kernel: usb-storage: device found at 3
Jun 12 17:29:16 WRT160NL user.debug kernel: usb-storage: waiting for device to settle before scanning
Jun 12 17:29:21 WRT160NL user.notice kernel: scsi 3:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jun 12 17:29:21 WRT160NL user.debug kernel: usb-storage: device scan complete
Jun 12 17:29:21 WRT160NL user.notice kernel: scsi 4:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
Jun 12 17:29:21 WRT160NL user.notice kernel: sd 4:0:0:0: [sda] Attached SCSI removable disk
Jun 12 17:29:21 WRT160NL user.debug kernel: usb-storage: device scan complete
 </pre>
<h3>&nbsp;</h3>
<h3>Using it</h3>
<p>To start using your new configuration:</p>
<pre>
root@WRT160NL:~# ifup ppp0
SIM ready
PIN set successfully
</pre>
<p>And now ping a host on Internet</p>
<pre>
root@WRT160NL:~# ping ftp.sunet.se
PING ftp.sunet.se (194.71.11.69): 56 data bytes
64 bytes from 194.71.11.69: seq=0 ttl=55 time=119.351 ms
64 bytes from 194.71.11.69: seq=1 ttl=55 time=88.978 ms
64 bytes from 194.71.11.69: seq=2 ttl=55 time=88.751 ms
64 bytes from 194.71.11.69: seq=3 ttl=55 time=88.484 ms
64 bytes from 194.71.11.69: seq=4 ttl=55 time=128.257 ms
^C
--- ftp.sunet.se ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 88.484/102.764/128.257 ms
 </pre>
<p>Stop your connection:</p>
<pre>
root@WRT160NL:~# ifdown ppp0</pre>
<p>&nbsp;</p>
<h3>Useful links</h3>
<ul>
<li><a href="http://josefsson.org/openwrt/dongle.html">http://josefsson.org/openwrt/dongle.html </a>The excellent guide that I used as a platform, read it!</li>
<li><a href="http://www.openwrt.org">OpenWrt</a>, Linuxbased firmware for routers</li>
</ul>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F06%2F12%2Fhowto-use-3g-dongle-huawei-e1750-in-openwrt%2F&amp;title=Howto%20use%203G%20dongle%20Huawei%20E1750%20in%20OpenWrt" id="wpa2a_30"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/06/12/howto-use-3g-dongle-huawei-e1750-in-openwrt/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Install OpenWRT on Linksys WRT160NL</title>
		<link>http://www.it-slav.net/blogs/2010/06/04/install-openwrt-on-linksys-wrt160nl/</link>
		<comments>http://www.it-slav.net/blogs/2010/06/04/install-openwrt-on-linksys-wrt160nl/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 18:37:58 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Linksys WRT160NL]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1825</guid>
		<description><![CDATA[&#160; Background After getting fedup with the bad fon support I decided to give a new wireless router a try. After browsing internet and openwrt forums I&#160;thought that a Linksys WRT160NL would fulfill my requirements: The requrements are: N 3G USB&#160;dongle Cheap &#160; Packing up The installation from Linksys is crap, a CD comes with [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<h3>Background</h3>
<p>After getting fedup with the bad fon support I decided to give a new wireless router a try. After browsing internet and openwrt forums I&nbsp;thought that a Linksys WRT160NL would fulfill my requirements:</p>
<p>The requrements are:</p>
<ul>
<li>N</li>
<li>3G USB&nbsp;dongle</li>
<li>Cheap</li>
</ul>
<p>&nbsp;<span id="more-1825"></span></p>
<h3>Packing up</h3>
<p>The installation from Linksys is crap, a CD comes with the product and if you want to configure it you need to install software from the CD. The only supported operating systems are windows or Mac, I&nbsp;run linux.</p>
<p>I skipped the CD&nbsp;and connected my Linux box with a ethernet cable to the router. I tried to connect to http://192.168.1.1 and got a login screen.</p>
<p>After some <a href="http://www.speedguide.net/broadband-view.php?hw=307">googling</a> I&nbsp;found that the default login was blank and the password admin.</p>
<p>I managed to configure my new router after logging in. I&nbsp;do not now the purpose of the CD, real stupid.</p>
<p>&nbsp;</p>
<h3>Install OpenWRT</h3>
<p>I&nbsp;read the <a href="http://wiki.openwrt.org/toh/linksys/wrt160nl.">instructions</a> to get OpenWRT on my Linksys WRT160NL and tried the &quot;OEM&nbsp;easy installation&quot;. According to the instruction <a href="http://downloads.openwrt.org/backfire/10.03/ar71xx/openwrt-ar71xx-wrt160nl-squashfs.bin">openwrt-ar71xx-wrt160nl-squashfs.bin</a> is the image to install. Unfortunatly I get an errormessage &quot; Firmware Upgrade Failed!&quot;</p>
<p>I&nbsp;upgraded the firmware to the latest Linksys firmware and after that tried the OpenWRT&nbsp;firmware with the same error message.</p>
<p>After some bad language and alot of googling I found a <a href="https://dev.openwrt.org/ticket/7300">bug</a> reported that the version I&nbsp;tried to install always gives that message when installed from the Linksys webgui.</p>
<p>So I&nbsp;tried the Beta <a href="http://downloads.openwrt.org/backfire/10.03-beta/ar71xx/openwrt-ar71xx-wrt160nl-squashfs.bin">version</a> instead and finally I success message.</p>
<p>I&nbsp;telneted to 192.168.1.1 and run passwd to change my password.</p>
<p>ssh to 192.168.1.</p>
<p>run:</p>
<pre>
root@OpenWrt:~# opkg update

root@OpenWrt:~# opkg install kmod-ath9k

root@OpenWrt:~# opkg install  hostapd</pre>
<p>And start configure.</p>
<p>&nbsp;</p>
<h3>Update BETA to stable version</h3>
<p>It was a annoying feeling to run beta when a stable version existed.</p>
<p>I&nbsp;used the luci webgui to update the firmware to the stable version and it looked alright. I&nbsp;managed to log in both with ssh and webgui.</p>
<p>But when I&nbsp;tried to install a new package it gave me an error message that there was no free disk, sigh!</p>
<p>I installed the BETA version and it worked, tried RC3 and the same problem with no free disk.</p>
<p>After some bad language and a lot of fiddeling I&nbsp;updated to the stable with the checkbox &quot;Keep configuration files&quot; unchecked and this time it works flawless.</p>
<p>Follow the guidlines above to change root password, update the software package list, install wlansupport, WAP support&nbsp; and start configure.</p>
<p>&nbsp;</p>
<p>A succefull login below:</p>
<pre>
peter@peter-laptop:~$ ssh -l root 192.168.1.1
root@192.168.1.1's password:

BusyBox v1.15.3 (2010-04-06 03:14:11 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03, r20728) --------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua
  * 1/3 shot Bailey's  on the bottom, then Bailey's,
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
</pre>
<pre>
root@WRT160NL:~# uname -a
Linux WRT160NL 2.6.32.10 #20 Tue Apr 6 15:01:26 CEST 2010 mips GNU/Linux
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F06%2F04%2Finstall-openwrt-on-linksys-wrt160nl%2F&amp;title=Install%20OpenWRT%20on%20Linksys%20WRT160NL" id="wpa2a_32"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/06/04/install-openwrt-on-linksys-wrt160nl/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Enable Huawei E1750 in Ubuntu 10.04</title>
		<link>http://www.it-slav.net/blogs/2010/05/23/enable-huawei-e1750-in-ubuntu-10-04/</link>
		<comments>http://www.it-slav.net/blogs/2010/05/23/enable-huawei-e1750-in-ubuntu-10-04/#comments</comments>
		<pubDate>Sun, 23 May 2010 07:10:27 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Huawei]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1792</guid>
		<description><![CDATA[&#160; I&#8217;m the happay owner of a Huawei E1750 modem and it is real easy to get it running in Ubuntu. This guide will probably work with many other 3G USB&#160;modems. Just type from the command line: sudo apt-get install usb-modeswitch Plug in the modem Go to the Network manager and enter your Mobile Broadband [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>I&#8217;m the happay owner of a Huawei E1750 modem and it is real easy to get it running in Ubuntu. This guide will probably work with many other 3G USB&nbsp;modems.</p>
<p>Just type from the command line:</p>
<pre>
sudo apt-get install usb-modeswitch
</pre>
<p>Plug in the modem</p>
<p>Go to the Network manager and enter your Mobile Broadband credentials and now it works!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F05%2F23%2Fenable-huawei-e1750-in-ubuntu-10-04%2F&amp;title=Enable%20Huawei%20E1750%20in%20Ubuntu%2010.04" id="wpa2a_34"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/05/23/enable-huawei-e1750-in-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Android app for Nagios or op5 Monitor</title>
		<link>http://www.it-slav.net/blogs/2010/05/01/android-app-for-nagios-or-op5-monitor/</link>
		<comments>http://www.it-slav.net/blogs/2010/05/01/android-app-for-nagios-or-op5-monitor/#comments</comments>
		<pubDate>Sat, 01 May 2010 13:30:56 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[NagMonDroid]]></category>
		<category><![CDATA[Nagroid]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1764</guid>
		<description><![CDATA[&#160; With my new and fancy HTC Desire I wanted to look at my Nagios or op5 Monitor status. I&#160;have found two apps Nagroid and NagMonDroid. &#160; NagMonDroid did I&#160;not get working, probably because op5 Monitor only uses https as protocol. &#160; Nagroid works like a charm: &#160; The configuration is rather straightforward:]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>With my new and fancy HTC Desire I wanted to look at my <a href="http://www.nagios.org">Nagios</a> or <a href="http://www.op5.com/op5/products/network-monitor">op5 Monitor</a> status. I&nbsp;have found two apps <a href="http://www.kiu.weite-welt.com/de.schoar.android//nagroid/help/">Nagroid</a> and <a href="http://www.simonmclaughlin.co.uk/page/Android_Apps/">NagMonDroid</a>.</p>
<p>&nbsp;<span id="more-1764"></span></p>
<p>NagMonDroid did I&nbsp;not get working, probably because op5 Monitor only uses https as protocol.</p>
<p>&nbsp;</p>
<p>Nagroid works like a charm:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/nagroid.png"><img width="480" height="800" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/nagroid.png" alt="" title="nagroid" class="aligncenter size-full wp-image-1765" /></a></p>
<p>&nbsp;</p>
<p>The configuration is rather straightforward:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/nagroid-settings.png"><img width="480" height="800" class="aligncenter size-full wp-image-1768" title="nagroid-settings" alt="" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/nagroid-settings.png" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F05%2F01%2Fandroid-app-for-nagios-or-op5-monitor%2F&amp;title=Android%20app%20for%20Nagios%20or%20op5%20Monitor" id="wpa2a_36"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/05/01/android-app-for-nagios-or-op5-monitor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hint: Howto get Android SDK working on Ubuntu</title>
		<link>http://www.it-slav.net/blogs/2010/05/01/hint-howto-get-android-sdk-working-on-ubuntu/</link>
		<comments>http://www.it-slav.net/blogs/2010/05/01/hint-howto-get-android-sdk-working-on-ubuntu/#comments</comments>
		<pubDate>Sat, 01 May 2010 13:14:02 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[screenshoots]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1751</guid>
		<description><![CDATA[&#160; I wanted to use the Android SDK on my Ubuntu machine, mainly to grab screenshoots but also to play around with it. &#160; I followed the guidelines at this guide, but it did not work. DDM just show garbage as the device and when trying to get a screenshoot it complained with: 54:42 W/ddms: [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>I wanted to use the Android SDK on my Ubuntu machine, mainly to grab screenshoots but also to play around with it.</p>
<p>&nbsp;</p>
<p>I followed the guidelines at <a href="http://www.downloadsquad.com/2008/10/22/taking-screenshots-on-an-android-based-phone/">this</a> guide, but it did not work. DDM just show garbage as the device and when trying to get a screenshoot it complained with:</p>
<pre>
54:42 W/ddms: Unable to get frame buffer: device (????????????)
request rejected: insufficient permissions for device<span id="more-1751"></span>
</pre>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/ddm-fel.png"><img src="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/ddm-fel.png" alt="" title="ddm-fel" class="aligncenter size-full wp-image-1752" style="width: 687px; height: 513px;" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>After some googling i figured out that I had to hack my udev rules.</p>
<p>I added to /etc/udev/rules.d/51-android.rules</p>
<pre>
SUBSYSTEMS==&quot;usb&quot;, ATTRS{idVendor}==&quot;0bb4&quot;, ATTRS{idProduct}==&quot;0c87&quot;, MODE=&quot;0666&quot;
 </pre>
<pre>
and run

reload udev</pre>
<p>&nbsp;</p>
<p>The idVendor and&nbsp; idProduct was found by running lsusb:</p>
<pre>
# lsusb
Bus 002 Device 011: ID 0bb4:0c87 High Tech Computer Corp. 
</pre>
<p>&nbsp;</p>
<p>Now when starting DDM:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/ddm-funkar.png"><img src="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/ddm-funkar.png" alt="" title="ddm-funkar" class="aligncenter size-full wp-image-1753" style="width: 646px; height: 490px;" /></a></p>
<p>&nbsp;</p>
<p>And I&nbsp;can take screenshoots:</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/android-screenshoot.png"><img width="480" height="800" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/05/android-screenshoot.png" alt="" title="android-screenshoot" class="aligncenter size-full wp-image-1754" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F05%2F01%2Fhint-howto-get-android-sdk-working-on-ubuntu%2F&amp;title=Hint%3A%20Howto%20get%20Android%20SDK%20working%20on%20Ubuntu" id="wpa2a_38"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/05/01/hint-howto-get-android-sdk-working-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finally it has arrived, my HTC Desire</title>
		<link>http://www.it-slav.net/blogs/2010/04/30/finally-it-has-arrived-my-htc-desire/</link>
		<comments>http://www.it-slav.net/blogs/2010/04/30/finally-it-has-arrived-my-htc-desire/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 18:09:22 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[htc desire]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1740</guid>
		<description><![CDATA[After waiting for several weeks, my new phone, a HTC Desire has finally arrived. I have been a heavy cellphone user since started working as a Tivoli consultant in -98. I bought my first cellphone -94 and have had several so called smart phones both from Nokia and Ericsson. &#160; For the first time I [...]]]></description>
			<content:encoded><![CDATA[<p>After waiting for several weeks, my new phone, a HTC Desire has finally arrived. I have been a heavy cellphone user since started working as a Tivoli consultant in -98. I bought my first cellphone -94 and have had several so called smart phones both from Nokia and Ericsson.</p>
<p>&nbsp;</p>
<p>For the first time I felt that this is more than a phone, for the first time calender integration works, for the first time I can use the builtin GPS, for the first time accessing the web with a phone works, for the first time downloaded software really works.</p>
<p>&nbsp;<span id="more-1740"></span></p>
<p>&nbsp;</p>
<p>My favorite apps so far is:</p>
<ul>
<li>Nagroid, to be able to view my <a href="http://www.op5.com/op5/products/network-monitor">op5 Monitor</a> status</li>
<li>FONMaps, find hotspots for LaFoneras</li>
<li>Car Cast, listen and download podcasts</li>
<li>MapDroid, to use preloaded OpenStreetmaps and GPS without using any bandwidth. Perfect when abroad because of the crazy price of data roaming outside Sweden.</li>
<li>HTC&nbsp;Facebook, read and post on facebook</li>
<li>FON&nbsp;Access, automatically connect to FON&nbsp;hotspots when traveling.</li>
<li>GPS Logger, logg tracks in gpx format that almost any GPS software understand</li>
<li>Sipdroid, to connect to my Asterisk PBX using 3G or WiFi</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Of&nbsp; cource the device is not perfect, I miss:</p>
<ul>
<li>The phone must be &#8216;rooted&#8217; to be real useful, why? Open the phone so the community and others can develop apps that are real useful. Vendor lock-in always sucks.</li>
<li>IPSec VPN so I&nbsp;can connect to my IPSec based OpenBSD firewall. The IPSec implementation in the phone sucks.</li>
<li>OpenVPN, there exists OpenVPN&nbsp;apps but to use the the phone must be &#8216;rooted&#8217;</li>
<li>Bluetooth modem, it is not possible to use the phone as a modem using bluetooth</li>
<li>Screenshots, the phone must be rooted or using the SDK to take screenshoots. Why?</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I really hope that Google and/or HTC understand and use the power of the community to make the Android even more succesfull by open it even more.</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F04%2F30%2Ffinally-it-has-arrived-my-htc-desire%2F&amp;title=Finally%20it%20has%20arrived%2C%20my%20HTC%20Desire" id="wpa2a_40"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/04/30/finally-it-has-arrived-my-htc-desire/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Developer Firmware on Fonera router</title>
		<link>http://www.it-slav.net/blogs/2010/03/29/installing-developer-firmware-on-fonera-router/</link>
		<comments>http://www.it-slav.net/blogs/2010/03/29/installing-developer-firmware-on-fonera-router/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 20:11:39 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1705</guid>
		<description><![CDATA[Background I bought a Fonera 2.0g WLAN router and I wanted to extend the functionality to have the possibility to add packages from OpenWRT. I also wanted the possibility to manage my new router with ssh. The way to achive this is by installing developer firmware. &#160; &#160; &#160; Installing I followed the instructions at [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>I bought a Fonera 2.0g WLAN router and I wanted to extend the functionality to have the possibility to add <a href="http://downloads.openwrt.org/kamikaze/8.09/atheros/packages/">packages</a> from OpenWRT. I also wanted the possibility to manage my new router with ssh.</p>
<p>The way to achive this is by installing developer firmware.</p>
<h3><span id="more-1705"></span></h3>
<h3>&nbsp;</h3>
<h3>&nbsp;</h3>
<h3>&nbsp;</h3>
<h3>Installing</h3>
<p>I followed the instructions at Fons beta/developer <a href="http://wiki.fon.com/wiki/Fon-ng:_Get_Involved">wiki</a>.</p>
<p>The image I used can be found <a href="http://download.fonosfera.org/RC/20090713_FON2202_2.2.6.0_rc5_DEV.tar.gz">here</a>.</p>
<h3>&nbsp;</h3>
<h3>&nbsp;</h3>
<h3>&nbsp;&nbsp;</h3>
<h3>Test</h3>
<p>I try to connect by using ssh</p>
<pre>
peter@peter-laptop:~$ ssh -l root 192.168.10.1
root@192.168.10.1's password: 

BusyBox v1.11.1 (2009-04-17 12:45:57 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

                                        __
                                    _.-~  )
                         _..--~~~~,'   ,-/     _
                      .-'. . . .'   ,-','    ,' )
                    ,'. . . _   ,--~,-'__..-'  ,'
                  ,'. . .  (@)' ---~~~~      ,'
                 /. . . . '~~             ,-'
                /. . . . .             ,-'
               ; . . . .  - .        ,'
              : . . . .       _     /
             . . . . .          `-.:
            . . . ./  - .          )
           .  . . |  _____..---.._/ ____ Seal _
     ~---~~~~----~~~~             ~~                

                      Flipper                       

--------  Fonera 2.0 Firmware (v2.2.5.0) -----------
      * Based on OpenWrt - http://openwrt.org
      * Powered by FON - http://www.fon.com
----------------------------------------------------</pre>
<div>&nbsp;</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F03%2F29%2Finstalling-developer-firmware-on-fonera-router%2F&amp;title=Installing%20Developer%20Firmware%20on%20Fonera%20router" id="wpa2a_42"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/03/29/installing-developer-firmware-on-fonera-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install SNMP on OpenWRT</title>
		<link>http://www.it-slav.net/blogs/2010/03/23/install-snmp-on-openwrt/</link>
		<comments>http://www.it-slav.net/blogs/2010/03/23/install-snmp-on-openwrt/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 20:30:47 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[LaFonera]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1686</guid>
		<description><![CDATA[&#160; When using a cool router software like OpenWRT it is a good idea to monitor the network usage. This article describe howto get SNMP&#160;on your OpenWRT&#160;based router. &#160; &#160; 1. Install The easiest way is to use the webgui, http://&#60;your router ip&#62; Log in as root/-&#60;your password&#62; Click on Adminstrator to enable the Advnced [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>When using a cool router software like OpenWRT it is a good idea to monitor the network usage. This article describe howto get SNMP&nbsp;on your OpenWRT&nbsp;based router.</p>
<h2>&nbsp;<span id="more-1686"></span></h2>
<h2>&nbsp;</h2>
<h2>1. Install</h2>
<p>The easiest way is to use the webgui, http://&lt;your router ip&gt;</p>
<ol>
<li>Log in as root/-&lt;your password&gt;</li>
<li>Click on Adminstrator to enable the Advnced menues</li>
<li>System-&gt;Software</li>
<li>Click on &quot;Update Package List&quot; (this require Internet access).</li>
<li>Install snmpd-static</li>
</ol>
<p>&nbsp;</p>
<h3>&nbsp;</h3>
<h3>&nbsp;</h3>
<h3>2. Configure</h3>
<p>Log in to the La Fonera using ssh:</p>
<pre>
peter@peter-laptop:~$ ssh -l root 192.168.0.159
root@192.168.0.159's password:

BusyBox v1.11.2 (2009-12-02 11:25:47 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (8.09.2, r18961) -------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@fon:~#
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Start snmpd</p>
<pre>
root@fon:~# /etc/init.d/snmpd start
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Make it start when rebooted:</p>
<pre>
root@fon:~# /etc/init.d/snmpd enable
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>If you want to change your SNMP configuration the configuration is located in:</p>
<pre>
/etc/config/snmpd.conf
</pre>
<p>&nbsp;</p>
<h3>&nbsp;</h3>
<h3>3. Monitor</h3>
<p>Now you can get the SNMP&nbsp;data and use your favorite Monitor tool, i.e. Nagios or op5 Monitor.</p>
<p>Below a screenshoot from op5 Monitor:</p>
<p>&nbsp;<a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/fon-traffic.png"><img width="603" height="195" class="aligncenter size-full wp-image-1690" title="fon-traffic" alt="" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/fon-traffic.png" /></a></p>
<p>&nbsp;</p>
<h3>&nbsp;</h3>
<h3>&nbsp;</h3>
<h3>Useful links</h3>
<ul>
<li><a href="http://www.openwrt.org">OpenWRT</a>, an OpenSource router software</li>
<li><a href="http://www.net-snmp.org/">Net-SNMP</a>, an SNMP implementation</li>
<li><a href="http://nagios.org">Nagios</a>, an OpenSource Monitoring software</li>
<li><a href="http://www.op5.com/op5/products/network-monitor">op5 Monitor</a>, an Enterprise Class Monitoring software based on Nagios</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F03%2F23%2Finstall-snmp-on-openwrt%2F&amp;title=Install%20SNMP%20on%20OpenWRT" id="wpa2a_44"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/03/23/install-snmp-on-openwrt/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Install OpenWRT on LaFonera router</title>
		<link>http://www.it-slav.net/blogs/2010/03/21/install-openwrt-on-lafonera-router/</link>
		<comments>http://www.it-slav.net/blogs/2010/03/21/install-openwrt-on-lafonera-router/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 15:33:37 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Fon]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[La Fonera]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1667</guid>
		<description><![CDATA[&#160;Background I got an unused La Fonera router by a collegue. They can be bought from http://www.fon.com for approximately 40 Euro including freight. The purpose of the Fon community is to build a community of hotspots around the world so every owner of a La Fonera could use any other La Fonera router in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/fon.png"><br />
</a></p>
<h2>&nbsp;Background</h2>
<p>I got an unused La Fonera router by a collegue. They can be bought from <a href="http://www.fon.com">http://www.fon.com</a> for approximately 40 Euro including freight. The purpose of the Fon community is to build a community of hotspots around the world so every owner of a La Fonera could use any other La Fonera router in the world.</p>
<p>&nbsp;</p>
<p>I am curios about the legal aspect if someone in the Fon community uses my internet connection to do something bad, like download copyrighted software, hack CIA or whatever.</p>
<p>&nbsp;</p>
<p>The La Fonera router is real cool because:</p>
<ul>
<li>Looks good so it has a high wife acceptance factor</li>
<li>Hackable, the firmware could be replaced with for example <a href="http://www.openwrt.org">OpenWRT</a>, <a href="http://dd-wrt.com">DD-WRT</a>, <a href="http://www.digininja.org/jasager/">Jasager</a> and others&#8230;</li>
<li>Even more hackable, there are several guides and howtos to modify the La Fonera hardware.</li>
<li>Cheap, in the good old days it was possible to get one for free.<span id="more-1667"></span></li>
</ul>
<h2>&nbsp;</h2>
<h2>Install OpenWRT</h2>
<p>I&nbsp;followed this <a href="http://wiki.cuwin.net/index.php?title=Flashing_the_La_Fonera_with_OpenWRT">guide</a>, the only exception was that I used the latest OpenWRT in &quot;Phase C&quot;:</p>
<p>&nbsp;# ./ap51-flash-1.0-42 eth0 openwrt-atheros-root.squashfs openwrt-atheros-vmlinux.lzma</p>
<p>The files can be downloaded from <a href="http://www.openwrt.org">OpenWRTs</a> <a href="http://downloads.openwrt.org/">download section</a> for <a href="http://downloads.openwrt.org/kamikaze/8.09.2/atheros/">atheros platform</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/fon2.png"><img width="640" height="480" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/fon2.png" alt="" title="fon" class="aligncenter size-full wp-image-1675" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F03%2F21%2Finstall-openwrt-on-lafonera-router%2F&amp;title=Install%20OpenWRT%20on%20LaFonera%20router" id="wpa2a_46"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/03/21/install-openwrt-on-lafonera-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor HP Proliant with Nagios or Op5 Monitor</title>
		<link>http://www.it-slav.net/blogs/2010/03/02/monitor-hp-proliant-with-nagios-or-op5-monitor/</link>
		<comments>http://www.it-slav.net/blogs/2010/03/02/monitor-hp-proliant-with-nagios-or-op5-monitor/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 20:38:52 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[Cool things]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[HP SIM]]></category>
		<category><![CDATA[Insight Manager]]></category>
		<category><![CDATA[SIM]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1644</guid>
		<description><![CDATA[&#160; Background It is always a good idea to monitor the server hardware, in many cases the root cause of the probblem is hardware related like: a fan stops and the temperature gets to high, dust in the machine makes it to hot, disks that fails, memory corruption and so on.&#160; This article will describe [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<h2>Background</h2>
<p>It is always a good idea to monitor the server hardware, in many cases the root cause of the probblem is hardware related like: a fan stops and the temperature gets to high, dust in the machine makes it to hot, disks that fails, memory corruption and so on.&nbsp; This article will describe howto enable hardware monitoring on a HP&nbsp;Proliant running CentOS Linux and then howto collect the data with Nagios or op5 Monitor. The procedure is the same with RedHat Enterprise Linux and similiar with Suse Enterprise server.</p>
<p>The HP&nbsp;manuals and information is bloated with irrelevant information and I&nbsp;had to struggle several hours, ask collegues to get it running. I&nbsp;hope this blog article will help others to get monitoring of HP Proliant using HP Insight Manager easier to setup.</p>
<h2>&nbsp;<span id="more-1644"></span></h2>
<p>&nbsp;</p>
<h2>Installing the software on the target system</h2>
<p>You need two packages from HP and can be downloaded from <a href="http://www.hp.com">hp.com</a> under &quot;Support &amp; Drivers&quot;. Search your hardware plattform and correct operating system:</p>
<ul>
<li>ProLiant Support Pack for Red Hat Enterprise Linux 5 (i686)&nbsp; The latest Proliant Support Package 2010-03-02 name is psp-8.25.rhel5.i686.en.tar.gz</li>
<li>HP System Health Application and Insight Management Agents for Red Hat Enterprise Linux 5 (x86). The latest name is hpasm-8.0.0-173.rhel5.i386.rpm</li>
</ul>
<p>&nbsp;</p>
<p>Install kernel source code and rpm tools:</p>
<pre>
# yum install kernel-devel rpm-build rpm-devel
 </pre>
<p>&nbsp;</p>
<p>Proliant Support Package is not supported on CentOS so you have to let the installer think it is a RedHat system. If you have a RHEL&nbsp;system skip the next steps.</p>
<pre>
# cp /etc/redhat-release /etc/redhat-release.backup

# echo &quot;Red Hat Enterprise Linux Server release 5.4 (Tikanga)&quot;&gt;/etc/redhat-release</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Untar the Proliant Support Package</p>
<pre>
 # tar xzvf psp-8.25.rhel5.i686.en.tar.gz</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Install the  Proliant Support Package</p>
<pre>
# cd compaq/csp/linux/

# ./install825.sh</pre>
<p>alot of text appears and some questions, answer them.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Install HP System Health Application and Insight Management Agents, and for some stupid reason it is in conflict with some other packages just installed. I solved it in a dirty way:</p>
<pre>
# rpm -i --force  --replacefiles --nodeps hpasm-8.0.0-173.rhel5.i386.rpm</pre>
<p>Configure by running:</p>
<pre>
# hpa/etc/init.d/hpasm configure</pre>
<p>and answer the questions.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Do not forget to restore /etc/redhat-release</p>
<pre>
# cp /etc/redhat-release.backup /etc/redhat-release</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I&nbsp;did modify my /etc/snmp/snmp.conf to:</p>
<pre>
dlmod cmaX /usr/lib/libcmaX.so
rocommunity public
trapsink 10.1.1.20
syscontact peter@it-slav.net
syslocation PDC, Peters DataCenter</pre>
<p>&nbsp;</p>
<p>To test that you have installation and configuration work, run a snmpwalk from your Nagios or op5 Monitor host:</p>
<pre>
# snmpwalk -c public -v1  &lt;ip-adress of your proliant box&gt; 1.3.6.1.4.1.232

SNMPv2-SMI::enterprises.232.1.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.1.1.2.0 = INTEGER: 23
SNMPv2-SMI::enterprises.232.1.1.3.0 = INTEGER: 2
SNMPv2-SMI::enterprises.232.1.2.1.4.1.0 = INTEGER: 30
SNMPv2-SMI::enterprises.232.1.2.1.4.2.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.232.1.2.1.4.2.1.2.1 = STRING: &quot;Compaq Standard Equipment Agent for Linux&quot;
SNMPv2-SMI::enterprises.232.1.2.1.4.2.1.3.1 = &quot;&quot;
SNMPv2-SMI::enterprises.232.1.2.1.4.2.1.4.1 = Hex-STRING: 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.232.1.2.1.4.2.1.5.1 = STRING: &quot;To gather Standard Equipment data for Linux.&quot;

...
 </pre>
<h2>&nbsp;</h2>
<h2>Install check_hpasm on the Nagios or op5 Monitor host</h2>
<p>The <a href="http://labs.consol.de/lang/en/nagios/check_hpasm/">check_hpasm</a> can be downloaded from <a href="http://labs.consol.de/">Console Labs</a>.</p>
<p>Unpack the tarball</p>
<pre>
# tar xzvf check_hpasm-4.1.2.tar.gz</pre>
<p>&nbsp;</p>
<pre>
Configure and compile

# ./configure --prefix=/opt/plugins/custom/hp-insight --with-nagios-user=monitor --with-nagios-group=users --enable-perfdata

...

# make

...

# make install</pre>
<p>&nbsp;</p>
<p>Test</p>
<pre>
# /opt/plugins/custom/hp-insight/libexec/check_hpasm -H  -C public

OK - System: 'proliant dl360 g3', S/N: '7J31LMW6N01D', ROM: 'P31 01/28/2004', hardware working fine, da: 1 logical drives, 1 physical drives | fan_1=50% fan_2=50% temp_1_cpu=16;50;50 temp_2_cpu=15;65;65 temp_3_ioBoard=21;56;56 temp_4_cpu=20;65;65
</pre>
<p>Congratulations your plugin and hw monitoring works!</p>
<p>&nbsp;</p>
<h2>Configure Nagios or op5 Monitor<br />
&nbsp;</h2>
<p>checkcommands.cfg</p>
<pre>
# command 'check_hpasm'
define command{
    command_name                   check_hpasm
    command_line                   $USER1$/custom/libexec/check_hpasm -H $HOSTADDRESS$ -C $ARG1$
    }</pre>
<p>&nbsp;</p>
<p>services.cfg</p>
<pre>
# service 'Insight Manager'
define service{
    use                            default-service
    host_name                      humpa
    service_description            Insight Manager
    check_command                  check_hpasm!public
    contact_groups                 call_it-slav,it-slav_jabber,it-slav_mail
    }</pre>
<h2>&nbsp;</h2>
<p>Screenshoot, using ninja</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/hpinsightmgr.png"><img width="1242" height="182" src="http://www.it-slav.net/blogs/wp-content/uploads/2010/03/hpinsightmgr.png" alt="" title="hpinsightmgr" class="aligncenter size-full wp-image-1658" /></a></p>
<p>&nbsp;</p>
<h2>&nbsp;Useful links</h2>
<ul>
<li><a href="http://www.op5.com">op5</a>, a systems and network management company</li>
<li><a href="http://www.op5.com/op5/products/network-monitor">op5 Monitor</a>, an enterpise monitor system based on Nagios</li>
<li><a href="http://www.op5.org/community/projects/ninja">Ninja</a>, Nagios is now just awesome</li>
<li><a href="http://www.nagios.org">Nagios</a>, enterprise monitoring based on opensource</li>
<li><a href="http://welcome.hp.com/country/us/en/support.html">Hp support &amp; drivers</a>, a place to start looking for the HP software used in this article</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.it-slav.net%2Fblogs%2F2010%2F03%2F02%2Fmonitor-hp-proliant-with-nagios-or-op5-monitor%2F&amp;title=Monitor%20HP%20Proliant%20with%20Nagios%20or%20Op5%20Monitor" id="wpa2a_48"><img src="http://www.it-slav.net/blogs/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2010/03/02/monitor-hp-proliant-with-nagios-or-op5-monitor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

