<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>G-Loaded!</title>
	<atom:link href="http://www.g-loaded.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Sat, 27 Feb 2010 05:00:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Creole &#8211; Standard Wiki Markup Language</title>
		<link>http://www.g-loaded.eu/2010/02/27/creole-standard-wiki-markup-language/</link>
		<comments>http://www.g-loaded.eu/2010/02/27/creole-standard-wiki-markup-language/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 05:00:40 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Publishing]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1427</guid>
		<description><![CDATA[If you&#8217;ve tried out several wiki engines, you have probably noticed that the developers of each of them have invented their own wiki markup language. I guess no-one has a problem with that. It&#8217;s a free world after all. However, all these different versions of markup languages easily become a pain when you have to [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve tried out several <strong>wiki engines</strong>, you have probably noticed that the developers of each of them have invented their own <strong>wiki markup language</strong>. I guess no-one has a problem with that. It&#8217;s a free world after all. However, all these different versions of markup languages easily become a pain when you have to submit content to several different wiki engines. For instance, <em>Wikipedia</em>, various popular <em>bug trackers</em>, wiki engines dedicated to projects like <em>Ubuntu</em> are all very popular wikis, but, unfortunately, the contributor has to learn several different markup languages to be able to submit rich content to all of them.<br />
<span id="more-1427"></span><br />
I admit that I&#8217;ve always been frustrated by this situation. But, fortunately, there is some light. The <a href="http://wikicreole.org/wiki/Home">Creole Project</a> is an effort to create a standard wiki markup language using democratic procedures. The <a href="http://wikicreole.org/wiki/Goals">goals</a> page reveals that this project is serious and will finally deliver something useful to humanity. The <a href="http://wikicreole.org/wiki/Creole1.0">Creole 1.0</a> specification has been completed, but some work is still being done on several (necessary in my opinion) <a href="http://wikicreole.org/wiki/CreoleAdditions">additions</a>.</p>
<p>I think everyone who is interested in collaborative content should be happy about <strong>Creole</strong>. This is for the benefit of both the projects and their contributors because a <strong>standard wiki markup language</strong> promotes <strong>productivity</strong>. I think the language still needs more <em>official additions</em>, but I guess this is just a matter of time.</p>
<p>I got the impression that the <em>Creole Project</em> deserves more popularity, so I wrote this small post for all of you who might have never heard of it. It would be nice if you did the same!</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2010/02/27/creole-standard-wiki-markup-language/">Creole &#8211; Standard Wiki Markup Language</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2007/10/19/zim-a-desktop-wiki/' rel='bookmark' title='Permanent Link: Zim &#8211; a Desktop Wiki'>Zim &#8211; a Desktop Wiki</a></li>
<li><a href='http://www.g-loaded.eu/2007/07/12/issue-addressed-author-feeds-deliver-full-content/' rel='bookmark' title='Permanent Link: Issue addressed: Author feeds deliver full content'>Issue addressed: Author feeds deliver full content</a></li>
<li><a href='http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/' rel='bookmark' title='Permanent Link: Fast-Static-Feed WordPress Plugin'>Fast-Static-Feed WordPress Plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2010/02/27/creole-standard-wiki-markup-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>The importance of regular data backups</title>
		<link>http://www.g-loaded.eu/2010/02/27/regular-data-backups/</link>
		<comments>http://www.g-loaded.eu/2010/02/27/regular-data-backups/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:23:18 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[Maintenance]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1535</guid>
		<description><![CDATA[I still haven&#8217;t figured out whether it happened because of pure stupidity, temporary brain malfunction or low caffeine concentration in the blood, but a week ago, by mistake, I wiped the MBR of my primary desktop&#8217;s hard disk and also (because, you know, the MBR alone is never enough!) the boot sector of the first [...]]]></description>
			<content:encoded><![CDATA[<p>I still haven&#8217;t figured out whether it happened because of pure stupidity, temporary brain malfunction or low caffeine concentration in the blood, but a week ago, by mistake, I wiped the <strong>MBR</strong> of my primary desktop&#8217;s hard disk and also (because, you know, the MBR alone is never enough!) the <strong>boot sector</strong> of the first NTFS partition, where all my personal data was, while messing around with the <strong>install-mbr</strong> utility early in the morning.<br />
<span id="more-1535"></span><br />
My last <em>full backup</em> had been done 8-9 months ago, just before switching to Windows 7 RC. Even after such a criminally insane mistake, my partition could still be recovered relatively easily using <a href="http://www.cgsecurity.org/wiki/TestDisk">Testdisk</a>, but I, still for unknown reasons, decided to use the Windows utility <a href="http://support.microsoft.com/kb/927392">Bootrec.exe</a> with the <em>/fixboot</em> and <em>/fixmbr</em> switches to do that job. Unfortunately, not only did it not work as expected, but, after using Testdisk to browse my data, I noticed that entire directories were missing from the list. I&#8217;m not sure if I should blame <em>bootrec</em>. Maybe it&#8217;s not meant to do such things. I don&#8217;t know. I should have used the tool I knew it would work in the first place.</p>
<p>From that point on, I tried several utilities. The only program that could still read the exact size of the NTFS partition was <a href="http://gparted.sourceforge.net/">gparted</a> (through <a href="http://www.linux-ntfs.org/">ntfsprogs</a>). After several hours, having tried <em>Testdisk</em>, <em>ntfsprogs</em> and the Windows Recovery Console tools and being extremely careful so that I did not touch the contents of the partition (my data!!!) in any way, just before trying <a href="http://www.cgsecurity.org/wiki/PhotoRec">PhotoRec</a> as a last resort for raw <em>file recovery</em>, a <strong>deep partition scan</strong> with Testdisk revealed the NTFS partition. The size was wrong, but all files were listed properly. I can tell you that I did not miss the opportunity; I mounted a SAMBA share and copied everything there.</p>
<p>Fortunately, data is safe now. I spent a week checking it and cleaning it up and everything is there.</p>
<p>There are a couple of things I&#8217;d like to say to everyone:</p>
<ol>
<li>Never use utilities that can destroy critical parts of your partitions by instinct. RTFM!</li>
<li>Never mess with the partition table or the partition&#8217;s boot sector etc early in the morning. I am serious! There are numerous great things you can do in the morning! Stick to those great things, unless it is your daily routine to recover data or recover boot sectors and unless you always know what you are doing.</li>
<li>Backup data regularly. Your desktop computers and servers are equally important. Schedule daily backups of critical data. There are many great open source backup tools, like <a href="http://rdiff-backup.nongnu.org/">rdiff-backup</a>, <a href="http://rsync.samba.org/">rsync</a>, <a href="http://www.cis.upenn.edu/~bcpierce/unison/">unison</a>, <a href="http://backuppc.sourceforge.net/">BackupPC</a> to name a few. Also Windows includes a <a href="http://www.microsoft.com/windows/windows-7/features/backup-and-restore.aspx">backup tool</a> that is very convenient to setup and use. There is no excuse for not doing frequent data backups.</li>
</ol>
<p>They say that it is the idiots who learn from their own mistakes. Smart people learn from the mistakes of others. Stick to that principal.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2010/02/27/regular-data-backups/">The importance of regular data backups</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2007/12/01/choosing-a-format-for-data-backups-tar-vs-cpio/' rel='bookmark' title='Permanent Link: Choosing a format for data backups &#8211; tar vs cpio'>Choosing a format for data backups &#8211; tar vs cpio</a></li>
<li><a href='http://www.g-loaded.eu/2006/12/08/more-data-recovery-tools/' rel='bookmark' title='Permanent Link: More Data Recovery Tools'>More Data Recovery Tools</a></li>
<li><a href='http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/' rel='bookmark' title='Permanent Link: Effective data wiping with a single complete overwrite'>Effective data wiping with a single complete overwrite</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2010/02/27/regular-data-backups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Spamassassin FH_DATE_PAST_20XX test buggy in 2010</title>
		<link>http://www.g-loaded.eu/2010/01/02/spamassassin-fh_date_past_20xx-test-buggy-in-2010/</link>
		<comments>http://www.g-loaded.eu/2010/01/02/spamassassin-fh_date_past_20xx-test-buggy-in-2010/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 02:11:19 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Spamassassin]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1531</guid>
		<description><![CDATA[It seems there is an issue with the Spamassassin FH_DATE_PAST_20XX test. This test checks whether the email has a date in the future and, if this is the case, raises the message&#8217;s score. Apparently, this test is falsely triggered by all emails that have been sent in 2010, producing several false positives. Since, I do [...]]]></description>
			<content:encoded><![CDATA[<p>It seems there is an issue with the <a href="http://spamassassin.apache.org/">Spamassassin</a> <strong>FH_DATE_PAST_20XX</strong> test. This test checks whether the email has a date in the future and, if this is the case, raises the message&#8217;s score. Apparently, this test is falsely triggered by all emails that have been sent in 2010, producing several <em>false positives</em>. Since, I do not have much time to investigate this issue and to follow the news, I decided to inactivate it until I am certain it has been resolved.</p>
<p>[Update: It has been resolved. Update you SA rules]<br />
<span id="more-1531"></span><br />
To inactivate the <strong>FH_DATE_PAST_20XX</strong> test system-wide add the following line to the Spamassassin configuration file, usually located at <code>/etc/mail/spamassassin/local.cf</code>:</p>
<pre class="codesnp">
score FH_DATE_PAST_20XX 0
</pre>
<p>If you use the spamassassin server (<strong>spamd</strong>), don&#8217;t forget to <strong>restart</strong> it for the changes to take effect.</p>
<p>As I have mentioned in the update above, the issue has been resolved (Kudos). The Spamassassin developers have released updated rules for the FH_DATE_PAST_20XX test, so make sure you run sa-update:</p>
<pre class="console">
/usr/bin/sa-update
</pre>
<p>If you compile your rules, make sure you also run <code>/usr/bin/sa-compile</code> and of course restart <em>spamd</em>.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2010/01/02/spamassassin-fh_date_past_20xx-test-buggy-in-2010/">Spamassassin FH_DATE_PAST_20XX test buggy in 2010</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2009/04/10/windows-7-opensolaris-put-to-the-test/' rel='bookmark' title='Permanent Link: Windows 7, OpenSolaris &#8211; put to the test'>Windows 7, OpenSolaris &#8211; put to the test</a></li>
<li><a href='http://www.g-loaded.eu/2006/01/17/fedora-core-5-test-2-review/' rel='bookmark' title='Permanent Link: Fedora Core 5 Test 2 Review'>Fedora Core 5 Test 2 Review</a></li>
<li><a href='http://www.g-loaded.eu/2005/10/14/a-real-time-log-viewer/' rel='bookmark' title='Permanent Link: A real-time log viewer'>A real-time log viewer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2010/01/02/spamassassin-fh_date_past_20xx-test-buggy-in-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Wishes for a happy 2010</title>
		<link>http://www.g-loaded.eu/2010/01/02/happy-2010/</link>
		<comments>http://www.g-loaded.eu/2010/01/02/happy-2010/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 00:10:42 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1528</guid>
		<description><![CDATA[I wish a happy new year to all, full of happiness, health, creativity and peace of mind.Wishes for a happy 2010, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at www.g-loaded.eu.

No related posts.]]></description>
			<content:encoded><![CDATA[<p>I wish a happy new year to all, full of happiness, health, creativity and peace of mind.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2010/01/02/happy-2010/">Wishes for a happy 2010</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2010/01/02/happy-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>High CPU usage while running CentOS as guest on Virtualbox or VMware</title>
		<link>http://www.g-loaded.eu/2009/12/18/high-cpu-usage-centos-guest-virtualbox-vmware/</link>
		<comments>http://www.g-loaded.eu/2009/12/18/high-cpu-usage-centos-guest-virtualbox-vmware/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 01:30:36 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Virtualbox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1500</guid>
		<description><![CDATA[During the last six months, running a CentOS server as a guest in Virtualbox or VMware has been as common for me as running a web browser. This is because I&#8217;ve constantly been trying to streamline the server configuration and utilize new technologies or techniques attempting to get better performance or just make it easier [...]]]></description>
			<content:encoded><![CDATA[<p>During the last six months, running a <strong>CentOS</strong> server as a guest in <strong>Virtualbox</strong> or <strong>VMware</strong> has been as common for me as running a web browser. This is because I&#8217;ve constantly been trying to streamline the server configuration and utilize new technologies or techniques attempting to get better performance or just make it easier to maintain. The only issue I had to face during all this time was the <strong>high CPU usage</strong> on the host, which in some cases exceeded 40%, even when the guest (CentOS server) was in idle state. At first, I had thought that the host&#8217;s operating system, Windows 7 RC (Release Candidate), was somehow incompatible with Virtualbox/VMware.<br />
<span id="more-1500"></span><br />
It was only a few weeks ago that I decided to investigate the issue and soon I found several reports all around the web. It turned out that the real cause of the problem was the <strong>high frequency</strong> at which the stock CentOS kernel is clocked, <em>1000Hz</em>. Lowering the frequency of the internal clock of the kernel on the guest OS drastically reduced the CPU utilization of the host. At first, this was only possible by recompiling the kernel, but, fortunately, now we can use some boot kernel options to adjust the clock frequency.</p>
<p>For instance, my virtual CentOS server GRUB configuration has the following entry:</p>
<pre class="codesnp">
title CentOS (2.6.18-164.6.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-164.6.1.el5 ro root=/dev/VGSERVER/LVROOT divider=10 clocksource=acpi_pm
    initrd /initrd-2.6.18-164.6.1.el5.img
</pre>
<p>The <strong>divider</strong> option adjusts the kernel&#8217;s internal clock by dividing its default frequency by 10. So, my kernel is now clocked at: <code>1000Hz / 10 = 100Hz</code>. Well, that&#8217;s not optimal, but suits my current needs. Until CentOS/RHEL 5.3, this option also served as a workaround for time synchronization between the host and the guest OS. For CentOS 5.4 and later, we just need the &#8220;<em>divider</em>&#8221; in order to <strong>underclock the kernel</strong> without actually recompiling it. Also, the &#8220;<em>clocksource</em>&#8221; option is not required any more.</p>
<p>You can find information about whether the divider option is supported by your distribution by checking the <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1006427">Timekeeping best practices for Linux guests</a> article on the VMware knowledge base.</p>
<p>But, make no mistake. All the above are just a <strong>workaround</strong>. The kernel configuration includes the option to configure it as &#8220;<em>tickless</em>&#8221; (<strong>CONFIG_TICK_ONESHOT</strong> &#038; <strong>CONFIG_NO_HZ</strong>):</p>
<pre class="codesnp">
Processor type and features ---> [*] Tickless System (Dynamic Ticks)
</pre>
<p>From the kernel docs:</p>
<blockquote><p>This option enables a tickless system: timer interrupts only trigger on an as-needed basis both when the system is busy and when the system is idle.</p></blockquote>
<p>This sounds like a <strong>Real Solution&trade;</strong>. I tried to build a minimal kernel (version 2.6.32), using the &#8220;tickless&#8221; feature, specifically for Virtualbox, but, after spending many hours with it, I could not make it recognize my root LVM volumes. So, being extremely frustrated, I abandoned the whole project and used the <em>divider</em> option as I mentioned above.</p>
<p>If anyone has built a minimal custom kernel specifically for Virtualbox or VMware, which supports LVM/RAID and can actually boot a root LVM system, please let me know.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/12/18/high-cpu-usage-centos-guest-virtualbox-vmware/">High CPU usage while running CentOS as guest on Virtualbox or VMware</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/' rel='bookmark' title='Permanent Link: Howto: Run VMWare on a Physical Windows Partition'>Howto: Run VMWare on a Physical Windows Partition</a></li>
<li><a href='http://www.g-loaded.eu/2009/04/13/install-opensolaris-in-virtualbox-screencast/' rel='bookmark' title='Permanent Link: Install OpenSolaris in VirtualBox &#8211; Screencast'>Install OpenSolaris in VirtualBox &#8211; Screencast</a></li>
<li><a href='http://www.g-loaded.eu/2008/12/11/centos-debian-freebsd-opensolaris/' rel='bookmark' title='Permanent Link: CentOS, Debian, FreeBSD, OpenSolaris'>CentOS, Debian, FreeBSD, OpenSolaris</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/12/18/high-cpu-usage-centos-guest-virtualbox-vmware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Oracle Makes Commitments on MySQL, The Commission Welcomes</title>
		<link>http://www.g-loaded.eu/2009/12/14/oracle-makes-commitments-on-mysql-the-commission-welcomes/</link>
		<comments>http://www.g-loaded.eu/2009/12/14/oracle-makes-commitments-on-mysql-the-commission-welcomes/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 17:49:21 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Industry]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1502</guid>
		<description><![CDATA[There has been much controversy lately about Sun&#8217;s acquisition by Oracle and how it will affect the future of the widely used open-source RDBMS, MySQL.

I&#8217;ve closely followed the news on this matter and also participated in some discussions about it. To my surprise, several people were somehow convinced beforehand, without any public statements, that Oracle [...]]]></description>
			<content:encoded><![CDATA[<p>There has been much controversy lately about <a href="http://www.sun.com/">Sun</a>&#8217;s acquisition by <a href="http://www.oracle.com/">Oracle</a> and how it will affect the future of the widely used <strong>open-source</strong> <a href="http://en.wikipedia.org/wiki/RDBMS">RDBMS</a>, <a href="http://mysql.com/">MySQL</a>.<br />
<span id="more-1502"></span><br />
I&#8217;ve closely followed the news on this matter and also participated in some discussions about it. To my surprise, several people were somehow convinced beforehand, without any public statements, that Oracle would let MySQL <strong>evolve</strong> and be <strong>competitive</strong>, despite the fact that the open-source database is practically, in many cases, in <strong>direct competition</strong> with the database giant&#8217;s products. At this point, as a MySQL user for the last 6+ years, I would like to praise both the <em>European Commission</em> for being fully prepared to object to the acquisition in favour of MySQL and also <em>Oracle</em> for finally being open to discussions about MySQL&#8217;s future. I also acknowledge that the Commission&#8217;s stance <strong>raised awareness</strong> about the future of the open-source database and lead Oracle to make some public commitments today regarding MySQL&#8217;s near future. Read the full <a href="http://www.marketwire.com/press-release/Oracle-Corporation-NASDAQ-ORCL-1090000.html">press release</a>. In response, the Commission issued an <a href="http://europa.eu/rapid/pressReleasesAction.do?reference=MEMO/09/551&#038;format=HTML&#038;aged=0&#038;language=EN&#038;guiLanguage=en">announcement</a> in which it welcomes Oracle&#8217;s commitments and confirms that it has engaged in constructive discussions with Oracle regarding the maintenance of MySQL.</p>
<p>This is the Corporate World. You cannot just rely on good faith and logical assumptions. Commitment is necessary. During all these years, many people have sacrificed part of their lives in order to contribute to the development of MySQL and make it the great open source project that it is today. Despite the fact that software licenses could not practically provide full protection against the rules of the <em>Market</em>, I am very glad that there are still other mechanisms that can fill this gap and prevent the outcome of so much collaborative effort from going up into smoke.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/12/14/oracle-makes-commitments-on-mysql-the-commission-welcomes/">Oracle Makes Commitments on MySQL, The Commission Welcomes</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2006/05/05/modifying-your-name-in-the-wordpress-comments/' rel='bookmark' title='Permanent Link: Modifying Your Name In The WordPress Comments'>Modifying Your Name In The WordPress Comments</a></li>
<li><a href='http://www.g-loaded.eu/2008/03/31/how-to-fix-the-wordpress-databases-character-set-issue/' rel='bookmark' title='Permanent Link: How to fix the WordPress database&#8217;s character-set issue'>How to fix the WordPress database&#8217;s character-set issue</a></li>
<li><a href='http://www.g-loaded.eu/2009/09/21/redmine/' rel='bookmark' title='Permanent Link: Redmine'>Redmine</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/12/14/oracle-makes-commitments-on-mysql-the-commission-welcomes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Mozilla Thunderbird 3 is out!</title>
		<link>http://www.g-loaded.eu/2009/12/09/mozilla-thunderbird-3-is-out/</link>
		<comments>http://www.g-loaded.eu/2009/12/09/mozilla-thunderbird-3-is-out/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 11:36:17 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1492</guid>
		<description><![CDATA[Mozilla has announced the general availability of version 3 of its popular open source email &#038; newsgroup client, Thunderbird. Thunderbird has been my desktop email client of choice since its early stable releases, both in Linux and Windows. Actually, the only programs I&#8217;ve ever used for email and newsgroup management are Outlook Express, Mozilla Thunderbird [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mozilla.org">Mozilla</a> has <a href="http://en-us.www.mozillamessaging.com/en-US/about/press/archive/2009-12-08-01">announced</a> the general availability of version 3 of its popular <strong>open source</strong> <em>email &#038; newsgroup client</em>, <a href="http://en-us.www.mozillamessaging.com/en-US/thunderbird/">Thunderbird</a>. Thunderbird has been my desktop email client of choice since its early stable releases, both in Linux and Windows. Actually, the only programs I&#8217;ve ever used for email and newsgroup management are <strong>Outlook Express</strong>, <strong>Mozilla Thunderbird</strong> and <strong>Novell/Ximian Evolution</strong>. Out of those 3, Thunderbird, although not a strong candidate when it comes to <em>performance</em>, ranks 1st, since it offers the best:</p>
<ol>
<li>security</li>
<li>reliability</li>
<li>backwards compatibility</li>
<li>extensibility</li>
</ol>
<p>A few years ago, I had published an approach on <a href="http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/">how to organize mailing list messages</a> using Evolution. The same <em>tips and tricks</em> apply to <em>Thunderbird</em>, so those of you who deal with many mailing lists might find that old article interesting.</p>
<p>The <strong>highlights</strong> of the new release include:<br />
<span id="more-1492"></span></p>
<ul>
<li><strong>Tabbed Email</strong>: Provides the ability view individual emails and folders in tabs.</li>
<li><strong>Filtered Search</strong>: The new search interface contains filtering and timeline tools</li>
<li><strong>Message Archive</strong>: When an email message is archived, it is moved from the inbox into the new archive folder system, de-cluttering the inbox, while, at the same time, enabling users to find email months or years from now.</li>
<li><strong>One-click Address Book</strong>: A very quick and easy way to add people to an address book, by simply clicking on the star icon in the messages received from new correspondents.</li>
<li><strong>New Mail Account Setup Wizard</strong>: Getting started with Thunderbird 3 is faster than ever with the new account set-up wizard that requires simple information, like email addresses and passwords to get going instead of a user&#8217;s IMAP, SMTP, SSL/TLS settings.</li>
<li><strong>Smart Folders</strong>: Combines individual mailboxes to help manage multiple email accounts in one spot. For example, by selecting the Inbox, users can view all the incoming emails from all their different accounts without having to go to each email account separately.</li>
<li><strong>Add-ons Manager</strong>: The new add-ons manager can help users find, download, and install hundreds of add-ons enabling them to customize Thunderbird 3 and add functionality or change the appearance.</li>
<li><strong>Gecko 1.9.1 Engine</strong>: The same Web page rendering engine and graphics infrastructure used in Firefox, provides the latest Web Standards support and security enhancements.</li>
<li><strong>Automated Updates</strong>: Thunderbird&#8217;s update system notifies users when a security update is available and automates the download and installation process to keep users safe.</li>
</ul>
<p>Now, I am off to test this beast&#8217;s new features&#8230;</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/12/09/mozilla-thunderbird-3-is-out/">Mozilla Thunderbird 3 is out!</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/' rel='bookmark' title='Permanent Link: Organizing Mailing List messages with Evolution'>Organizing Mailing List messages with Evolution</a></li>
<li><a href='http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/' rel='bookmark' title='Permanent Link: Application Testing: Zero Free Space'>Application Testing: Zero Free Space</a></li>
<li><a href='http://www.g-loaded.eu/2007/12/07/email-notifications-from-a-linux-system/' rel='bookmark' title='Permanent Link: Email Notifications from a Linux System'>Email Notifications from a Linux System</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/12/09/mozilla-thunderbird-3-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>G-Loaded Feeds</title>
		<link>http://www.g-loaded.eu/2009/11/19/g-loaded-feeds/</link>
		<comments>http://www.g-loaded.eu/2009/11/19/g-loaded-feeds/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:52:03 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[syn]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1473</guid>
		<description><![CDATA[During the last weekend, I made some changes to the website&#8217;s feeds. It seems that, after 4 years of blogging, I have finally made up my mind about what is needed and what is unnecessary regarding the syndicated content on G-Loaded.

The first major change is that I no longer use Feedburner for content delivery. I [...]]]></description>
			<content:encoded><![CDATA[<p>During the last weekend, I made some changes to the website&#8217;s <a href="http://www.g-loaded.eu/about/#subscribe">feeds</a>. It seems that, after 4 years of blogging, I have finally made up my mind about what is needed and what is unnecessary regarding the syndicated content on G-Loaded.<br />
<span id="more-1473"></span><br />
The <strong>first</strong> major change is that I no longer use <a href="http://feedburner.google.com/">Feedburner</a> for <strong>content delivery</strong>. I used that service for several months, but, although the delivery of my content was flawless and I was generally 100% satisfied, I&#8217;ve come to the conclusion that I do not really need it. Fortunately, I was redirecting my feeds using the <strong>302</strong> (<em>temporary redirect</em>) HTTP code, so the change probably won&#8217;t be noticed by you.</p>
<p>The <strong>second</strong> major change is that all feeds, except the <em>RSS v0.92</em> feed, are now redirected to the my <em>RSS v2.0</em> feed. No more <em>Atom</em> feed. No more <em>RDF</em> (<em>RSS v1.0</em>). As I had written in the past, despite <a href="http://www.g-loaded.eu/2005/12/08/wordpress-atom-feed/" title="Design the perfect Atom feed for WordPress">my work</a> on WordPress&#8217; old Atom feed, <strong>RSS</strong> is my preferred feed type. There is nothing wrong with the other formats. I just do not need them. They add nothing to my website, but cause me trouble when I have to do any redirections or other manipulation of the syndicated content. I still consider the Atom format more advanced than RSS 2, but, since RSS was <a href="http://www.g-loaded.eu/2007/02/04/and-the-winner-is-rss-20/" title="Feed format of choice is RSS 2.0">my choice</a> for this blog, I find no reason to change it now.</p>
<p>I understand that redirecting the Atom or RDF feeds to the RSS one might cause some trouble to some feed readers (software). I apologize in advance for any such inconvenience, but this was a necessary change.</p>
<p>The following diagram shows the redirections that take place when any of the website&#8217;s feeds is requested:</p>
<div id="attachment_1483" class="wp-caption aligncenter" style="width: 490px"><img src="http://www.g-loaded.eu/wp-content/uploads/g-loaded-feeds.png" alt="Feed redirections on G-Loaded.eu" title="g-loaded-feeds" width="480" height="208" class="size-full wp-image-1483" /><p class="wp-caption-text">Feed redirections on G-Loaded.eu</p></div>
<p>Some remarks:</p>
<ul>
<li>No matter which of the RSS2, Atom or RDF format you request, you always get the <strong>full content</strong> in <em>RSS 2.0 format</em>.</li>
<li>If you just want a simple notification about the latest posts, you can select the <em>RSS v0.92</em> feed. This feed delivers a very small <strong>summary</strong> of the content.</li>
<li>There is a <em>special exception</em> for the <a href="http://www.planetplanet.org/">Planet Feed Reader</a>, which always gets the Atom feed. The amount of content this feed delivers is variable and is determined by the author of the post (me in this case). This is done using a custom plugin.</li>
</ul>
<h4>Getting the content</h4>
<p>Here are the links to the G-Loaded Feeds:</p>
<ul>
<li><a href="http://www.g-loaded.eu/feed/" title="G-Loaded Entries Feed (full content)">RSS 2.0</a> (full content)</li>
<li><a href="http://www.g-loaded.eu/feed/rss/" title="G-Loaded Entries Feed (summaries)">RSS 0.92</a> (summaries)</li>
</ul>
<p>Please feel free to ask your questions or report any issues.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/11/19/g-loaded-feeds/">G-Loaded Feeds</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2008/10/17/status-of-content-availability-via-feeds/' rel='bookmark' title='Permanent Link: Status of content availability via feeds'>Status of content availability via feeds</a></li>
<li><a href='http://www.g-loaded.eu/2007/07/12/issue-addressed-author-feeds-deliver-full-content/' rel='bookmark' title='Permanent Link: Issue addressed: Author feeds deliver full content'>Issue addressed: Author feeds deliver full content</a></li>
<li><a href='http://www.g-loaded.eu/2007/02/04/and-the-winner-is-rss-20/' rel='bookmark' title='Permanent Link: And the winner is: RSS 2.0'>And the winner is: RSS 2.0</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/11/19/g-loaded-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>ping.py &#8211; Python Implementation of the ping command</title>
		<link>http://www.g-loaded.eu/2009/10/30/python-ping/</link>
		<comments>http://www.g-loaded.eu/2009/10/30/python-ping/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 18:54:18 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1408</guid>
		<description><![CDATA[I&#8217;ve been looking for a pure python implementation of the ping command. Now that I found one, I am not sure if I want to use it, as it has a restriction: only privileged users can ping other hosts. I&#8217;ve used the ping command successfully as a normal user on all operating systems I have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for a pure python implementation of the <strong>ping</strong> command. Now that I found one, I am not sure if I want to use it, as it has a <em>restriction</em>: only privileged users can ping other hosts. I&#8217;ve used the ping command successfully as a normal user on all operating systems I have tried and never had an issue. Currently, I do not have the time to investigate this limitation, but, judging by the exception I get, it has to do with the creation of the socket through which the ICMP packet is sent. The normal user does not have the required privileges to create this socket.</p>
<p>[This post has been updated]<br />
<span id="more-1408"></span><br />
[<strong>Update #1</strong>]: This limitation also exists on the <strong>ping</strong> command, which runs with <strong>setuid</strong> access rights. (Thanks <a href="http://www.sakana.fr/blog/">Stephane</a>)</p>
<p>[<strong>Update #2</strong>]: After <a href="http://cdhallman.blogspot.com">Chris Hallman</a> reported that the original code actually works on Windows only, I made some changes to it and publish the updated code below.</p>
<p>The following code is a pure <strong>Python</strong> implementation of the <strong>ping</strong> command. I originally found it in the <a href="http://trac.pylucid.net/browser/CodeSnippets/ping.py">source code tree of pylucid</a> in a subdirectory where the developers keep various code snippets.</p>
<p>I had originally tested the code under Microsoft Windows as this was the OS I had available at the moment.  Chris Hallman noticed that the code does not work under GNU/Linux. After spending some hours trying to figure out what was wrong it, I realized that the part of the code that caused the failure on Linux was the use of the <code>time.clock()</code> function instead of <code>time.time()</code>. The <code>clock()</code> method works <a href="http://docs.python.org/library/time.html#time.clock">differently</a> under Windows and Linux.</p>
<p>I fixed the 2007 implementation and hereby publish the updated code(as <a href="http://www.g-loaded.eu/2009/10/30/python-ping/">python-ping</a>). Feel free to test it and report any issues.</p>
<p>Needed: test on Solaris.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #483d8b;">&quot;&quot;&quot;
    A pure python ping implementation using raw socket.
&nbsp;
&nbsp;
    Note that ICMP messages can only be sent from processes running as root.
&nbsp;
&nbsp;
    Derived from ping.c distributed in Linux's netkit. That code is
    copyright (c) 1989 by The Regents of the University of California.
    That code is in turn derived from code written by Mike Muuss of the
    US Army Ballistic Research Laboratory in December, 1983 and
    placed in the public domain. They have my thanks.
&nbsp;
    Bugs are naturally mine. I'd be glad to hear about them. There are
    certainly word - size dependenceies here.
&nbsp;
    Copyright (c) Matthew Dixon Cowles, &lt;http://www.visi.com/~mdc/&gt;.
    Distributable under the terms of the GNU General Public License
    version 2. Provided with no warranties of any sort.
&nbsp;
    Original Version from Matthew Dixon Cowles:
      -&gt; ftp://ftp.visi.com/users/mdc/ping.py
&nbsp;
    Rewrite by Jens Diemer:
      -&gt; http://www.python-forum.de/post-69122.html#69122
&nbsp;
    Rewrite by George Notaras:
      -&gt; http://www.g-loaded.eu/2009/10/30/python-ping/
&nbsp;
    Revision history
    ~~~~~~~~~~~~~~~~
&nbsp;
    November 8, 2009
    ----------------
    Improved compatibility with GNU/Linux systems.
&nbsp;
    Fixes by:
     * George Notaras -- http://www.g-loaded.eu
    Reported by:
     * Chris Hallman -- http://cdhallman.blogspot.com
&nbsp;
    Changes in this release:
     - Re-use time.time() instead of time.clock(). The 2007 implementation
       worked only under Microsoft Windows. Failed on GNU/Linux.
       time.clock() behaves differently under the two OSes[1].
&nbsp;
    [1] http://docs.python.org/library/time.html#time.clock
&nbsp;
    May 30, 2007
    ------------
    little rewrite by Jens Diemer:
     -  change socket asterisk import to a normal import
     -  replace time.time() with time.clock()
     -  delete &quot;return None&quot; (or change to &quot;return&quot; only)
     -  in checksum() rename &quot;str&quot; to &quot;source_string&quot;
&nbsp;
    November 22, 1997
    -----------------
    Initial hack. Doesn't do much, but rather than try to guess
    what features I (or others) will want in the future, I've only
    put in what I need now.
&nbsp;
    December 16, 1997
    -----------------
    For some reason, the checksum bytes are in the wrong order when
    this is run under Solaris 2.X for SPARC but it works right under
    Linux x86. Since I don't know just what's wrong, I'll swap the
    bytes always and then do an htons().
&nbsp;
    December 4, 2000
    ----------------
    Changed the struct.pack() calls to pack the checksum and ID as
    unsigned. My thanks to Jerome Poincheval for the fix.
&nbsp;
&nbsp;
    Last commit info:
    ~~~~~~~~~~~~~~~~~
    $LastChangedDate: $
    $Rev: $
    $Author: $
&quot;&quot;&quot;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">socket</span>, <span style="color: #dc143c;">struct</span>, <span style="color: #dc143c;">select</span>, <span style="color: #dc143c;">time</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># From /usr/include/linux/icmp.h; your milage may vary.</span>
ICMP_ECHO_REQUEST = <span style="color: #ff4500;">8</span> <span style="color: #808080; font-style: italic;"># Seems to be the same on Solaris.</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> checksum<span style="color: black;">&#40;</span>source_string<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    I'm not too confident that this is right but testing seems
    to suggest that it gives the same answers as in_cksum in ping.c
    &quot;&quot;&quot;</span>
    <span style="color: #008000;">sum</span> = <span style="color: #ff4500;">0</span>
    countTo = <span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>source_string<span style="color: black;">&#41;</span>/<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>
    count = <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> count<span style="color: #66cc66;">&lt;</span>countTo:
        thisVal = <span style="color: #008000;">ord</span><span style="color: black;">&#40;</span>source_string<span style="color: black;">&#91;</span>count + <span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">256</span> + <span style="color: #008000;">ord</span><span style="color: black;">&#40;</span>source_string<span style="color: black;">&#91;</span>count<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">sum</span> = <span style="color: #008000;">sum</span> + thisVal
        <span style="color: #008000;">sum</span> = <span style="color: #008000;">sum</span> <span style="color: #66cc66;">&amp;</span> 0xffffffff <span style="color: #808080; font-style: italic;"># Necessary?</span>
        count = count + <span style="color: #ff4500;">2</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> countTo<span style="color: #66cc66;">&lt;</span>len<span style="color: black;">&#40;</span>source_string<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">sum</span> = <span style="color: #008000;">sum</span> + <span style="color: #008000;">ord</span><span style="color: black;">&#40;</span>source_string<span style="color: black;">&#91;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>source_string<span style="color: black;">&#41;</span> - <span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">sum</span> = <span style="color: #008000;">sum</span> <span style="color: #66cc66;">&amp;</span> 0xffffffff <span style="color: #808080; font-style: italic;"># Necessary?</span>
&nbsp;
    <span style="color: #008000;">sum</span> = <span style="color: black;">&#40;</span><span style="color: #008000;">sum</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span>  +  <span style="color: black;">&#40;</span><span style="color: #008000;">sum</span> <span style="color: #66cc66;">&amp;</span> 0xffff<span style="color: black;">&#41;</span>
    <span style="color: #008000;">sum</span> = <span style="color: #008000;">sum</span> + <span style="color: black;">&#40;</span><span style="color: #008000;">sum</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span>
    answer = ~<span style="color: #008000;">sum</span>
    answer = answer <span style="color: #66cc66;">&amp;</span> 0xffff
&nbsp;
    <span style="color: #808080; font-style: italic;"># Swap bytes. Bugger me if I know why.</span>
    answer = answer <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">8</span> | <span style="color: black;">&#40;</span>answer <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #ff4500;">8</span> <span style="color: #66cc66;">&amp;</span> 0xff00<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">return</span> answer
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> receive_one_ping<span style="color: black;">&#40;</span>my_socket, ID, timeout<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    receive the ping from the socket.
    &quot;&quot;&quot;</span>
    timeLeft = timeout
    <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
        startedSelect = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        whatReady = <span style="color: #dc143c;">select</span>.<span style="color: #dc143c;">select</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>my_socket<span style="color: black;">&#93;</span>, <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>, <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>, timeLeft<span style="color: black;">&#41;</span>
        howLongInSelect = <span style="color: black;">&#40;</span><span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - startedSelect<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> whatReady<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> == <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>: <span style="color: #808080; font-style: italic;"># Timeout</span>
            <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
        timeReceived = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        recPacket, addr = my_socket.<span style="color: black;">recvfrom</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1024</span><span style="color: black;">&#41;</span>
        icmpHeader = recPacket<span style="color: black;">&#91;</span><span style="color: #ff4500;">20</span>:<span style="color: #ff4500;">28</span><span style="color: black;">&#93;</span>
        <span style="color: #008000;">type</span>, <span style="color: #dc143c;">code</span>, checksum, packetID, sequence = <span style="color: #dc143c;">struct</span>.<span style="color: black;">unpack</span><span style="color: black;">&#40;</span>
            <span style="color: #483d8b;">&quot;bbHHh&quot;</span>, icmpHeader
        <span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> packetID == ID:
            bytesInDouble = <span style="color: #dc143c;">struct</span>.<span style="color: black;">calcsize</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;d&quot;</span><span style="color: black;">&#41;</span>
            timeSent = <span style="color: #dc143c;">struct</span>.<span style="color: black;">unpack</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;d&quot;</span>, recPacket<span style="color: black;">&#91;</span><span style="color: #ff4500;">28</span>:<span style="color: #ff4500;">28</span> + bytesInDouble<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
            <span style="color: #ff7700;font-weight:bold;">return</span> timeReceived - timeSent
&nbsp;
        timeLeft = timeLeft - howLongInSelect
        <span style="color: #ff7700;font-weight:bold;">if</span> timeLeft <span style="color: #66cc66;">&lt;</span>= <span style="color: #ff4500;">0</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> send_one_ping<span style="color: black;">&#40;</span>my_socket, dest_addr, ID<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Send one ping to the given &gt;dest_addr&lt;.
    &quot;&quot;&quot;</span>
    dest_addr  =  <span style="color: #dc143c;">socket</span>.<span style="color: black;">gethostbyname</span><span style="color: black;">&#40;</span>dest_addr<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Header is type (8), code (8), checksum (16), id (16), sequence (16)</span>
    my_checksum = <span style="color: #ff4500;">0</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Make a dummy heder with a 0 checksum.</span>
    header = <span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;bbHHh&quot;</span>, ICMP_ECHO_REQUEST, <span style="color: #ff4500;">0</span>, my_checksum, ID, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
    bytesInDouble = <span style="color: #dc143c;">struct</span>.<span style="color: black;">calcsize</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;d&quot;</span><span style="color: black;">&#41;</span>
    data = <span style="color: black;">&#40;</span><span style="color: #ff4500;">192</span> - bytesInDouble<span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #483d8b;">&quot;Q&quot;</span>
    data = <span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;d&quot;</span>, <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + data
&nbsp;
    <span style="color: #808080; font-style: italic;"># Calculate the checksum on the data and the dummy header.</span>
    my_checksum = checksum<span style="color: black;">&#40;</span>header + data<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Now that we have the right checksum, we put that in. It's just easier</span>
    <span style="color: #808080; font-style: italic;"># to make up a new header than to stuff it into the dummy.</span>
    header = <span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span>
        <span style="color: #483d8b;">&quot;bbHHh&quot;</span>, ICMP_ECHO_REQUEST, <span style="color: #ff4500;">0</span>, <span style="color: #dc143c;">socket</span>.<span style="color: black;">htons</span><span style="color: black;">&#40;</span>my_checksum<span style="color: black;">&#41;</span>, ID, <span style="color: #ff4500;">1</span>
    <span style="color: black;">&#41;</span>
    packet = header + data
    my_socket.<span style="color: black;">sendto</span><span style="color: black;">&#40;</span>packet, <span style="color: black;">&#40;</span>dest_addr, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># Don't know about the 1</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> do_one<span style="color: black;">&#40;</span>dest_addr, timeout<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Returns either the delay (in seconds) or none on timeout.
    &quot;&quot;&quot;</span>
    icmp = <span style="color: #dc143c;">socket</span>.<span style="color: black;">getprotobyname</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;icmp&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        my_socket = <span style="color: #dc143c;">socket</span>.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">socket</span>.<span style="color: black;">AF_INET</span>, <span style="color: #dc143c;">socket</span>.<span style="color: black;">SOCK_RAW</span>, icmp<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #dc143c;">socket</span>.<span style="color: black;">error</span>, <span style="color: black;">&#40;</span><span style="color: #dc143c;">errno</span>, msg<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">errno</span> == <span style="color: #ff4500;">1</span>:
            <span style="color: #808080; font-style: italic;"># Operation not permitted</span>
            msg = msg + <span style="color: black;">&#40;</span>
                <span style="color: #483d8b;">&quot; - Note that ICMP messages can only be sent from processes&quot;</span>
                <span style="color: #483d8b;">&quot; running as root.&quot;</span>
            <span style="color: black;">&#41;</span>
            <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #dc143c;">socket</span>.<span style="color: black;">error</span><span style="color: black;">&#40;</span>msg<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #808080; font-style: italic;"># raise the original error</span>
&nbsp;
    my_ID = <span style="color: #dc143c;">os</span>.<span style="color: black;">getpid</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span> 0xFFFF
&nbsp;
    send_one_ping<span style="color: black;">&#40;</span>my_socket, dest_addr, my_ID<span style="color: black;">&#41;</span>
    delay = receive_one_ping<span style="color: black;">&#40;</span>my_socket, my_ID, timeout<span style="color: black;">&#41;</span>
&nbsp;
    my_socket.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> delay
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> verbose_ping<span style="color: black;">&#40;</span>dest_addr, timeout = <span style="color: #ff4500;">2</span>, count = <span style="color: #ff4500;">4</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Send &gt;count&lt; ping to &gt;dest_addr&lt; with the given &gt;timeout&lt; and display
    the result.
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span>count<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;ping %s...&quot;</span> <span style="color: #66cc66;">%</span> dest_addr,
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            delay  =  do_one<span style="color: black;">&#40;</span>dest_addr, timeout<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #dc143c;">socket</span>.<span style="color: black;">gaierror</span>, e:
            <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;failed. (socket error: '%s')&quot;</span> <span style="color: #66cc66;">%</span> e<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
            <span style="color: #ff7700;font-weight:bold;">break</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">if</span> delay  ==  <span style="color: #008000;">None</span>:
            <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;failed. (timeout within %ssec.)&quot;</span> <span style="color: #66cc66;">%</span> timeout
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            delay  =  delay <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">1000</span>
            <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;get ping in %0.4fms&quot;</span> <span style="color: #66cc66;">%</span> delay
    <span style="color: #ff7700;font-weight:bold;">print</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    verbose_ping<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;heise.de&quot;</span><span style="color: black;">&#41;</span>
    verbose_ping<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;google.com&quot;</span><span style="color: black;">&#41;</span>
    verbose_ping<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;a-test-url-taht-is-not-available.com&quot;</span><span style="color: black;">&#41;</span>
    verbose_ping<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;192.168.1.1&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>I decided not to publish the updated code on <a href="http://www.codetrax.org">CodeTRAX</a>, where I normally publish any programming-related stuff, but leave it on <a href="http://www.g-loaded.eu">G-Loaded</a> instead.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/10/30/python-ping/">ping.py &#8211; Python Implementation of the ping command</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2006/05/06/sockets-programming-in-python/' rel='bookmark' title='Permanent Link: Sockets Programming In Python'>Sockets Programming In Python</a></li>
<li><a href='http://www.g-loaded.eu/2007/01/31/python-irc-bot/' rel='bookmark' title='Permanent Link: Python IRC Bot'>Python IRC Bot</a></li>
<li><a href='http://www.g-loaded.eu/2006/04/07/python-crash-course/' rel='bookmark' title='Permanent Link: Python Crash Course'>Python Crash Course</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/10/30/python-ping/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Using setenforce to switch SELinux mode wisely</title>
		<link>http://www.g-loaded.eu/2009/10/30/selinux-setenforce-mode/</link>
		<comments>http://www.g-loaded.eu/2009/10/30/selinux-setenforce-mode/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 15:05:14 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SELinux]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1401</guid>
		<description><![CDATA[setenforce is a command line utility that is used to switch the mode SELinux is running in from enforcing to permissive and vice versa without requiring a reboot. Lately, I&#8217;ve started experimenting again with SELinux on a live system. The default targeted SELinux policy, as usual, needs some adjustment to work with a custom server [...]]]></description>
			<content:encoded><![CDATA[<p><strong>setenforce</strong> is a command line utility that is used to switch the mode <a href="http://en.wikipedia.org/wiki/Security-Enhanced_Linux">SELinux</a> is running in from <em>enforcing</em> to <em>permissive</em> and vice versa without requiring a reboot. Lately, I&#8217;ve started experimenting again with <strong>SELinux</strong> on a live system. The default targeted SELinux policy, as usual, needs some adjustment to work with a custom server configuration. So, I created some custom policy modules and loaded them onto the live system in order to test if my &#8220;<em>allow</em>&#8221; rules were effective.<br />
<span id="more-1401"></span><br />
In such cases, the system administrator must be wise enough to minimize risk. SELinux is not a forgiving feature. If the custom policy blocks the execution of a software and SELinux is running in enforcing mode, then the software does not run. That&#8217;s what SELinux is about after all.</p>
<p>The <strong>permissive mode</strong> exists mainly for testing. In this mode, the auditing mechanism generates notices (<em>AVC Denials</em>) about the action/event that was blocked, but without actually blocking that action/event. It is just a way to check what would have happened if SELinux had been running in <em>enforcing</em> mode. There are two ways to switch SELinux to permissive mode. One is to configure it through its configuration file (<code>/etc/selinux/config</code> on <abbr title="Enterprise Linux">EL</abbr>) to start in permissive mode on boot and the other is to use the aforementioned utility, <em>setenforce</em>, to switch modes while the system is live.</p>
<p>When performing tests on a live system, I usually take all precautions to minimize the risk of failure and usually, if possible, I am around to monitor the progress of the test. But, this time I had to use the custom SELinux policy for some days to see if it is actually effective or it needs further fine-tuning.</p>
<p><strong>The Mistake</strong>: I used setenforce to set SELinux into permissive mode (<code>/usr/sbin/setenforce 0</code>). setenforce is for <strong>temporary changes</strong> and it is definitely not suitable for testing the policy for a long period of time. This is because if for any reason the system reboots, SELinux will be set back into the mode that is defined into its configuration file. The mode set by <code>setenforce</code> does not survive a reboot. So, if the custom policy happens to be incomplete, it will block the server&#8217;s normal operation after the reboot. And such reboots can happen&#8230;</p>
<p>This is exactly what I experienced yesterday. The datacenter on which my virtual server is hosted had problems with its main power supply. This caused one hour of downtime. But G-Loaded&#8217;s outage was a lot greater, because my custom SELinux policy was incomplete. SELinux was started in enforcing mode, so my faulty policy blocked my www service.</p>
<p>This should be a lesson to anyone who performs tests on live systems. The Right Thing&trade; was simple: boot the server into permissive mode and do as many tests as desired. I can blame the datacenter for the one-hour downtime, but for the 7-hour unavailability of <a href="http://www.g-loaded.eu">G-Loaded</a> I am the only one to blame.</p><div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/10/30/selinux-setenforce-mode/">Using setenforce to switch SELinux mode wisely</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>

<p>Related posts:<ol><li><a href='http://www.g-loaded.eu/2006/12/20/selinux-audit-reports-script/' rel='bookmark' title='Permanent Link: SELinux audit reports script'>SELinux audit reports script</a></li>
<li><a href='http://www.g-loaded.eu/2008/11/26/using-a-switch-to-prevent-system-shutdownrebootsuspend/' rel='bookmark' title='Permanent Link: Using a switch to prevent system shutdown/reboot/suspend'>Using a switch to prevent system shutdown/reboot/suspend</a></li>
<li><a href='http://www.g-loaded.eu/2007/02/09/server-upgraded-to-fedora-6/' rel='bookmark' title='Permanent Link: Server upgraded to Fedora 6'>Server upgraded to Fedora 6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/10/30/selinux-setenforce-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.352 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-13 05:01:31 -->
