<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Niels Horn's Blog</title>
	
	<link>http://blog.nielshorn.net</link>
	<description>Random thoughts, tips &amp; tricks about Slackware-Linux, Lego and Star Wars</description>
	<lastBuildDate>Thu, 11 Mar 2010 02:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NielsHornsBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="nielshornsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">NielsHornsBlog</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Hercules 3.07 released</title>
		<link>http://blog.nielshorn.net/2010/03/hercules-3-07-released/</link>
		<comments>http://blog.nielshorn.net/2010/03/hercules-3-07-released/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 02:50:11 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[ARMedslack]]></category>
		<category><![CDATA[Hercules]]></category>
		<category><![CDATA[Slackware]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=242</guid>
		<description><![CDATA[Today version 3.07 of Hercules, the System/370, ESA/390, and z/Architecture Emulator for Windows, Linux and Mac OSX, was released.
Since I use Hercules on an almost daily basis, I quickly downloaded the latest sources and prepared the new Slackware packages and SlackBuild script. The script is already in the &#8220;pending&#8221; queue, and the packages are being [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.nielshorn.net/wp-content/uploads/2010/03/hercules_logo.png" alt="hercules_logo" title="hercules_logo" width="256" height="256" class="alignleft size-full wp-image-243" />Today version 3.07 of <a href="http://www.hercules-390.org/index.html">Hercules</a>, the System/370, ESA/390, and z/Architecture Emulator for Windows, Linux and Mac OSX, was released.<br />
Since I use Hercules on an almost daily basis, I quickly downloaded the latest sources and prepared the new Slackware packages and <a href="http://slackbuilds.org/">SlackBuild</a> script. The script is already in the &#8220;pending&#8221; queue, and the packages are being uploaded to my <a href="http://www.nielshorn.net/slackware/slack_pkg.php">site</a>.</p>
<p>I also built Hercules for ARMedslack. I believe the SheevaPlug will be an excellent device for demonstrating Hercules as a &#8220;portable mainframe&#8221;.</p>
<p>The automated rsync script will update the site over the next few hours.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/03/hercules-3-07-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geeqie released as stable 1.0 – Packages available</title>
		<link>http://blog.nielshorn.net/2010/03/geeqie-released-as-stable-1-0-packages-available/</link>
		<comments>http://blog.nielshorn.net/2010/03/geeqie-released-as-stable-1-0-packages-available/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 00:58:43 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[ARMedslack]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[geeqie]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=237</guid>
		<description><![CDATA[Already a few weeks ago the Geeqie team released the first stable version of this image viewer, a fork from gqview, included in many Linux distributions.
The original gqview program had some bugs, but development had stalled some time ago. But lucky for us, some guys picked up this project and created a new program that [...]]]></description>
			<content:encoded><![CDATA[<p>Already a few weeks ago the <a href="http://geeqie.sourceforge.net/">Geeqie</a> team released the first stable version of this image viewer, a fork from gqview, included in many Linux distributions.<br />
The original gqview program had some bugs, but development had stalled some time ago. But lucky for us, some guys picked up this project and created a new program that solved the old bugs and included some new features!</p>
<p><img alt="" src="http://www.armedslack.org/logos/armedslack.png" title="ARMedslack" class="alignleft" width="211" height="294" />I updated my <a href="http://slackbuilds.org/repository/13.0/graphics/geeqie/">SlackBuild</a> for the stable version and submitted the result.<br />
Since I was changing the script, I used the opportunity to include the arm architecture and tested the result on <a href="http://www.armedslack.org/">ARMedslack</a>, where it worked just fine. <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For those who cannot wait until the SlackBuild is approved, or do not want to / know how to build their own software, packages for Slackware 32-bits (&#8221;i486&#8243; architecture), Slackware 64-bits (&#8221;x86_64&#8243; architecture) and ARMedslack can be downloaded from my <a href="http://www.nielshorn.net/slackware/slack_pkg.php">site</a>.<br />
Note: the &#8220;arm&#8221; package is for the newer EABI version of ARMedslack (the -current version) and won&#8217;t work on ARMedslack 12.2.</p>
<p>I&#8217;ll probably build more packages for ARMedslack when updates of sources are released, so if you are interested in this platform, check back here once in a while&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/03/geeqie-released-as-stable-1-0-packages-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Nokia CS-10 GSM modem on Slackware</title>
		<link>http://blog.nielshorn.net/2010/02/using-a-nokia-cs-10-gsm-modem-on-slackware/</link>
		<comments>http://blog.nielshorn.net/2010/02/using-a-nokia-cs-10-gsm-modem-on-slackware/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 02:09:14 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[udev]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=223</guid>
		<description><![CDATA[Today I received my new GSM Modem, a Nokia Internet Stick CS-10. It had the size of an overweight pen-drive and can connect (depending on your service-provider) at speeds up to 7.2Mbps (my contract only goes to 2Mbps).
Here is a picture of the modem, taken from the Nokia site:

As was to be expected, it comes [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received my new GSM Modem, a <a href="http://europe.nokia.com/find-products/accessories/all-accessories/home-and-office/imaging/nokia-internet-stick-cs-10">Nokia Internet Stick CS-10</a>. It had the size of an overweight pen-drive and can connect (depending on your service-provider) at speeds up to 7.2Mbps (my contract only goes to 2Mbps).<br />
Here is a picture of the modem, taken from the Nokia site:<br />
<img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/nokia-cs10.png" alt="nokia-cs10" title="nokia-cs10" width="240" height="132" class="alignleft size-full wp-image-224" /><br />
As was to be expected, it comes with software only for Windows and Mac, nothing for Linux. But, then again, who needs software on Linux to use a modem? <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  With a bit of knowledge on how Linux works with USB devices, we can do everything by configuring our system the right way.</p>
<p>I have configured several other USB modems on my Slackware systems, so I was sure I could get this one to work as well. I did it in about 20 minutes and here are the basic steps:</p>
<p><strong>1) Switching from &#8220;drive&#8221; to modem</strong><br />
Many of these USB modems first present themselves as &#8220;media&#8221;, so that Windows users can install the built-in software from them. Then the installed driver &#8220;ejects&#8221; the media and the modem presents its real identity as a modem.<br />
On Linux, we have to &#8220;eject&#8221; the media as well by software, and for this we can use a udev rule.<br />
When plugged in the first time, we can check the ID of the media / modem in a terminal window with <code>lsusb</code>. The result included the following line:</p>
<pre>Bus 001 Device 005: ID 0421:060c Nokia Mobile Phones</pre>
<p>So this is the ID of the modem presenting itself as removable media.</p>
<p>Now we need a udev rule to &#8220;eject&#8221; the media. This is what I wrote, based on some previous experience and <a href="http://reactivated.net/writing_udev_rules.html">this guide</a> on writing udev rules:</p>
<pre>SUBSYSTEMS=="usb", SYSFS{idVendor}=="0421", SYSFS{idProduct}=="060c", ACTION=="add", RUN+="/usr/bin/eject -s %k", OPTIONS+="last_rule"</pre>
<p>Now let&#8217;s analyze this rule:</p>
<ul>
<li><code>SUBSYSTEMS=="usb"</code> &#8211; speaks for itself: we are handling a USB device</li>
<li><code>SYSFS{idVendor}=="0421", SYSFS{idProduct}=="060c"</code> &#8211; this identifies our Nokia modem</li>
<li><code>ACTION=="add"</code> &#8211; means that this rule is only for when the device is added</li>
<li><code>RUN+="/usr/bin/eject -s %k"</code> &#8211; calls the &#8220;eject&#8221; program with the parameters -s (a &#8220;SCSI&#8221; device, like /dev/s??) and %k (the device name the kernel gave it, like /dev/sdb0 or whatever the &#8220;media&#8221; is named)</li>
<li><code>OPTIONS+="last_rule"</code> &#8211; make sure that later rules for this device have no effect</li>
</ul>
<p>Save this rule as 91-nokiacs10.rules in /etc/udev/rules.d/<br />
This is the directory where we save all our &#8220;custom&#8221; rules, as opposed to the standard rules that stay in /lib/udev/rules.d where we should not mess around (as they will be overwritten with the next update of udev).</p>
<p>So now, pull out the modem and plug it in again. If everything is fine, after a short time you can check your usb devices again with <code>lsusb</code> and now the line should be:</p>
<pre>Bus 001 Device 005: ID 0421:060e Nokia Mobile Phones</pre>
<p>Check that the Product ID has changed from <strong>060c</strong> to <strong>060e</strong></p>
<p><strong>2) Check your modem device</strong><br />
Now check your devices with <code>ls /dev/tty*</code> and you should see in the list <code>ttyACM0</code> and <code>ttyACM1</code>.<br />
Use <code>ttyACM0</code> in your favorite dialer to connect to your internet provider. I use pppd, but it should work with kpppd or whatever you prefer!</p>
<p><strong>3) Next steps</strong><br />
I actually use a second script that automatically &#8220;dials&#8221; my provider and connects me to the internet. This is done by creating a second rule in the same file, but this time for the 060e device, starting a small shell script.<br />
This script checks if the ttyACM0 device is available, calls pppd, checks ifconfig if the ppp0 device is up and creates an entry in the routing table.<br />
Since my script is very ugly, I won&#8217;t put it here, but it was not that difficult to write, so I&#8217;ll leave this as an exercise! <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/using-a-nokia-cs-10-gsm-modem-on-slackware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting a text-based program on a headless box at boot time</title>
		<link>http://blog.nielshorn.net/2010/02/starting-a-text-based-program-on-a-headless-box-at-boot-time/</link>
		<comments>http://blog.nielshorn.net/2010/02/starting-a-text-based-program-on-a-headless-box-at-boot-time/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 16:23:40 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[Sem categoria]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=212</guid>
		<description><![CDATA[Imagine yourself in the following situation:
You have a &#8220;headless&#8221; (this means: without a monitor attached) server that boots nicely, starts all the services you configured, like dns, ntp, nfs, samba, httpd, mysql, etc. But &#8211; since it has processing power left and stays on 24&#215;7, you decide that it could do something extra that you [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine yourself in the following situation:<br />
You have a &#8220;headless&#8221; (this means: without a monitor attached) server that boots nicely, starts all the services you configured, like dns, ntp, nfs, samba, httpd, mysql, etc. But &#8211; since it has processing power left and stays on 24&#215;7, you decide that it could do something extra that you run on your desktop now and so you have to keep that running 24&#215;7 as well.</p>
<p>Some examples:
<ol>
<li>a torrent program to download all those Linux ISOs (you&#8217;re not downloading anything illegal, are you? <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</li>
<li>an irc program so that you can log all conversations while you&#8217;re away</li>
<li>a mainframe emulator (well, this was <i>my</i> main reason)</li>
</ol>
<p>For (1) there is <a href="http://libtorrent.rakshasa.no/">rTorrent</a> and for (2) there is irssi, included in Slackware. For (3) I use <a href="http://www.hercules-390.org/">Hercules</a> that runs in a terminal screen.<br />
Now services you can start in /etc/rc.d/rc.local, as they do not need a terminal to show output and run as daemons. But these three programs need to show their output on a terminal screen to be useful, and a user that is logged in.<br />
The standard solution for these cases is using &#8220;screen&#8221;, that lets programs run on &#8220;virtual terminal&#8221; you can &#8220;attach&#8221; to.</p>
<p>Since an easy-to-use and still relatively safe setup is a bit tricky, here are a few simple instructions. As an example (not very useful in the real world), I will start &#8220;top&#8221; at boot time in a screen session.</p>
<p><strong>1. Defining the user that will run the program</strong><br />
First of all, I personally think it is a very bad idea to run programs as root, especially if they need access to drives, the internet, etc. So for my example, I create a user &#8220;_top&#8221; with the &#8220;adduser&#8221; command.<br />
I suggest starting the name with the &#8220;underline&#8221; character, but that&#8217;s just a habit I have for special users.<br />
I also create these special users with uid&#8217;s in a special range, like 5001-5999.</p>
<p><strong>2. Editing the ~/.screenrc file</strong><br />
After creating your _top user, you will have a file called &#8220;/home/_top/.screenrc&#8221;<br />
If your version of Linux does not copy it automatically for new users, there should be a &#8220;skeleton&#8221; version somewhere you can copy.<br />
Edit the copy of .screenrc in the user&#8217;s home directory, and add the following lines at the end:</p>
<pre>multiuser on
acladd user1,user2,user3</pre>
<p>What do these lines mean:</p>
<ul>
<li><code>multiuser on</code> will make the screen session available for other users. Without this line, it would be a &#8220;private session&#8221;, with only &#8220;_top&#8221; having access to it.</li>
<li><code>acladd user1,user2,user3</code> gives access to user1, user2 and user3. Replace these with the users you want to be able to attach to the screen session _top will start at boot time.</li>
</ul>
<p>We&#8217;ll come back to this .screenrc file later&#8230;</p>
<p><strong>3. Starting screen + the desired program at startup</strong><br />
We will start the program as usual in /etc/rc.d/rc.local by adding the following line:</p>
<pre>sudo -H -u _top screen -dmS top /usr/bin/top</pre>
<p>Let&#8217;s dissect this command:</p>
<ul>
<li><code>sudo</code> rc.local is run by root but not as a logged-in user, so with sudo we tell root that we want the program to start as another user</li>
<li><code>-H</code> This tells sudo to use the home directory of the user we choose. Without the -H option, sudo will not find the /home/_top/.screenrc file.</li>
<li><code>-u _top</code> Here we define the user &#8211; _top in our case.</li>
<li><code>screen -dmS top /usr/bin/top</code> This is the command sudo will execute, with these options:
<ul>
<li><code>-dm</code> Start screen in &#8220;detached&#8221; mode, not at the current terminal (as we do not have a current terminal, after all we&#8217;re not even logged in)</li>
<li><code>S top</code> Use the session name &#8220;top&#8221; &#8211; this is so that we can identify the screen session if we have several of them</li>
<li><code>/usr/bin/top</code> The command screen will run in the &#8220;virtual terminal&#8221;</li>
</ul>
</li>
</ul>
<p><strong>4. Trying our first setup</strong><br />
To try this setup, you do not need to boot your server yet. Simply run the <code>sudo -H -u _top screen -dmS top /usr/bin/top</code> as root. It should simply return to the prompt, but we can check if it worked with <code>ps -ef f | grep ^_top</code> that should return with:</p>
<pre>_top      1418     1  0 13:40 ?        Ss     0:00 SCREEN -dmS top /usr/bin/top
_top      1419  1418  5 13:40 pts/0    Ss+    0:00  \_ /usr/bin/top</pre>
<p>Of course the PIDs and times will be different.</p>
<p>Now log in as one of the users you defined in the acladd line in .screenrc and type <code>screen -ls _top/</code> where:</p>
<ul>
<li><code>-ls</code> is the option to list all running sessions</li>
<li><code>_top/</code> tells screen to list the sessions of user _top</li>
</ul>
<p>It should return with:</p>
<pre>There is a suitable screen on:
	1418.top	(Multi, detached)
1 Socket in /home/_top/.screen.</pre>
<ul>
<li><code>1418</code> is the pid &#8211; this will change of course</li>
<li><code>top</code> is the session name we defined</li>
<li><code>Multi</code> means that it is a multiuser session (as defined in .screenrc)</li>
<li><code>detached</code> means that no user is attached to the session</li>
</ul>
<p>So let&#8217;s attach to the session and see how &#8220;top&#8221; is doing, by typing <code>screen -r _top/top</code><br />
If everything worked fine, you should see &#8220;top&#8221; as running on your server <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Screen has several commands, but for now the most interesting are:</p>
<ul>
<li><code>ctrl-A d</code> &#8211; detach from the current session but let it running</li>
<li><code>ctrl-A ?</code> &#8211; show the ctrl-A commands</li>
<li><code>ctrl-A :</code> &#8211; gives the prompt in screen to enter commands</li>
</ul>
<p><strong>5. Adding some security</strong><br />
So now we have a working setup, but all the users we defined in the .screenrc file can access our session (even several at once) and input commands there.<br />
I suggest at least asking for a password before letting a user attach to a session. This is a bit tricky to set up if you have never done this, but these are the basic steps:</p>
<ol>
<li>Attach to a session normally</li>
<li>Type <code>ctrl-A c</code> to create a second screen (the first one will still be there)</li>
<li>Go to the screen prompt by typing <code>ctrl-A :</code></li>
<li>Enter <code>password</code> + enter and type your password twice</li>
<li>The encrypted password will be in screens &#8220;paste buffer&#8221;</li>
<li>Type <code>ctrl-A ]</code> to reveal the encrypted password</li>
</ol>
<p>Now edit the .screenrc file and change the lines at the end as follows:</p>
<pre>multiuser on
acladd user1,user2,user3 xxxxxxxxxxxxx
aclchg * +rwx "#?"</pre>
<p>Substitute xxxxxxxxxxxxx with your encrypted password.<br />
The last line gives full access to all users that know the password. According to the manual this should be automatic, but that is not how it worked for me. Without this line I could not even detach from a session! I simply received an error like &#8220;detached: permission denied (user: niels)&#8221; <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
You can change the +rwx options for some users, so that they can only &#8220;read&#8221; the session and not &#8220;write&#8221; (type) anything. This adds extra security that can be important in some cases.</p>
<p>After finishing editing the .screenrc file, you can close the second session by typing <code>exit</code> at the prompt.</p>
<p><strong>6. Advanced options</strong><br />
There are many more things you can do with screen, like having several users accessing the same session, some only reading, others typing as well. There are also many security adjustments you can configure&#8230;</p>
<p>Read the man-page for screen to study all the interesting things you can do!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/starting-a-text-based-program-on-a-headless-box-at-boot-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmarking with nbench</title>
		<link>http://blog.nielshorn.net/2010/02/benchmarking-with-nbench/</link>
		<comments>http://blog.nielshorn.net/2010/02/benchmarking-with-nbench/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:07:37 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[ARMedslack]]></category>
		<category><![CDATA[Hercules]]></category>
		<category><![CDATA[Qemu]]></category>
		<category><![CDATA[Slack/390]]></category>
		<category><![CDATA[emulation]]></category>
		<category><![CDATA[nbench]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=205</guid>
		<description><![CDATA[Since I was doing some tests with Slackware running on different platforms (Slack/390, Slack/390x, ArmedSlack on Qemu, etc.) I wanted to compare the performance of the different setups.
I used a (quite old) utility called nbench that was originally written in 1995 but still is a simple way to compare how processors perform, emulated or real. [...]]]></description>
			<content:encoded><![CDATA[<p>Since I was doing some tests with Slackware running on different platforms (Slack/390, Slack/390x, ArmedSlack on Qemu, etc.) I wanted to compare the performance of the different setups.</p>
<p>I used a (quite old) utility called <a href="http://www.tux.org/~mayer/linux/bmark.html">nbench</a> that was originally written in 1995 but still is a simple way to compare how processors perform, emulated or real. And it has a nice advantage that it can be built on x86, s390 and Arm processors without problems.</p>
<p>Here is the result of Slack/390x-11.0 running in Hercules 3.06 with two emulated processors:</p>
<pre>BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :          34.476  :       0.88  :       0.29
STRING SORT         :           3.012  :       1.35  :       0.21
BITFIELD            :      8.3237e+06  :       1.43  :       0.30
FP EMULATION        :          2.3056  :       1.11  :       0.26
FOURIER             :          70.649  :       0.08  :       0.05
ASSIGNMENT          :         0.35083  :       1.33  :       0.35
IDEA                :          94.416  :       1.44  :       0.43
HUFFMAN             :          34.368  :       0.95  :       0.30
NEURAL NET          :         0.10472  :       0.17  :       0.07
LU DECOMPOSITION    :          3.5645  :       0.18  :       0.13
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 1.194
FLOATING-POINT INDEX: 0.136
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 : Dual IBM/S390
L2 Cache            :
OS                  : Linux 2.4.33.3
C compiler          : gcc version 3.4.6
libc                :
MEMORY INDEX        : 0.278
INTEGER INDEX       : 0.314
FLOATING-POINT INDEX: 0.075
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.</pre>
<p>And here is the result of ArmedSlack running in Qemu:</p>
<pre>BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :          199.84  :       5.13  :       1.68
STRING SORT         :          22.453  :      10.03  :       1.55
BITFIELD            :       9.048e+07  :      15.52  :       3.24
FP EMULATION        :          28.281  :      13.57  :       3.13
FOURIER             :          139.34  :       0.16  :       0.09
ASSIGNMENT          :          4.4836  :      17.06  :       4.43
IDEA                :           922.7  :      14.11  :       4.19
HUFFMAN             :          322.93  :       8.95  :       2.86
NEURAL NET          :         0.26406  :       0.42  :       0.18
LU DECOMPOSITION    :          8.8432  :       0.46  :       0.33
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 11.288
FLOATING-POINT INDEX: 0.313
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 :
L2 Cache            :
OS                  : Linux 2.6.32.7-versatile
C compiler          : gcc version 4.4.3 (GCC)
libc                : libc-2.11.1.so
MEMORY INDEX        : 2.814
INTEGER INDEX       : 2.819
FLOATING-POINT INDEX: 0.174
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.</pre>
<p>And finally, my host system where Hercules and Qemu run:</p>
<pre>BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :          1339.8  :      34.36  :      11.28
STRING SORT         :          282.56  :     126.26  :      19.54
BITFIELD            :      5.6507e+08  :      96.93  :      20.25
FP EMULATION        :          186.88  :      89.67  :      20.69
FOURIER             :           30009  :      34.13  :      19.17
ASSIGNMENT          :          38.938  :     148.16  :      38.43
IDEA                :            8292  :     126.82  :      37.65
HUFFMAN             :          2983.2  :      82.72  :      26.42
NEURAL NET          :            61.4  :      98.63  :      41.49
LU DECOMPOSITION    :          1939.9  :     100.50  :      72.57
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 92.652
FLOATING-POINT INDEX: 69.676
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 : Dual GenuineIntel Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz 3010MHz
L2 Cache            : 6144 KB
OS                  : Linux 2.6.32.7-custom64
C compiler          : gcc version 4.4.3 (GCC)
libc                : libc-2.11.1.so
MEMORY INDEX        : 24.774
INTEGER INDEX       : 21.953
FLOATING-POINT INDEX: 38.645
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38</pre>
<p>As you can see, the S/390 emulation is the one that suffers most. The new s390x 64-bits version performs a bit faster, but the processor on the host machine tops at 100% during more complex tasks.</p>
<p>I won&#8217;t put all the different (i486 / x86_64 / arm / s390 / s390x) packages on my site, but I&#8217;ll submit the SlackBuild script to <a href="http://slackbuilds.org/">SlackBuilds.org</a>, so that you can build them yourself on your machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/benchmarking-with-nbench/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emulating a mainframe on ArmedSlack</title>
		<link>http://blog.nielshorn.net/2010/02/emulating-a-mainframe-on-armedslack/</link>
		<comments>http://blog.nielshorn.net/2010/02/emulating-a-mainframe-on-armedslack/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 16:15:49 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[ARMedslack]]></category>
		<category><![CDATA[Hercules]]></category>
		<category><![CDATA[Qemu]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=195</guid>
		<description><![CDATA[In preparation for a future project, I built Hercules on ArmedSlack, running in Qemu. The idea was to test the concept of running the mainframe emulator on the Arm processor.
The result was quite usable, at least for the older mainframe operating systems like MVS.
Here are some screenshots:
Starting Hercules on ArmedSlack:

The 3270 terminal connecting to the [...]]]></description>
			<content:encoded><![CDATA[<p>In preparation for a future project, I built Hercules on <a href="http://www.armedslack.org/">ArmedSlack</a>, running in Qemu. The idea was to test the concept of running the mainframe emulator on the Arm processor.</p>
<p>The result was quite usable, at least for the older mainframe operating systems like MVS.</p>
<p>Here are some screenshots:</p>
<p>Starting Hercules on ArmedSlack:<br />
<a href="http://blog.nielshorn.net/wp-content/uploads/2010/02/01_hercstart.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/01_hercstart-300x234.png" alt="01_hercstart" title="01_hercstart" width="300" height="234" class="aligncenter size-medium wp-image-197" /></a></p>
<p>The 3270 terminal connecting to the &#8220;Mainframe&#8221;:<br />
<a href="http://blog.nielshorn.net/wp-content/uploads/2010/02/02_3270terminal.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/02_3270terminal-300x170.png" alt="02_3270terminal" title="02_3270terminal" width="300" height="170" class="aligncenter size-medium wp-image-198" /></a></p>
<p>Hercules working hard doing an IPL:<br />
<a href="http://blog.nielshorn.net/wp-content/uploads/2010/02/03_hercrunning.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/03_hercrunning-300x234.png" alt="03_hercrunning" title="03_hercrunning" width="300" height="234" class="aligncenter size-medium wp-image-200" /></a></p>
<p>Performing a clean shutdown of MVS:<br />
<a href="http://blog.nielshorn.net/wp-content/uploads/2010/02/04_mvsshutdown.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/04_mvsshutdown-300x170.png" alt="04_mvsshutdown" title="04_mvsshutdown" width="300" height="170" class="aligncenter size-medium wp-image-201" /></a></p>
<p>More on this project later&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/emulating-a-mainframe-on-armedslack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slack/390 11.0 – 64-bits: up and running!</title>
		<link>http://blog.nielshorn.net/2010/02/slack390-11-0-64-bits-up-and-running/</link>
		<comments>http://blog.nielshorn.net/2010/02/slack390-11-0-64-bits-up-and-running/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 04:05:07 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[Hercules]]></category>
		<category><![CDATA[Slack/390]]></category>
		<category><![CDATA[Slackpkg]]></category>
		<category><![CDATA[Slackware]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=189</guid>
		<description><![CDATA[Today Carnival started her in Brazil. Well, I&#8217;m Dutch so I don&#8217;t care too much about all the festivities (it is a nice party though).
So what better to do than finally test the 64-bits version of Slack/390?  
I wrote an 11-part post about installing Slack/390 on Hercules more than a year ago, and it [...]]]></description>
			<content:encoded><![CDATA[<p>Today Carnival started her in Brazil. Well, I&#8217;m Dutch so I don&#8217;t care too much about all the festivities (it is a nice party though).</p>
<p>So what better to do than finally test the 64-bits version of <a href="http://www.slack390.org/">Slack/390</a>? <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I wrote an 11-part post about installing Slack/390 on Hercules more than a year ago, and it is still valid and can be used for installing the newer version of Slack/390 as well &#8211; at least for about 90%.<br />
I did encounter some problems though, but the 64-bits version of Slack/390 is still in the testing phase, so we should give it some credit.</p>
<p>What went wrong:</p>
<ul>
<li>The &#8220;ramdisk_size&#8221; from the supplied parmfile.txt is way too small, I made it 64000 to work</li>
<li>Some packages were missing (sgml-tools / bin86 / clisp / gcc-gnat), but no show-stoppers</li>
<li>The &#8220;etc&#8221; package was not installed, causing some problems with standard users and groups</li>
<li>The symlink &#8220;sh&#8221; pointing to &#8220;bash&#8221; was missing, so none of the rc.* scripts would work (created it manually)</li>
<li>The &#8220;/etc/slackware-version&#8221; file was missing</li>
</ul>
<p>I managed to solve all problems one by one and installed SlackPkg from /extra afterwards to update my installation with the latest packages.<br />
I sent my findings to the maintainers of Slack/390 to that future users won&#8217;t have the same challenges that I had <img src='http://blog.nielshorn.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I <strong>might</strong> write a new series of posts on installing Slack/390, with updated information, but I&#8217;ll probably wait until the new version is a bit more stable.</p>
<p>For now, I&#8217;m having fun with my new 2x 64-bits emulated Mainframe running Slackware!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/slack390-11-0-64-bits-up-and-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>inadyn, a Dynamic DNS client for Linux</title>
		<link>http://blog.nielshorn.net/2010/02/inadyn-a-dynamic-dns-client-for-linux/</link>
		<comments>http://blog.nielshorn.net/2010/02/inadyn-a-dynamic-dns-client-for-linux/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 02:42:15 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[Sem categoria]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=185</guid>
		<description><![CDATA[Whoever has an ISP that regularly changes your IP address, knows the difficulties of accessing your computer at home from remote locations. If the IP address changes all the time, how can you access your home system through a browser, ssh, etc.
There are actually several solutions for this, like DynDNS, where you can register a [...]]]></description>
			<content:encoded><![CDATA[<p>Whoever has an ISP that regularly changes your IP address, knows the difficulties of accessing your computer at home from remote locations. If the IP address changes all the time, how can you access your home system through a browser, ssh, etc.</p>
<p>There are actually several solutions for this, like <a href="http://www.dyndns.com/">DynDNS</a>, where you can register a domain like &lt;yourname&gt;.selfip.net (and many other combinations). Then you will need a &#8220;client&#8221; &#8211; a small piece of software that checks every so many minutes if your IP address has changed.</p>
<p>For Linux systems, there is <a href="http://www.inatech.eu/inadyn/">inadyn</a>. I have been using inadyn for a couple of years now and it has been extremely stable and useful for me. You can download a ready-to-use binary from their site, but it is 32-bits only.<br />
Since the sources are also available, I decided to create a SlackBuild for it, so that inadyn can be used on SlackWare64.</p>
<p>The SlackBuild has been submitted to SlackBuilds.org and is waiting for approval in the pending queue.<br />
If you can&#8217;t or don&#8217;t want to wait, the packages are also available from my <a href="http://www.nielshorn.net/slackware/slack_pkg.php">site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/inadyn-a-dynamic-dns-client-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using wireshark with remote capturing</title>
		<link>http://blog.nielshorn.net/2010/02/using-wireshark-with-remote-capturing/</link>
		<comments>http://blog.nielshorn.net/2010/02/using-wireshark-with-remote-capturing/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 18:20:24 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=167</guid>
		<description><![CDATA[Wireshark is a very nice network protocol analyzer / sniffer, that is very complete and totally free and open source. It is the standard for examining network packets, used by many professionals and home users. I&#8217;ve been using wireshark since the days when it was still called Ethereal, some years ago.
The last few days I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wireshark.org/">Wireshark</a> is a very nice network protocol analyzer / sniffer, that is very complete and totally free and open source. It is <strong>the</strong> standard for examining network packets, used by many professionals and home users. I&#8217;ve been using wireshark since the days when it was still called Ethereal, some years ago.</p>
<p>The last few days I was struggling with the following situation:</p>
<ul>
<li>I wanted to examine some packets passing through my firewall</li>
<li>my firewall is a &#8220;headless&#8221; (this means without a monitor, accessible only via ssh) Slackware server</li>
<li>it has no X installed (and therefor no window manager etc.) so it won&#8217;t run wireshark</li>
</ul>
<p>Now wireshark can read packets captured by tcpdump and written to a file, so that&#8217;s what I did at first:</p>
<ul>
<li>capture with tcpdump</li>
<li>write the packets to a file on a network share</li>
<li>open the file with wireshark</li>
</ul>
<p>The problem is that I wanted to examine the packets &#8220;on-line&#8221;, as they pass through the firewall.<br />
Linux has a solution (inherited from Unix) for this, called &#8220;pipes&#8221;. These are a special kind of files, where one program writes, while another reads from it, getting the contents in the right order.<br />
In other words: the packet that went into the pipe first, will come out first at the other site of the pipe. Imagine it as a &#8220;vitrual tube&#8221;.</p>
<p>It was a bit of a struggle to get all the parameters right, but in the end, I got it working like this (note: all commands are entered in a terminal session on the desktop):</p>
<ol>
<li>Create the pipe</li>
<p><code><strong>niels@desktop:~$</strong> mkfifo /tmp/pipes/cap_fw</code><br />
&#8220;/tmp/pipes/&#8221; is where I create my pipes, feel free to use whatever directory you prefer.<br />
&#8220;cap_fw&#8221; is the name of the pipe I selected.</p>
<li>Start tcpdump remotely with ssh from the desktop where you have wireshark installed:</li>
<p><code><strong>niels@desktop:~$</strong> ssh root@&lt;firewall&gt; "tcpdump -s 0 -U -n -w - -i eth1 not port 22" &gt; /tmp/pipes/cap_fw</code><br />
Replace &lt;firewall&gt; with the name or ip address of your remote server.</p>
<p>The options I used are:<br />
	<code>-s 0</code> : use the required length to catch whole packets<br />
	<code>-U</code> : packet-buffering &#8211; write packet to pipe as soon as it is captured (as opposed to waiting for the buffer to fill)<br />
	<code>-n</code> : no address-to-name conversion (you can let wireshark do this if you want)<br />
	<code>-w -</code> : write output to standard output<br />
	<code>-i eth1</code> : capture from interface eth1 &#8211; change to match your setup<br />
	<code>not port 22</code> : leave out any packets from / to port 22. This is needed as we use ssh to connect to out firewall, so that we don&#8217;t capture the captured packets again&#8230; If you need to examine port 22 on your server, use ssh over an alternative port.<br />
	<code>&gt; /tmp/pipes/cap_fw</code> : redirect the output to our pipe.</p>
<li>While tcpdump is capturing packets and sending them to the pipe, open another terminal, start wireshark and use the pipe as the input</li>
<p><code><strong>niels@desktop:~$</strong> wireshark -k -i /tmp/pipes/cap_fw</code><br />
Here the options mean:<br />
	<code>-k</code> : start immediately<br />
	<code>-i /tmp/pipes/cap_fw</code> : use our pipe as the &#8220;interface&#8221;
</ol>
<p>And you&#8217;re up and running!<br />
You can use all the normal functions of wireshark, like filtering, etc., as if you were capturing from a local interface.</p>
<p>By special request from BP{k}, here is a diagram of the setup showing how ssh gets the data from the server, captured by tcpdump and sends it through the pipe to wireshark (with a little help from LeoCAD, l3p and POV-Ray):</p>
<p><a href="http://blog.nielshorn.net/wp-content/uploads/2010/02/remote_wireshark1.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/02/remote_wireshark1-1024x768.png" alt="remote_wireshark" title="remote_wireshark" width="1024" height="768" class="aligncenter size-large wp-image-183" /></a></p>
<p align="center">(click on the image to enlarge it)</p>
<p>I might write a nice bash script to make things simpler now that I figured it all out.<br />
If it is good enough in the end, I&#8217;ll publish it here on my blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/02/using-wireshark-with-remote-capturing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FBReader</title>
		<link>http://blog.nielshorn.net/2010/01/fbreader/</link>
		<comments>http://blog.nielshorn.net/2010/01/fbreader/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 23:56:35 +0000</pubDate>
		<dc:creator>Niels Horn</dc:creator>
				<category><![CDATA[FBReader]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[SlackBuilds.org]]></category>

		<guid isPermaLink="false">http://blog.nielshorn.net/?p=154</guid>
		<description><![CDATA[Some days ago I read some messages on the SlackBuilds mailing list about problems with building FBReader on 64-bits Slackware and the right location of the libraries. At first, I had no clue what FBReader was, I was just interested in the technical problem and how it was solved.
I decided to build the program and [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I read some messages on the SlackBuilds mailing list about problems with building <a href="http://fbreader.org/">FBReader</a> on 64-bits Slackware and the right location of the libraries. At first, I had no clue what FBReader was, I was just interested in the technical problem and how it was solved.</p>
<p>I decided to build the program and found out it was a nice e-book reader, with some extra features that caught my attention. The nicest was that it can automatically search and download books by author from some on-line &#8220;libraries&#8221;, which makes it quite simple for the non-technical user to get &#038; read some of the classics.</p>
<p>Here are some screenshots of the program, opening the on-line library and getting a famous book by Arthur Conan Doyle:</p>
<p><a href="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_01.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_01-150x150.png" alt="The &quot;About&quot; screen" title="fbreader_01" width="150" height="150" class="size-thumbnail wp-image-155" /></a> <a href="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_02.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_02-150x150.png" alt="Opening the on-line library" title="fbreader_02" width="150" height="150" class="size-thumbnail wp-image-156" /></a> <a href="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_03.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_03-150x150.png" alt="The books by Arthur Conan Doyle" title="fbreader_03" width="150" height="150" class="size-thumbnail wp-image-157" /></a> <a href="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_04.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_04-150x150.png" alt="Book downloaded and ready to read!" title="fbreader_04" width="150" height="150" class="size-thumbnail wp-image-158" /></a> <a href="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_05.png"><img src="http://blog.nielshorn.net/wp-content/uploads/2010/01/fbreader_05-150x150.png" alt="Reading the book" title="fbreader_05" width="150" height="150" class="size-thumbnail wp-image-159" /></a></p>
<p>Since the Slackbuild was unmaintained, I resubmitted it for the newest version, together with the needed liblinebreak library.<br />
Both will be available on <a href="http://slackbuilds.org/">SlackBuilds.org</a> soon, but if you can&#8217;t wait, you can download packages for Slackware from my <a href="http://www.nielshorn.net/slackware/slack_pkg.php">site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nielshorn.net/2010/01/fbreader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
