<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

       <channel>                <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2012</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Yum Error Performing Checksum</title>                                   
                        <link>http://www.openfusion.net/linux/yum_error_performing_checksum.html</link>                                                                             
                        <description>&lt;p&gt;Ok, this has bitten me enough times now that I'm going to blog it so I
don't forget it again.&lt;/p&gt;

&lt;p&gt;Symptom: you're doing a yum update on a centos5 or rhel5 box, using rpms
from a repository on a centos6 or rhel6 server (or anywhere else with
a more modern &lt;code&gt;createrepo&lt;/code&gt; available), and you get errors like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://example.com/repodata/filelists.sqlite.bz2: [Errno -3] Error performing checksum
http://example.com/repodata/primary.sqlite.bz2: [Errno -3] Error performing checksum
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What this really means that yum is too stupid to calculate the sha256
checksum correctly (and also too stupid to give you a sensible error
message like "Sorry, primary.sqlite.bz2 is using a sha256 checksum,
but I don't know how to calculate that").&lt;/p&gt;

&lt;p&gt;The fix is simple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;yum install python-hashlib
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;from either rpmforge or epel, which makes the necessary libraries
available for yum to calculate the new checksums correctly. Sorted.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/yum_error_performing_checksum/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/yum_error_performing_checksum.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2012</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>A Low Tech Pub-Sub Pattern</title>                                   
                        <link>http://www.openfusion.net/linux/low_tech_pubsub_pattern.html</link>                                                                             
                        <description>&lt;p&gt;I've been enjoying playing around with &lt;a href="http://www.zeromq.org/"&gt;ZeroMQ&lt;/a&gt;
lately, and exploring some of the ways it changes the way you approach
system architecture.&lt;/p&gt;

&lt;p&gt;One of the revelations for me has been how powerful the pub-sub (Publish-
Subscribe) pattern is. An architecture that makes it straightforward for
multiple consumers to process a given piece of data promotes lots of
small simple consumers, each performing a single task, instead of a
complex monolithic processor.&lt;/p&gt;

&lt;p&gt;This is both simpler and more complex, since you end up with more
pieces, but each piece is radically simpler. It's also more flexible and
more scalable, since you can move components around individually, and it
allows greater language and library flexibility, since you can write
individual components in completely different languages.&lt;/p&gt;

&lt;p&gt;What's also interesting is that the benefits of this pattern don't
necessarily require an advanced toolkit like ZeroMQ, particularly for
low-volume applications. Here's a sketch of a low-tech pub-sub pattern
that uses files as the pub-sub inflection point, and
&lt;a href="http://inotify.aiken.cz/"&gt;incron&lt;/a&gt;, the 'inotify cron' daemon, as our
dispatcher.&lt;/p&gt;

&lt;p&gt;Recipe:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install &lt;code&gt;incron&lt;/code&gt;, the inotify cron daemon, to monitor our data directory
for changes. On RHEL/CentOS this is available from the rpmforge or EPEL
repositories: &lt;code&gt;yum install incron&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Capture data to files in our data directory in some useful format
e.g. json, yaml, text, whatever.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup an &lt;code&gt;incrontab&lt;/code&gt; entry for each consumer monitoring CREATE operations
on our data directory e.g.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/data/directory IN_CREATE /path/to/consumer1 &amp;#036;@/&amp;#036;#
/data/directory IN_CREATE /path/to/consumer2 &amp;#036;@/&amp;#036;#
/data/directory IN_CREATE /path/to/consumer3 &amp;#036;@/&amp;#036;#
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;&amp;#036;@/&amp;#036;#&lt;/code&gt; magic passes the full file path to your consumer - see &lt;code&gt;man 5
incrontab&lt;/code&gt; for details and further options.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Done. Working pub-sub with minimal moving parts.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/low_tech_pubsub_pattern/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/low_tech_pubsub_pattern.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2012</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>AoE on RHEL/CentOS</title>                                   
                        <link>http://www.openfusion.net/linux/aoe_on_rhel_centos.html</link>                                                                             
                        <description>&lt;p&gt;I'm a big fan of &lt;a href="http://www.coraid.com/"&gt;Coraid&lt;/a&gt; and their relatively
low-cost &lt;a href="http://www.coraid.com/products/san_storage"&gt;storage units&lt;/a&gt;.
I've been using them for 5+ years now, and they've always been pretty
well engineered, reliable, and performant.&lt;/p&gt;

&lt;p&gt;They talk &lt;a href="http://en.wikipedia.org/wiki/ATA_over_Ethernet"&gt;ATA-over-Ethernet (AoE)&lt;/a&gt;,
which is a very simple non-routable protocol for transmitting ATA
commands directly via Ethernet frames, without the overhead of higher
level layers like IP and TCP. So they're a lighter protocol than
something like iSCSI, and so theoretically higher performance.&lt;/p&gt;

&lt;p&gt;One issue with them on linux is that the in-kernel 'aoe' driver is
typically pretty old. Coraid's 
&lt;a href="http://support.coraid.com/support/linux/"&gt;latest aoe driver&lt;/a&gt; is version
78, for instance, while the RHEL6 kernel (2.6.32) comes with aoe v47,
and the RHEL5 kernel (2.6.18) comes with aoe v22. So updating to the
latest version is highly recommended, but also a bit of a pain, because
if you do it manually it has to be recompiled for each new kernel
update.&lt;/p&gt;

&lt;p&gt;The modern way to handle this is to use a
&lt;a href="http://elrepo.org/tiki/FAQ"&gt;kernel-ABI tracking kmod&lt;/a&gt;, which gives you
a driver that will work across multiple kernel updates for a given EL
generation, without having to recompile each time.&lt;/p&gt;

&lt;p&gt;So I've created a kmod-aoe package that seems to work nicely here. It's
downloadable below, or you can install it from my
&lt;a href="http://www.openfusion.net/linux/openfusion_rpm_repository"&gt;yum repository&lt;/a&gt;.
The kmod depends on the 'aoetools' package, which supplies the command
line utilities for managing your AoE devices.&lt;/p&gt;

&lt;p&gt;kmod-aoe (v78):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SRPM: &lt;a href="http://www.openfusion.com.au/labs/srpms/aoe-kmod-78-2.of.el6.src.rpm"&gt;http://www.openfusion.com.au/labs/srpms/aoe-kmod-78-2.of.el6.src.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS5-x86_64 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos5-x86_64/RPMS.of/kmod-aoe-78-2.of.el5.x86_64.rpm"&gt;http://www.openfusion.com.au/mrepo/centos5-x86_64/RPMS.of/kmod-aoe-78-2.of.el5.x86_64.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS6-x86_64 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos6-x86_64/RPMS.of/kmod-aoe-78-2.of.el6.x86_64.rpm"&gt;http://www.openfusion.com.au/mrepo/centos6-x86_64/RPMS.of/kmod-aoe-78-2.of.el6.x86_64.rpm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;aoetools (v32):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SRPM: &lt;a href="http://www.openfusion.com.au/labs/srpms/aoetools-32-2.of.el6.src.rpm"&gt;http://www.openfusion.com.au/labs/srpms/aoetools-32-2.of.el6.src.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS5-i386 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos5-i386/RPMS.of/aoetools-32-2.of.el5.i386.rpm"&gt;http://www.openfusion.com.au/mrepo/centos5-i386/RPMS.of/aoetools-32-2.of.el5.i386.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS5-x86_64 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos5-x86_64/RPMS.of/aoetools-32-2.of.el5.x86_64.rpm"&gt;http://www.openfusion.com.au/mrepo/centos5-x86_64/RPMS.of/aoetools-32-2.of.el5.x86_64.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS6-i386 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos6-i386/RPMS.of/aoetools-32-2.of.el6.i686.rpm"&gt;http://www.openfusion.com.au/mrepo/centos6-i386/RPMS.of/aoetools-32-2.of.el6.i686.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CentOS6-x86_64 RPM: &lt;a href="http://www.openfusion.com.au/mrepo/centos6-x86_64/RPMS.of/aoetools-32-2.of.el6.x86_64.rpm"&gt;http://www.openfusion.com.au/mrepo/centos6-x86_64/RPMS.of/aoetools-32-2.of.el6.x86_64.rpm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's an init script in the aoetools package that loads the kernel module,
activates any configured LVM volume groups, and mounts any filesystems.
All configuration is done via &lt;code&gt;/etc/sysconfig/aoe&lt;/code&gt;.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/aoe_on_rhel_centos/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/aoe_on_rhel_centos.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>OpenLDAP Tips and Tricks</title>                                   
                        <link>http://www.openfusion.net/linux/openldap_tips_and_tricks.html</link>                                                                             
                        <description>&lt;p&gt;Having spent too much of this week debugging problems around migrating
ldap servers from RHEL5 to RHEL6, here are some miscellaneous notes
to self:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The service is named &lt;code&gt;ldap&lt;/code&gt; on RHEL5, and &lt;code&gt;slapd&lt;/code&gt; on RHEL6 e.g.
you do &lt;code&gt;service ldap start&lt;/code&gt; on RHEL5, but &lt;code&gt;service slapd start&lt;/code&gt;
on RHEL6&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On RHEL6, you want all of the following packages installed on your clients:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;yum install openldap-clients pam_ldap nss-pam-ldapd
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This seems to be the magic incantation that works for me (with real SSL
certificates, though):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;authconfig --enableldap --enableldapauth \
  --ldapserver ldap.example.com \
  --ldapbasedn="dc=example,dc=com" \
  --update
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be aware that there are &lt;em&gt;multiple&lt;/em&gt; ldap configuration files involved now.
All of the following end up with ldap config entries in them and need to
be checked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/etc/openldap/ldap.conf&lt;/li&gt;
&lt;li&gt;/etc/pam_ldap.conf&lt;/li&gt;
&lt;li&gt;/etc/nslcd.conf&lt;/li&gt;
&lt;li&gt;/etc/sssd/sssd.conf&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note too that &lt;code&gt;/etc/openldap/ldap.conf&lt;/code&gt; uses uppercased directives (e.g. &lt;code&gt;URI&lt;/code&gt;)
that get lowercased in the other files (&lt;code&gt;URI&lt;/code&gt; -&gt; &lt;code&gt;uri&lt;/code&gt;). Additionally, some
directives are confusingly renamed as well - e.g. &lt;code&gt;TLA_CACERT&lt;/code&gt; in
&lt;code&gt;/etc/openldap/ldap.conf&lt;/code&gt; becomes &lt;code&gt;tla_cacertfile&lt;/code&gt; in most of the others.
:-(&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to do SSL or TLS, you should know that the default behaviour
is for ldap clients to verify certificates, and give misleading bind errors
if they can't validate them. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;if you're using self-signed certificates, add &lt;code&gt;TLS_REQCERT allow&lt;/code&gt; to 
&lt;code&gt;/etc/openldap/ldap.conf&lt;/code&gt; on your clients, which means allow certificates
the clients can't validate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if you're using CA-signed certificates, and want to verify them, add
your CA PEM certificate to a directory of your choice (e.g. 
&lt;code&gt;/etc/openldap/certs&lt;/code&gt;, or &lt;code&gt;/etc/pki/tls/certs&lt;/code&gt;, for instance), and point
to it using &lt;code&gt;TLA_CACERT&lt;/code&gt; in &lt;code&gt;/etc/openldap/ldap.conf&lt;/code&gt;, and
&lt;code&gt;tla_cacertfile&lt;/code&gt; in &lt;code&gt;/etc/ldap.conf&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RHEL6 uses a new-fangled &lt;code&gt;/etc/openldap/slapd.d&lt;/code&gt; directory for the old
&lt;code&gt;/etc/openldap/slapd.conf&lt;/code&gt; config data, and the
&lt;a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Migration_Planning_Guide/ch07s03.html"&gt;RHEL6 Migration Guide&lt;/a&gt;
tells you to how to convert from one to the other. But if you simply 
rename the default &lt;code&gt;slapd.d&lt;/code&gt; directory, slapd will use the old-style
&lt;code&gt;slapd.conf&lt;/code&gt; file quite happily, which is much easier to read/modify/debug,
at least while you're getting things working.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you run into problems on the server, there are lots of helpful utilities
included with the &lt;code&gt;openldap-servers&lt;/code&gt; package. Check out the manpages for
&lt;code&gt;slaptest(8)&lt;/code&gt;, &lt;code&gt;slapcat(8)&lt;/code&gt;, &lt;code&gt;slapacl(8)&lt;/code&gt;, &lt;code&gt;slapadd(8)&lt;/code&gt;, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Further reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Migration_Planning_Guide/ch07s03.html"&gt;RHEL6 Migration Planning Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://people.redhat.com/alikins/ldap/ldap.html"&gt;http://people.redhat.com/alikins/ldap/ldap.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://islandlinux.org/howto/installing-secure-ldap-openldap-ssl-ubuntu-using-self-signed-certificate"&gt;http://islandlinux.org/howto/installing-secure-ldap-openldap-ssl-ubuntu-using-self-signed-certificate&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/openldap_tips_and_tricks/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/openldap_tips_and_tricks.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>rpm-find-changes</title>                                   
                        <link>http://www.openfusion.net/linux/rpm_find_changes.html</link>                                                                             
                        <description>&lt;p&gt;rpm-find-changes is a little script I wrote a while ago for rpm-based
systems (RedHat, CentOS, Mandriva, etc.). It finds files in a filesystem
tree that are not owned by any rpm package (orphans), or are modified
from the version distributed with their rpm. In other words, any file
that has been introduced or changed from it's distributed version.&lt;/p&gt;

&lt;p&gt;It's intended to help identify candidates for backup, or just for
tracking interesting changes. I run it nightly on /etc on most of my
machines, producing a list of files that I copy off the machine (using
another tool, which I'll blog about later) and store in a git
repository.&lt;/p&gt;

&lt;p&gt;I've also used it for tracking changes to critical configuration trees
across multiple machines, to make sure everything is kept in sync, and
to be able to track changes over time.&lt;/p&gt;

&lt;p&gt;Available on github:
&lt;a href="https://github.com/gavincarr/rpm-find-changes"&gt;https://github.com/gavincarr/rpm-find-changes&lt;/a&gt;&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/rpm_find_changes/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/rpm_find_changes.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Google Hangout on CentOS 6</title>                                   
                        <link>http://www.openfusion.net/linux/google-hangouts-on-centos.html</link>                                                                             
                        <description>&lt;p&gt;Kudos to Google for providing linux plugins for their
&lt;a href="http://google.com/+"&gt;Google Plus&lt;/a&gt;
Hangouts (a multi-way video chat system), for both debian-based and
rpm-based systems. The library requirements don't seem to be
documented anywhere though, so here's the magic incantation required
for installation on CentOS6 x86_64:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
yum install libstdc++.i686 gtk2.i686 \
  libXrandr.i686 libXcomposite.i686 libXfixes.i686 \
  pulseaudio-libs.i686 alsa-lib.i686
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/google-hangouts-on-centos/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/google-hangouts-on-centos.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Poor Man's NTP</title>                                   
                        <link>http://www.openfusion.net/linux/poor_mans_ntp.html</link>                                                                             
                        <description>&lt;p&gt;One of today's annoyances was a third-party complaining about clock
skew on a server at their site that they're testing against. No, they
don't have a local ntp server, and no, they couldn't allow us to
connect out to a designated ntp server externally. All we have is an
ssh forward in.&lt;/p&gt;

&lt;p&gt;They wanted me to manually set the clock on the server whenever they
noticed it was out of synch! Real professionals.&lt;/p&gt;

&lt;p&gt;I thought about tunneling an ntp stream out, but that requires
udp-to-tcp fudging at each end, or using ssh's Tunnel facility, which
requires root at both ends.&lt;/p&gt;

&lt;p&gt;In the end, I settled for the low-tech approach - a once a day cron
job that resets the time based on a local clock. Ugly, but good enough:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
ssh root@server date --utc &amp;#036;(date --utc "+%m%d%H%M%Y.%S")
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/poor_mans_ntp/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/poor_mans_ntp.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Hosttag - Tagging for Hosts</title>                                   
                        <link>http://www.openfusion.net/sysadmin/hosttag.html</link>                                                                             
                        <description>&lt;p&gt;When you have more than a handful of hosts on your network, you need to
start keeping track of what services are living where, what roles
particular servers have, etc. This can be documentation-based (say on a
wiki, or offline), or it can be implicit in a configuration management
system. Old-school sysadmins often used dns TXT records for these kind of
notes, on the basis that it was easy to look them up from the command
line from anywhere.&lt;/p&gt;

&lt;p&gt;I've been experimenting with the idea of using lightweight tags attached
to hostnames for this kind of data, and it's been working really nicely.
Hosttag is just a couple of ruby command line utilities, one (&lt;code&gt;hosttag&lt;/code&gt;
or &lt;code&gt;ht&lt;/code&gt;) for doing tag or host lookups, and one (&lt;code&gt;htset&lt;/code&gt;/&lt;code&gt;htdel&lt;/code&gt;) for
doing adds and deletes. Both are network based, so you can do lookups
from wherever you are, rather than having to go to somewhere centralised.&lt;/p&gt;

&lt;p&gt;Hosttag uses a &lt;a href="http://redis.io/"&gt;redis&lt;/a&gt; server to store the hostname-tag
and tag-hostname mappings as redis sets, which makes queries lightning
fast, and setup straightforward.&lt;/p&gt;

&lt;p&gt;So let's see it in action (rpms available in 
&lt;a href="http://www.openfusion.net/linux/openfusion_rpm_repository"&gt;my yum repo&lt;/a&gt;):&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Installation - first install redis somewhere, and setup a 'hosttag'
# dns alias to the redis host (or use the `-s &amp;lt;server&amp;gt;` option in
# the examples that follow). e.g. on CentOS:
&amp;#036; yum install redis rubygem-redis

# Install hosttag as an rpm package (from my yum repo).
# Also requires/installs the redis rubygem.
&amp;#036; yum install hosttag
# gem version coming soon (gem install hosttag)

# Setup some test data (sudo is required for setting and deleting)
# Usage: htset --tag &amp;lt;host&amp;gt; &amp;lt;tag1&amp;gt; &amp;lt;tag2&amp;gt; &amp;lt;tag3&amp;gt; ...
&amp;#036; sudo htset --tag server1 dns dell ldap server centos centos5 i386 syd
&amp;#036; sudo htset --tag server2 dns dell ldap server debian debian6 x86_64 mel
&amp;#036; sudo htset --tag server3 hp nfs server centos centos6 x86_64 syd
&amp;#036; sudo htset --tag lappy laptop ubuntu maverick i386 syd

# Now run some queries
# Query by tag
&amp;#036; ht dns
server1 server2
&amp;#036; ht i386
lappy server1

# Query by host
&amp;#036; ht server2
debian debian6 dell dns ldap mel server x86_64

# Multiple arguments
&amp;#036; ht --or centos debian
server1 server2 server3
&amp;#036; ht --and dns ldap
server1 server2

# All hosts
&amp;#036; ht --all
lappy server1 server2 server3
# All tags
&amp;#036; ht --all-tags
centos centos5 centos6 debian debian6 dell dns hp i386 laptop ldap \
maverick mel nfs server syd ubuntu x86_64
&lt;/pre&gt;

&lt;p&gt;An obvious use case is to perform actions on multiple hosts using your
ssh loop of choice e.g.&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
&amp;#036; sshr &amp;#036;(ht centos) 'yum -y update'
&lt;/pre&gt;

&lt;p&gt;Finally, a warning: hosttag doesn't have any security built in yet, so it
should only be used on trusted networks.&lt;/p&gt;

&lt;p&gt;Source code is on github: &lt;a href="https://github.com/gavincarr/hosttag"&gt;https://github.com/gavincarr/hosttag&lt;/a&gt; - patches
welcome :-).&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/sysadmin/hosttag/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/sysadmin/hosttag.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Introducing PlanetAUX</title>                                   
                        <link>http://www.openfusion.net/web/planetaux.html</link>                                                                             
                        <description>&lt;p&gt;I wrote a &lt;a href="http://www.openfusion.net/web/asx20_announcements"&gt;post&lt;/a&gt; a couple of years ago surveying 
the 20 biggest Australian listed companies in terms of how they syndicate
the ASX announcements they make when they have news for the market.&lt;/p&gt;

&lt;p&gt;All of the companies made their announcements available on their (or an 
associated) website, but that obviously requires that an interested investor
or follower of the company regularly check the announcements page of each
company they're interested in - not ideal, timely, or scalable.&lt;/p&gt;

&lt;p&gt;"Push" or broadcast approaches are much more useful for this sort of thing,
and back then 14 or the 20 did make their announcements available via email 
- which is useful enough - and 7 of the 20 also published RSS or Atom feeds,
which are better still, because they're more lightweight, centralised, and 
standardised/re-mixable.&lt;/p&gt;

&lt;p&gt;On the other hand, 7/20 is a pretty ordinary score, especially considering
these are the biggest Australian listed companies. Smaller companies with
fewer resources are presumably going to fare even worse.&lt;/p&gt;

&lt;p&gt;Two years on the number of ASX20 companies with announcements feeds has now
leapt to ... 9. :-/&lt;/p&gt;

&lt;p&gt;And so towards the end of last year I decided to scratch this particular
itch, and built an announcement aggregator site called 
&lt;a href="http://www.planetaux.com/"&gt;PlanetAUX&lt;/a&gt;. It aggregates the announcements
feeds of the ASX20 companies with them, and generates announcements feeds
for those that don't have them.&lt;/p&gt;

&lt;p&gt;Of the companies in the ASX20, there was only one whose HTML was so terrible
that I couldn't manage to parse it. I figured 19/20 isn't bad for starters.&lt;/p&gt;

&lt;p&gt;Plans are to add more companies as time and interest demands, presumably
the remainder of the ASX50 initially, and then we'll see how things go.&lt;/p&gt;

&lt;p&gt;Happy feeding.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/web/planetaux/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/web/planetaux.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>RHEL6 GDM Sessions Workaround</title>                                   
                        <link>http://www.openfusion.net/linux/rhel6-gdm-session-workaround.html</link>                                                                             
                        <description>&lt;p&gt;The GDM Greeter in RHEL6 seems to have lost the ability to select
'session types' (or window managers), which apparently means you're
stuck using Gnome, even if you have other better options installed.
One workaround is to install KDM instead, and set &lt;code&gt;DISPLAYMANAGER=KDE&lt;/code&gt;
in your &lt;code&gt;/etc/sysconfig/desktop&lt;/code&gt; config, as KDM does still support
selectable session types.&lt;/p&gt;

&lt;p&gt;Since I've become a big fan of 
&lt;a href="http://en.wikipedia.org/wiki/Tiling_window_managers"&gt;tiling window managers&lt;/a&gt;
in general, and &lt;a href="http://en.wikipedia.org/wiki/Ion_%28window_manager%29"&gt;ion&lt;/a&gt;
in particular, this was pretty annoying, so I wasted a few hours
today working through the /etc/X11 scripts and figuring out how
they hung together on RHEL6.&lt;/p&gt;

&lt;p&gt;So for any other gnome-haters out there who don't want to have to
go to KDM, here's a patch to &lt;code&gt;/etc/X11/xinit/Xsession&lt;/code&gt; that ignores
the default 'gnome-session' set by GDM, which allows proper window
manager selection either by user &lt;code&gt;.xsession&lt;/code&gt; or &lt;code&gt;.Xclients&lt;/code&gt; files, 
or by the &lt;code&gt;/etc/sysconfig/desktop&lt;/code&gt; DISPLAY setting.&lt;/p&gt;

&lt;pre class="sh_diff"&gt;
diff --git a/xinit/Xsession b/xinit/Xsession
index e12e0ee..ab94d28 100755
--- a/xinit/Xsession
+++ b/xinit/Xsession
@@ -30,6 +30,14 @@ SWITCHDESKPATH=/usr/share/switchdesk
 # Xsession and xinitrc scripts which has been factored out to avoid duplication
 . /etc/X11/xinit/xinitrc-common

+# RHEL6 GDM doesn't seem to support selectable sessions, and always requests a
+# gnome-session. So we unset this default here, to allow things like user
+# .xsession or .Xclients files to be checked, and /etc/sysconfig/desktop
+# settings (via /etc/X11/xinit/Xclients) honoured.
+if [ -n "$GDMSESSION" -a $# -eq 1 -a "$1" = gnome-session ]; then
+  shift
+fi
+
 # This Xsession.d implementation, is intended to obsolte and replace the
 # various mechanisms present in the 'case' statement which follows, and to
 # eventually be able to easily remove all hard coded window manager specific

&lt;/pre&gt;

&lt;p&gt;Apply as root:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
cd /etc/X11
patch -p1 &amp;lt; /tmp/xsession.patch
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/rhel6-gdm-session-workaround/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/rhel6-gdm-session-workaround.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2011</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Rebuild Inventory</title>                                   
                        <link>http://www.openfusion.net/linux/rebuild_inventory.html</link>                                                                             
                        <description>&lt;p&gt;Here's what I use to take a quick inventory of a machine before a rebuild,
both to act as a reference during the rebuild itself, and in case something
goes pear-shaped. The whole chunk after &lt;code&gt;script&lt;/code&gt; up to &lt;code&gt;exit&lt;/code&gt; is 
cut-and-pastable.&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# as root, where you want your inventory file
script &amp;#036;(hostname).inventory
export PS1='\h:\w\&amp;#036; '               # reset prompt to avoid ctrl chars
fdisk -l /dev/sd?                   # list partition tables
cat /proc/mdstat                    # list raid devices
pvs                                 # list lvm stuff
vgs
lvs
df -h                               # list mounts
ip addr                             # list network interfaces
ip route                            # list network routes
cat /etc/resolv.conf                # show resolv.conf
exit

# Cleanup control characters in the inventory
perl -i -pe 's/\r//g; s/\033\]\d+;//g; s/\033\[\d+m//g; s/\007/\//g' \
  &amp;#036;(hostname).inventory

# And then copy it somewhere else in case of problems ;-)
scp &amp;#036;(hostname).inventory somewhere:
&lt;/pre&gt;

&lt;p&gt;Anything else useful I've missed?&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/rebuild_inventory/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/rebuild_inventory.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Cronologue</title>                                   
                        <link>http://www.openfusion.net/sysadmin/cronologue.html</link>                                                                             
                        <description>&lt;p&gt;Came across &lt;a href="https://github.com/vvuksan/cronologger"&gt;cronologger&lt;/a&gt; 
(&lt;a href="http://vuksan.com/blog/2010/07/06/store-your-cron-output-with-cronologger/"&gt;blog post&lt;/a&gt;) 
recently (via &lt;a href="http://www.unixdaemon.net/tools/adventures-in-cronologger.html"&gt;Dean Wilson&lt;/a&gt;),
which is a simple wrapper script you use around your &lt;code&gt;cron(8)&lt;/code&gt; jobs, which
captures any stdout and stderr output and logs it to a couchdb database,
instead of the traditional behaviour of sending it to you as email.&lt;/p&gt;

&lt;p&gt;It's a nice idea, particularly for jobs with important output where it
would be nice to able to look back in time more easily than by trawling
through a noisy inbox, or for sites with lots of cron jobs where the sheer 
volume is difficult to handle usefully as email.&lt;/p&gt;

&lt;p&gt;Cronologger comes with a simple web interface for displaying your cron jobs,
but so far it's pretty rudimentary. I quickly realised that this was another
place (cf. &lt;a href="http://www.openfusion.net/blosxom/blosxom4nagios"&gt;blosxom4nagios&lt;/a&gt;) where 
&lt;a href="http://blosxom.sourceforge.net/"&gt;blosxom&lt;/a&gt; could be used to provide a pretty 
useful gui with very little work.&lt;/p&gt;

&lt;p&gt;Thus: &lt;a href="https://github.com/gavincarr/cronologue"&gt;cronologue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cronologue(1)&lt;/code&gt; is the wrapper, written in perl, which logs job records and 
and stdout/stderr output via standard HTTP PUTs back to a designated apache 
server, as flat text files. Parameters can be used to control whether job 
records are always created, or only when there is output produced. There's 
also a --passthru mode in which stdout and stderr streams are still output,
allowing both email and cronologue output to be produced.&lt;/p&gt;

&lt;p&gt;On the server side a custom blosxom install is used to display the job records, 
which can be filtered by hostname or by date. There's also an RSS feed available.&lt;/p&gt;

&lt;p&gt;Obligatory screenshot:&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/cronologue.png" width="600" height="564" alt="Cronologue GUI"&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I should add that RPMs for CentOS5 (but which will probably work on 
most RPM-based distros) are available from 
&lt;a href="http://www.openfusion.net/linux/openfusion_rpm_repository"&gt;my yum repository&lt;/a&gt;.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/sysadmin/cronologue/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/sysadmin/cronologue.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Parallel Processing Perl Modules</title>                                   
                        <link>http://www.openfusion.net/perl/parallel_processing_perl_modules.html</link>                                                                             
                        <description>&lt;p&gt;Needed to parallelise some processing in perl the last few days, and
did a quick survey of some of the parallel processing modules on CPAN,
of which there is the normal 
&lt;a href="http://search.cpan.org/search?query=parallel+fork&amp;amp;mode=module"&gt;bewildering diversity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As usual, it depends exactly what you're trying to do. In my case I
just needed to be able to fork a bunch of processes off, have them 
process some data, and hand the results back to the parent.&lt;/p&gt;

&lt;p&gt;So here are my notes on a random selection of the available modules.
The example each time is basically a parallel version of the following
map:&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
my %out = map { &amp;#036;_ ** 2 } 1 .. 50;
&lt;/pre&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~dlux/Parallel-ForkManager/"&gt;Parallel::ForkManager&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Object oriented wrapper around 'fork'. Supports parent callbacks. 
Passing data back to parent uses files, and feels a little bit clunky.
Dependencies: none.&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
use Parallel::ForkManager 0.7.6;

my @num = 1 .. 50;

my &amp;#036;pm = Parallel::ForkManager-&amp;gt;new(5);

my %out;
&amp;#036;pm-&amp;gt;run_on_finish(sub {    # must be declared before first 'start'
    my (&amp;#036;pid, &amp;#036;exit_code, &amp;#036;ident, &amp;#036;exit_signal, &amp;#036;core_dump, &amp;#036;data) = @_;
    &amp;#036;out{ &amp;#036;data-&amp;gt;[0] } = &amp;#036;data-&amp;gt;[1];
});

for my &amp;#036;num (@num) {
    &amp;#036;pm-&amp;gt;start and next;   # Parent nexts

    # Child
    my &amp;#036;sq = &amp;#036;num ** 2;

    &amp;#036;pm-&amp;gt;finish(0, [ &amp;#036;num, &amp;#036;sq ]);   # Child exits
}
&amp;#036;pm-&amp;gt;wait_all_children;
&lt;/pre&gt;

&lt;p&gt;[Version 0.7.9] &lt;/p&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~andya/Parallel-Iterator/"&gt;Parallel::Iterator&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Basically a parallel version of 'map'. Dependencies: none.&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
use Parallel::Iterator qw(iterate);

my @num = 1 .. 50;

my &amp;#036;it = iterate( sub {
    # sub is a closure, return outputs
    my (&amp;#036;id, &amp;#036;num) = @_;
    return &amp;#036;num ** 2;
}, \@num );

my %out = ();
while (my (&amp;#036;num, &amp;#036;square) = &amp;#036;it-&amp;gt;()) {
  &amp;#036;out{&amp;#036;num} = &amp;#036;square;
}
&lt;/pre&gt;

&lt;p&gt;[Version 1.00]&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~pmorch/Parallel-Loops/"&gt;Parallel::Loops&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Provides parallel versions of 'foreach' and 'while'. It uses 'tie' to allow 
shared data structures between the parent and children. Dependencies: 
Parallel::ForkManager.&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
use Parallel::Loops;

my @num = 1 .. 50;

my &amp;#036;pl = Parallel::Loops-&amp;gt;new(5);

my %out;
&amp;#036;pl-&amp;gt;share(\%out);

&amp;#036;pl-&amp;gt;foreach( \@num, sub {
    my &amp;#036;num = &amp;#036;_;           # note this uses &amp;#036;_, not @_
    &amp;#036;out{&amp;#036;num} = &amp;#036;num ** 2;
});
&lt;/pre&gt;

&lt;p&gt;You can also return values from the subroutine like Iterator, avoiding
the explicit 'share':&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
my %out = &amp;#036;pl-&amp;gt;foreach( \@num, sub {
    my &amp;#036;num = &amp;#036;_;           # note this uses &amp;#036;_, not @_
    return ( &amp;#036;num, &amp;#036;num ** 2 );
});
&lt;/pre&gt;

&lt;p&gt;[Version 0.03]&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~aristotle/Proc-Fork/"&gt;Proc::Fork&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Provides an interesting perlish forking interface using blocks. No built-in 
support for returning data from children, but provides examples using pipes.
Dependencies: Exporter::Tidy.&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
use Proc::Fork;
use IO::Pipe;
use Storable qw(freeze thaw);

my @num = 1 .. 50;
my @children;

for my &amp;#036;num (@num) {
    my &amp;#036;pipe = IO::Pipe-&amp;gt;new;

    run_fork{ child {
        # Child
        &amp;#036;pipe-&amp;gt;writer;
        print &amp;#036;pipe freeze([ &amp;#036;num, &amp;#036;num ** 2 ]);
        exit;
    } };

    # Parent
    &amp;#036;pipe-&amp;gt;reader;
    push @children, &amp;#036;pipe;
}

my %out;
for my &amp;#036;pipe (@children) {
    my &amp;#036;entry = thaw( &amp;lt;&amp;#036;pipe&amp;gt; );
    &amp;#036;out{ &amp;#036;entry-&amp;gt;[0] } = &amp;#036;entry-&amp;gt;[1];
}
&lt;/pre&gt;

&lt;p&gt;[Version 0.71]&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~kazuho/Parallel-Prefork/"&gt;Parallel::Prefork&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Like Parallel::ForkManager, but adds better signal handling. Doesn't
seem to provide built-in support for returning data from children. 
Dependencies: Proc::Wait3.&lt;/p&gt;

&lt;p&gt;[Version 0.08]&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://search.cpan.org/~wsnyder/Parallel-Forker/"&gt;Parallel::Forker&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;More complex module, loosely based on ForkManager (?). Includes better signal 
handling, and supports scheduling and dependencies between different groups
of subprocesses. Doesn't appear to provide built-in support for passing data 
back from children.&lt;/p&gt;

&lt;p&gt;[Version 1.232]&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/perl/parallel_processing_perl_modules/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/perl/parallel_processing_perl_modules.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Exploring Riak</title>                                   
                        <link>http://www.openfusion.net/sysadmin/exploring_riak.html</link>                                                                             
                        <description>&lt;p&gt;Been playing with &lt;a href="http://www.basho.com/Riak.html"&gt;Riak&lt;/a&gt; recently, which is
one of the modern dynamo-derived nosql databases (the other main ones being 
Cassandra and Voldemort). We're evaluating it for use as a really large 
&lt;a href="http://code.google.com/p/brackup/"&gt;brackup&lt;/a&gt; datastore, the primary attraction 
being the near linear scalability available by adding (relatively cheap) new 
nodes to the cluster, and decent availability options in the face of node 
failures.&lt;/p&gt;

&lt;p&gt;I've built riak packages for RHEL/CentOS 5, available at my 
&lt;a href="http://www.openfusion.net/linux/openfusion_rpm_repository"&gt;repository&lt;/a&gt;,
and added support for a riak 'target' to the &lt;a href="http://search.cpan.org/dist/Brackup/"&gt;latest
version (1.10)&lt;/a&gt; of brackup (packages 
also available at my repo).&lt;/p&gt;

&lt;p&gt;The first thing to figure out is the maximum number of nodes you expect
your riak cluster to get to. This you use to size the &lt;code&gt;ring_creation_size&lt;/code&gt;
setting, which is the number of partitions the hash space is divided into.
It must be a power of 2 (64, 128, 256, etc.), and the reason it's important
is that it cannot be easily changed after the cluster has been created. 
The rule of thumb is that for performance you want at least 10 partitions 
per node/machine, so the default &lt;code&gt;ring_creation_size&lt;/code&gt; of 64 is really only 
useful up to about 6 nodes. 128 scales to 10-12, 256 to 20-25, etc. For more 
info see the &lt;a href="https://wiki.basho.com/display/RIAK/Configuration+Files"&gt;Riak Wiki&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's the script I use for configuring a new node on CentOS. The main 
things to tweak here are the &lt;code&gt;ring_creation_size&lt;/code&gt; you want (here I'm using
512, for a biggish cluster), and the interface to use to get the default ip
address (here &lt;code&gt;eth0&lt;/code&gt;, or you could just hardcode 0.0.0.0 instead of &lt;code&gt;&amp;#036;ip&lt;/code&gt;).&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
#!/bin/sh
# Riak configuration script for CentOS/RHEL

# Install riak (and IO::Interface, for next)
yum -y install riak perl-IO-Interface

# To set app.config:web_ip to use primary ip, do:
perl -MIO::Interface::Simple -i \
  -pe "BEGIN { \&amp;#036;ip = IO::Interface::Simple-&amp;gt;new(q/eth0/)-&amp;gt;address; } 
      s/127\.0\.0\.1/\&amp;#036;ip/" /etc/riak/app.config

# To add a ring_creation_size clause to app.config, do:
perl -i \
  -pe 's/^((\s*)%% riak_web_ip)/&amp;#036;2%% ring_creation_size is the no. of partitions to divide the hash
&amp;#036;2%% space into (default: 64).
&amp;#036;2\{ring_creation_size, 512\},

&amp;#036;1/' /etc/riak/app.config

# To set riak vm_args:name to hostname do:
perl -MSys::Hostname -i -pe 's/127\.0\.0\.1/hostname/e' /etc/riak/vm.args

# display (bits of) config files for checking
echo
echo '********************'
echo /etc/riak/app.config
echo '********************'
head -n30 /etc/riak/app.config
echo
echo '********************'
echo /etc/riak/vm.args
echo '********************'
cat /etc/riak/vm.args
&lt;/pre&gt;

&lt;p&gt;Save this to a file called e.g. &lt;code&gt;riak_configure&lt;/code&gt;, and then to configure a couple 
of nodes you do the following (note that &lt;code&gt;NODE&lt;/code&gt; is any old internal hostname you use 
to ssh to the host in question, but &lt;code&gt;FIRST_NODE&lt;/code&gt; needs to use the actual &lt;code&gt;-name&lt;/code&gt; 
parameter defined in &lt;code&gt;/etc/riak/vm.args&lt;/code&gt; on your first node):&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# First node
NODE=node1
cat riak_configure | ssh &amp;#036;NODE sh
ssh &amp;#036;NODE 'chkconfig riak on; service riak start'
# Run the following until ringready reports TRUE
ssh &amp;#036;NODE riak-admin ringready

# All nodes after the first
FIRST_NODE=riak@node1.example.com
NODE=node2
cat riak_configure | ssh &amp;#036;NODE sh
ssh &amp;#036;NODE "chkconfig riak on; service riak start &amp;amp;&amp;amp; riak-admin join &amp;#036;FIRST_NODE"
# Run the following until ringready reports TRUE
ssh &amp;#036;NODE riak-admin ringready
&lt;/pre&gt;

&lt;p&gt;That's it. You should now have a working riak cluster accessible on port 8098 on your 
cluster nodes.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/sysadmin/exploring_riak/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/sysadmin/exploring_riak.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Remote Rebuild, CentOS-style</title>                                   
                        <link>http://www.openfusion.net/linux/remote_rebuild_centos_style.html</link>                                                                             
                        <description>&lt;p&gt;&lt;em&gt;Problem:&lt;/em&gt; you've got a remote server that's significantly hosed, either 
through a screwup somewhere or a power outage that did nasty things to
your root filesystem or something. You have no available remote hands, 
and/or no boot media anyway. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Preconditions:&lt;/em&gt; You have another server you can access on the same 
network segment, and remote access to the broken server, either through 
a DRAC or iLO type card, or through some kind of serial console server 
(like a Cyclades/Avocent box).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Solution:&lt;/em&gt; in extremis, you can do a remote rebuild. Here's the simplest
recipe I've come up with. I'm rebuilding using centos5-x86_64 version 
5.5; adjust as necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;dnsmasq&lt;/code&gt;, &lt;code&gt;mrepo&lt;/code&gt; and &lt;code&gt;syslinux&lt;/code&gt; are not core CentOS packages, 
so you need to enable the &lt;a href="http://rpmrepo.org/RPMforge"&gt;rpmforge&lt;/a&gt; 
repository to follow this recipe. This just involves:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
&lt;/pre&gt;

&lt;p&gt;1. On your working box (which you're now going to press into service as a 
build server), install and configure &lt;a href="http://www.thekelleys.org.uk/dnsmasq/"&gt;dnsmasq&lt;/a&gt;
to provide &lt;code&gt;dhcp&lt;/code&gt; and &lt;code&gt;tftp&lt;/code&gt; services:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Install dnsmasq
yum install dnsmasq

# Add the following lines to the bottom of your /etc/dnsmasq.conf file
# Note that we don't use the following ip address, but the directive
# itself is required for dnsmasq to turn dhcp functionality on
dhcp-range=ignore,192.168.1.99,192.168.1.99
# Here use the broken server's mac addr, hostname, and ip address
dhcp-host=00:d0:68:09:19:80,broken.example.com,192.168.1.5,net:centos5x
# Point the centos5x tag at the tftpboot environment you're going to setup
dhcp-boot=net:centos5x,/centos5x-x86_64/pxelinux.0
# And enable tftp
enable-tftp
tftp-root = /tftpboot
#log-dhcp

# Then start up dnsmasq
service dnsmasq start
&lt;/pre&gt;

&lt;p&gt;2. Install and configure &lt;a href="http://dag.wieers.com/home-made/mrepo/"&gt;mrepo&lt;/a&gt;
to provide your CentOS build environment:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Install mrepo and syslinux
yum install mrepo syslinux

# Setup a minimal /etc/mrepo.conf e.g.
cat &amp;gt; /etc/mrepo.conf
[main]
srcdir = /var/mrepo
wwwdir = /var/www/mrepo
confdir = /etc/mrepo.conf.d
arch = x86_64
mailto = root@example.com
smtp-server = localhost
pxelinux = /usr/lib/syslinux/pxelinux.0
tftpdir = /tftpboot

[centos5]
release = 5
arch = x86_64
metadata = repomd repoview
name = Centos-&amp;#036;release &amp;#036;arch
#iso = CentOS-&amp;#036;release.5-&amp;#036;arch-bin-DVD-?of2.iso
#iso = CentOS-&amp;#036;release.5-&amp;#036;arch-bin-?of8.iso
^D
# (uncomment one of the iso lines above, either the DVD or the CD one)

# Download the set of DVD or CD ISOs for the CentOS version you want
# There are fewer DVD ISOs, but you need to use bittorrent to download
mkdir -p /var/mrepo/iso 
cd /var/mrepo/iso
elinks http://isoredirect.centos.org/centos/5.5/isos/x86_64/

# Once your ISOs are available in /var/mrepo/iso, and the 'iso' line
# in /etc/mrepo.conf updated appropriately, run mrepo itself
mrepo -gvv
&lt;/pre&gt;

&lt;p&gt;3. Finally, finish setting up your tftp environment. mrepo should have copied
appropriate &lt;code&gt;pxelinux.0&lt;/code&gt;, &lt;code&gt;initrd.img&lt;/code&gt;, and &lt;code&gt;vmlinuz&lt;/code&gt; files into your 
&lt;code&gt;/tftpboot/centos5-x86_64&lt;/code&gt; directory, so all you need to supply is an 
appropriate grub boot config:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
cd /tftpboot/centos5-x86_64
ls
mkdir -p pxelinux.cfg

# Setup a default grub config (adjust the serial/console and repo params as needed)
cat &amp;gt; pxelinux.cfg/default
default linux
serial 0,9600n8
label linux
  root (nd)
  kernel vmlinuz
  append initrd=initrd.img console=ttyS0,9600 repo=http://192.168.1.1/mrepo/centos5-x86_64
^D
&lt;/pre&gt;

&lt;p&gt;Now get your server to do a PXE boot (via a boot option or the bios or whatever), 
and hopefully your broken server will find your dhcp/tftp environment and boot up 
in install mode, and away you go.&lt;/p&gt;

&lt;p&gt;If you have problems with the boot, try checking your &lt;code&gt;/var/log/messages&lt;/code&gt; file on the 
boot server for hints.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/remote_rebuild_centos_style/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/remote_rebuild_centos_style.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Dell OMSA</title>                                   
                        <link>http://www.openfusion.net/linux/dell_omsa.html</link>                                                                             
                        <description>&lt;p&gt;Following on from my &lt;a href="http://www.openfusion.net/linux/ipmi_on_centos"&gt;IPMI explorations&lt;/a&gt;, here's the next
chapter in my getting-down-and-dirty-with-dell-hardware-on-linux adventures.
This time I'm setting up Dell's 
&lt;a href="http://linux.dell.com/wiki/index.php/Repository/OMSA"&gt;OpenManage Server Administrator&lt;/a&gt;
software, primarily in order to explore being able to configure bios settings 
from within the OS. As before, I'm running CentOS 5, but OMSA supports any of 
RHEL4, RHEL5, SLES9, and SLES10, and various versions of Fedora Core and 
OpenSUSE.&lt;/p&gt;

&lt;p&gt;Here's what I did to get up and running:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Configure the Dell OMSA repository
wget -O bootstrap.sh http://linux.dell.com/repo/hardware/latest/bootstrap.cgi
# Review the script to make sure you trust it, and then run it
sh bootstrap.sh
# OR, for CentOS5/RHEL5 x86_64 you can just install the following:
rpm -Uvh http://linux.dell.com/repo/hardware/latest/platform_independent/rh50_64/prereq/\
dell-omsa-repository-2-5.noarch.rpm

# Install base version of OMSA, without gui (install srvadmin-all for more)
yum install srvadmin-base

# One of daemons requires /usr/bin/lockfile, so make sure you've got procmail installed
yum install procmail

# If you're running an x86_64 OS, there are a couple of additional 32-bit 
#   libraries you need that aren't dependencies in the RPMs
yum install compat-libstdc++-33-3.2.3-61.i386 pam.i386

# Start OMSA daemons
for i in instsvcdrv dataeng dsm_om_shrsvc; do service &amp;#036;i start; done

# Finally, you can update your path by doing logout/login, or just run:
. /etc/profile.d/srvadmin-path.sh
&lt;/pre&gt;

&lt;p&gt;Now to check whether you're actually functional you can try a few of the 
following (as root):&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
omconfig about
omreport about
omreport system -?
omreport chassis -?
&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;omreport&lt;/code&gt; is the OMSA CLI reporting/query tool, and &lt;code&gt;omconfig&lt;/code&gt; is the
equivalent update tool. The main documentation for the current version of
OMSA is &lt;a href="http://support.dell.com/support/edocs/software/svradmin/5.5/en/index.htm"&gt;here&lt;/a&gt;. 
I found the &lt;a href="http://support.dell.com/support/edocs/software/svradmin/5.5/en/CLI/pdf/OMSACLIUG.zip"&gt;CLI User's Guide&lt;/a&gt;
the most useful.&lt;/p&gt;

&lt;p&gt;Here's a sampler of interesting things to try:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Report system overview
omreport chassis 

# Report system summary info (OS, CPUs, memory, PCIe slots, DRAC cards, NICs)
omreport system summary

# Report bios settings
omreport chassis biossetup

# Fan info
omreport chassis fans

# Temperature info
omreport chassis temps

# CPU info
omreport chassis processors

# Memory and memory slot info
omreport chassis memory

# Power supply info
omreport chassis pwrsupplies

# Detailed PCIe slot info
omreport chassis slots

# DRAC card info
omreport chassis remoteaccess
&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;omconfig&lt;/code&gt; allows setting object attributes using a &lt;code&gt;key=value&lt;/code&gt; syntax, which 
can get reasonably complex. See the CLI User's Guide above for details, but 
here are some examples of messing with various bios settings:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# See available attributes and settings
omconfig chassis biossetup -?

# Turn the AC Power Recovery setting to On
omconfig chassis biossetup attribute=acpwrrecovery setting=on

# Change the serial communications setting (on with serial redirection via)
omconfig chassis biossetup attribute=serialcom setting=com1
omconfig chassis biossetup attribute=serialcom setting=com2

# Change the external serial connector
omconfig chassis biossetup attribute=extserial setting=com1
omconfig chassis biossetup attribute=extserial setting=rad

# Change the Console Redirect After Boot (crab) setting 
omconfig chassis biossetup attribute=crab setting=enabled
omconfig chassis biossetup attribute=crab setting=disabled

# Change NIC settings (turn on PXE on NIC1)
omconfig chassis biossetup attribute=nic1 setting=enabledwithpxe
&lt;/pre&gt;

&lt;p&gt;Finally, there are some interesting formatting options available to both 
omreport, for use in scripting e.g.&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Custom delimiter format (default semicolon)
omreport chassis -fmt cdv

# XML format
omreport chassis -fmt xml

# To change the default cdv delimiter
omconfig preferences cdvformat -?
omconfig preferences cdvformat delimiter=pipe
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/dell_omsa/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/dell_omsa.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>IPMI on CentOS/RHEL</title>                                   
                        <link>http://www.openfusion.net/linux/ipmi_on_centos.html</link>                                                                             
                        <description>&lt;p&gt;Spent a few days deep in the bowels of a couple of datacentres last week,
and realised I didn't know enough about Dell's DRAC base management 
controllers to use them properly. In particular, I didn't know how to 
mess with the drac settings from within the OS. So spent some of today
researching that. &lt;/p&gt;

&lt;p&gt;Turns out there are a couple of routes to do this. You can use the Dell
native tools (e.g. &lt;code&gt;racadm&lt;/code&gt;) included in Dell's 
&lt;a href="http://linux.dell.com/monitoring.shtml"&gt;OMSA product&lt;/a&gt;, or you can use
vendor-neutral &lt;a href="http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface"&gt;IPMI&lt;/a&gt;,
which is well-supported by Dell DRACs. I went with the latter as it's 
more cross-platform, and the tools come native with CentOS, instead of
having to setup Dell's OMSA repositories. The Dell-native tools may give
you more functionality, but for what I wanted to do IPMI seems to work 
just fine.&lt;/p&gt;

&lt;p&gt;So installation is just:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
yum install OpenIPMI OpenIPMI-tools
chkconfig ipmi on
service ipmi start
&lt;/pre&gt;

&lt;p&gt;and then from the local machine you can use &lt;code&gt;ipmitool&lt;/code&gt; to access and 
manipulate all kinds of useful stuff:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# IPMI commands
ipmitool help
man ipmitool

# To check firmware version
ipmitool mc info
# To reset the management controller
ipmitool mc reset [ warm | cold ]

# Show field-replaceable-unit details
ipmitool fru print

# Show sensor output
ipmitool sdr list
ipmitool sdr type list
ipmitool sdr type Temperature
ipmitool sdr type Fan
ipmitool sdr type 'Power Supply'

# Chassis commands
ipmitool chassis status
ipmitool chassis identify [&amp;lt;interval&amp;gt;]   # turn on front panel identify light (default 15s)
ipmitool [chassis] power soft            # initiate a soft-shutdown via acpi
ipmitool [chassis] power cycle           # issue a hard power off, wait 1s, power on
ipmitool [chassis] power off             # issue a hard power off
ipmitool [chassis] power on              # issue a hard power on
ipmitool [chassis] power reset           # issue a hard reset

# Modify boot device for next reboot
ipmitool chassis bootdev pxe
ipmitool chassis bootdev cdrom
ipmitool chassis bootdev bios

# Logging
ipmitool sel info
ipmitool sel list
ipmitool sel elist                       # extended list (see manpage)
ipmitool sel clear
&lt;/pre&gt;

&lt;p&gt;For remote access, you need to setup user and network settings, either at boot time
on the DRAC card itself, or from the OS via &lt;code&gt;ipmitool&lt;/code&gt;:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Display/reset password for default root user (userid '2')
ipmitool user list 1
ipmitool user set password 2 &amp;lt;new_password&amp;gt;

# Display/configure lan settings
ipmitool lan print 1
ipmitool lan set 1 ipsrc [ static | dhcp ]
ipmitool lan set 1 ipaddr 192.168.1.101
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 192.168.1.254
&lt;/pre&gt;

&lt;p&gt;Once this is configured you should be able to connect using the 'lan' interface
to ipmitool, like this:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
ipmitool -I lan -U root -H 192.168.1.101 chassis status
&lt;/pre&gt;

&lt;p&gt;which will prompt you for your ipmi root password, or you can do the following:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
echo &amp;lt;new_password&amp;gt; &amp;gt; ~/.racpasswd
chmod 600 ~/.racpasswd
&lt;/pre&gt;

&lt;p&gt;and then use that password file instead of manually entering it each time:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
ipmitool -I lan -U root -f ~/.racpasswd -H 192.168.1.101 chassis status
&lt;/pre&gt;

&lt;p&gt;I'm using an 'ipmi' alias that looks like this:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
alias ipmi='ipmitool -I lan -U root -f ~/.racpasswd -H'

# which then allows you to do the much shorter:
ipmi 192.168.1.101 chassis status
# OR
ipmi &amp;lt;hostname&amp;gt; chassis status
&lt;/pre&gt;

&lt;p&gt;Finally, if you configure serial console redirection in the bios as follows:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
Serial Communication -&amp;gt; Serial Communication:       On with Console Redirection via COM2
Serial Communication -&amp;gt; External Serial Connector:  COM2
Serial Communication -&amp;gt; Redirection After Boot:     Disabled
&lt;/pre&gt;

&lt;p&gt;then you can setup standard serial access in grub.conf and inittab on &lt;code&gt;com2/ttyS1&lt;/code&gt;
and get serial console access via IPMI serial-over-lan using the 'lanplus' interface:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
ipmitool -I lanplus -U root -f ~/.racpasswd -H 192.168.1.101 sol activate
&lt;/pre&gt;

&lt;p&gt;which I typically use via a shell function:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# ipmi serial-over-lan function
isol() {
   if [ -n "&amp;#036;1" ]; then
       ipmitool -I lanplus -U root -f ~/.racpasswd -H &amp;#036;1 sol activate
   else
       echo "usage: sol &amp;lt;sol_ip&amp;gt;"
   fi
}

# used like:
isol 192.168.1.101
isol &amp;lt;hostname&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Further reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.cuddletech.com/blog/archives/archive_2008-m06.php"&gt;http://www.cuddletech.com/blog/archives/archive_2008-m06.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://buttersideup.com/docs/howto/IPMI_on_Debian.html"&gt;http://buttersideup.com/docs/howto/IPMI_on_Debian.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.nikhef.nl/pub/projects/grid/gridwiki/index.php/Serial_Consoles"&gt;http://www.nikhef.nl/pub/projects/grid/gridwiki/index.php/Serial_Consoles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://openipmi.sourceforge.net/IPMI.pdf"&gt;http://openipmi.sourceforge.net/IPMI.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/ipmi_on_centos/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/ipmi_on_centos.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Mocking RPMs on CentOS</title>                                   
                        <link>http://www.openfusion.net/linux/mocking_rpms.html</link>                                                                             
                        <description>&lt;p&gt;&lt;a href="http://fedoraproject.org/wiki/Projects/Mock"&gt;Mock&lt;/a&gt; is a Fedora project that allows
you to build RPM packages within a chroot environment, allowing you to build
packages for other systems than the one you're running on (e.g. building CentOS 4
32-bit RPMs on a CentOS 5 64-bit host), and ensuring that all the required build
dependencies are specified correctly in the RPM spec file.&lt;/p&gt;

&lt;p&gt;It's also pretty under-documented, so these are my notes on things I've figured out
over the last week setting up a decent mock environment on CentOS 5.&lt;/p&gt;

&lt;p&gt;First, I'm using mock 1.0.2 from the EPEL repository, rather than older 0.6.13 
available from CentOS Extras. There are apparently backward-compatibility problems 
with versions of mock &gt; 0.6, but as I'm mostly building C5 packages I decided to go 
with the newer version. So installation is just:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Install mock and python-ctypes packages (the latter for better setarch support)
&amp;#036; sudo yum --enablerepo=epel install mock python-ctypes

# Add yourself to the 'mock' group that will have now been created
&amp;#036; sudo usermod -G mock gavin
&lt;/pre&gt;

&lt;p&gt;The mock package creates an &lt;code&gt;/etc/mock&lt;/code&gt; directory with configs for various OS 
versions (mostly Fedoras). The first thing you want to tweak there is the 
&lt;code&gt;site-defaults.cfg&lt;/code&gt; file which sets up various defaults for all your builds. Mine now 
looks like this:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# /etc/mock/site-defaults.cfg

# Set this to true if you've installed python-ctypes
config_opts['internal_setarch'] = True

# Turn off ccache since it was causing errors I haven't bothered debugging
config_opts['plugin_conf']['ccache_enable'] = False

# (Optional) Fake the build hostname to report
config_opts['use_host_resolv'] = False
config_opts['files']['etc/hosts'] = """
127.0.0.1 buildbox.openfusion.com.au nox.openfusion.com.au localhost
"""
config_opts['files']['etc/resolv.conf'] = """
nameserver 127.0.0.1
"""

# Setup various rpm macros to use 
config_opts['macros']['%packager'] = 'Gavin Carr &amp;lt;gavin@openfusion.com.au&amp;gt;'
config_opts['macros']['%debug_package'] = '%{nil}'
&lt;/pre&gt;

&lt;p&gt;You can use the &lt;code&gt;epel-5-{i386,x86_64}.cfg&lt;/code&gt; configs as-is if you like; I copied them 
to &lt;code&gt;centos-5-{i386,x86_64}.cfg&lt;/code&gt; versions and removed the epel 'extras', 'testing',
and 'local' repositories from the &lt;code&gt;yum.conf&lt;/code&gt; section, since I typically want to build 
using only 'core' and 'update' packages.&lt;/p&gt;

&lt;p&gt;You can then run a test by doing:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# e.g. initialise a centos-5-i386 chroot environment
&amp;#036; CONFIG=centos-5-i386
&amp;#036; mock -r &amp;#036;CONFIG --init
&lt;/pre&gt;

&lt;p&gt;which will setup an initial chroot environment using the given config. If that
seemed to work (you weren't inundated with error messages), you can try a build:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Rebuild the given source RPM within the chroot environment
# usage: mock -r &amp;lt;mock_config&amp;gt; --rebuild /path/to/SRPM e.g.
&amp;#036; mock -r &amp;#036;CONFIG --rebuild ~/rpmbuild/SRPMS/clix-0.3.4-1.of.src.rpm
&lt;/pre&gt;

&lt;p&gt;If the build succeeds, it drops your packages into the &lt;code&gt;/var/lib/mock/&amp;#036;CONFIG/result&lt;/code&gt;
directory:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
&amp;#036; ls -1 /var/lib/mock/&amp;#036;CONFIG/result
build.log
clix-0.3.4-1.of.noarch.rpm
clix-0.3.4-1.of.src.rpm
root.log
state.log
&lt;/pre&gt;

&lt;p&gt;If it fails, you can check mock output, the &lt;code&gt;*.log&lt;/code&gt; files above for more info, and/or 
rerun mock with the &lt;code&gt;-v&lt;/code&gt; flag for more verbose messaging.&lt;/p&gt;

&lt;p&gt;A couple of final notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the chroot environments are cached, but rebuilding them and checking for updates
can be pretty network intensive, so you might want to consider setting up a local
repository to pull from. &lt;a href="http://freshmeat.net/projects/mrepo"&gt;mrepo&lt;/a&gt; (available 
from rpmforge) is pretty good for that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;there don't seem to be any hooks in mock to allow you to sign packages you've
built, so if you do want signed packages you need to sign them afterwards via a
&lt;code&gt;rpm --resign &amp;#036;RPMS&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/mocking_rpms/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/mocking_rpms.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Backup Regimes with Brackup</title>                                   
                        <link>http://www.openfusion.net/net/monthly_brackups.html</link>                                                                             
                        <description>&lt;p&gt;After using &lt;a href="http://code.google.com/p/brackup/"&gt;brackup&lt;/a&gt; for a while you find
you have a big list of backups sitting on your server, and start to think 
about cleaning up some of the older ones. The standard brackup tool for this
is &lt;code&gt;brackup-target&lt;/code&gt;, and the &lt;code&gt;prune&lt;/code&gt; and &lt;code&gt;gc&lt;/code&gt; (garbage collection)
subcommands.&lt;/p&gt;

&lt;p&gt;Typical usage is something like this:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# List the backups for a particular target on the server e.g.
TARGET=myserver_images
brackup-target &amp;#036;TARGET list-backups
Backup File                      Backup Date                      Size (B)
-----------                      -----------                      --------
images-1262106544                Thu 31 Dec 2009 03:32:49          1263128
images-1260632447                Sun 13 Dec 2009 08:19:13          1168281
images-1250042378                Wed 25 Nov 2009 06:25:06           977464
images-1239323644                Mon 09 Nov 2009 00:30:34           846523
images-1239577352                Thu 29 Oct 2009 13:03:02           846523
...

# Decide how many backups you want to keep, and prune (delete) the rest
brackup-target --keep-backups 15 &amp;#036;TARGET prune

# Prune just removes the brackup files on the server, so now you need to
# run a garbage collect to delete any 'chunks' that are now orphaned
brackup-target --interactive &amp;#036;TARGET gc
&lt;/pre&gt;

&lt;p&gt;This simple scheme - "keep the last N backups" - works pretty nicely for 
backups you do relatively infrequently. If you do more frequent backups, 
however, you might find yourself wanting to be able to implement more 
sophisticated retention policies. Traditional backup regimes often involve 
policies like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep the last 2 weeks of daily backups&lt;/li&gt;
&lt;li&gt;keep the last 8 weekly backups&lt;/li&gt;
&lt;li&gt;keep monthly backups forever&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not necessarily obvious how to do something like this with brackup, but
it's actually pretty straightforward. The trick is to define multiple
'sources' in your brackup.conf, one for each backup 'level' you want to use.
For instance, to implement the regime above, you might define the following:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Daily backups
[SOURCE:images]
path = /data/images
...

# Weekly backups
[SOURCE:images-weekly]
path = /data/images
...

# Monthly backups
[SOURCE:images-monthly]
path = /data/images
...
&lt;/pre&gt;

&lt;p&gt;You'd then use the &lt;code&gt;images-monthly&lt;/code&gt; source once a month, the &lt;code&gt;images-weekly&lt;/code&gt;
source once a week, and the &lt;code&gt;images&lt;/code&gt; source the rest of the time. Your list
of backups would then look something like this:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
Backup File                      Backup Date                      Size (B)
-----------                      -----------                      --------
images-1234567899                Sat 05 Dec 2009 03:32:49          1263128
images-1234567898                Fri 04 Dec 2009 03:19:13          1168281
images-1234567897                Thu 03 Dec 2009 03:19:13          1168281
images-1234567896                Wed 02 Dec 2009 03:19:13          1168281
images-monthly-1234567895        Tue 01 Dec 2009 03:19:13          1168281
images-1234567894                Mon 30 Nov 2009 03:19:13          1168281
images-weekly-1234567893         Sun 29 Nov 2009 03:19:13          1168281
images-1234567892                Sat 28 Nov 2009 03:25:06           977464
...
&lt;/pre&gt;

&lt;p&gt;And when you &lt;code&gt;prune&lt;/code&gt;, you want to specify a --source argument, and specify 
separate --keep-backups settings for each level e.g. for the above:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Keep 2 weeks worth of daily backups
brackup-target --source images --keep-backups 12 &amp;#036;TARGET prune

# Keep 8 weeks worth of weekly backups
brackup-target --source images-weekly --keep-backups 8 &amp;#036;TARGET prune

# Keep all monthly backups, so we don't prune them at all

# And then garbage collect as normal
brackup-target --interactive &amp;#036;TARGET gc
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/net/monthly_brackups/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/net/monthly_brackups.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2010</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Anycast DNS</title>                                   
                        <link>http://www.openfusion.net/linux/anycast_dns.html</link>                                                                             
                        <description>&lt;p&gt;(Okay, brand new year - must be time to get back on the blogging wagon ...)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.linuxjournal.com/"&gt;Linux Journal&lt;/a&gt; recently had a really good article
by Philip Martin on &lt;a href="http://m.linuxjournal.com/article/10376"&gt;Anycast DNS&lt;/a&gt;. It's
well worth a read - I just want to point it out and record a cutdown version of 
how I've been setting it up recently.&lt;/p&gt;

&lt;p&gt;As the super-quick intro, anycast is the idea of providing a network service
at multiple points in a network, and then routing requests to the 'nearest'
service provider for any particular client. There's a one-to-many relationship
between an ip address and the hosts that are providing services on that address.&lt;/p&gt;

&lt;p&gt;In the LJ article above, this means you provide a service on a /32 host address,
and then use a(n) (interior) dynamic routing protocol to advertise that address
to your internal routers. If you're a non-cisco linux shop, that means using 
quagga/ospf.&lt;/p&gt;

&lt;p&gt;The classic anycast service is dns, since it's stateless and benefits from the
high availability and low latency benefits of a distributed anycast service.&lt;/p&gt;

&lt;p&gt;So here's my quick-and-dirty notes on setting up an anycast dns server on 
CentOS/RHEL using &lt;code&gt;dnsmasq&lt;/code&gt; for dns, and quagga &lt;code&gt;zebra/ospfd&lt;/code&gt; for the routing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;First, setup your anycast ip address (e.g. 192.168.255.1/32) on a random 
virtual loopback interface e.g. lo:0. On CentOS/RHEL, this means you want
to setup a &lt;code&gt;/etc/sysconfig/network-scripts/ifcfg-lo:0&lt;/code&gt; file containing:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
DEVICE=lo:0
IPADDR=192.168.255.1
NETMASK=255.255.255.255
ONBOOT=yes
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup your dns server to listen to (at least) your anycast dns interface.
With dnsmasq, I use an &lt;code&gt;/etc/dnsmasq.conf&lt;/code&gt; config like:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
interface=lo:0
domain=example.com
local=/example.com/
resolv.conf=/etc/resolv.conf.upstream
expand-hosts
domain-needed
bogus-priv 
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use quagga's &lt;code&gt;zebra/ospfd&lt;/code&gt; to advertise this host address to your internal
routers. I use a completely vanilla &lt;code&gt;zebra.conf&lt;/code&gt;, and an &lt;code&gt;/etc/quagga/ospfd.conf&lt;/code&gt; 
config like:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
hostname myhost
password mypassword
log syslog
!
router ospf
  ! Local segments (adjust for your network config and ospf areas)
  network 192.168.1.0/24 area 0
  ! Anycast address redistribution
  redistribute connected metric-type 1
  distribute-list ANYCAST out connected
!
access-list ANYCAST permit 192.168.255.1/32
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. Now (as root) start everything up:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
ifup lo:0
for s in dnsmasq zebra ospfd; do
  service &amp;#036;s start
  chkconfig &amp;#036;s on
done
tail -50f /var/log/messages
&lt;/pre&gt;

&lt;p&gt;And then check on your router that the anycast dns address is getting advertised 
and picked up by your router. If you're using cisco, you're probably know how to
do that; if you're using linux and quagga, the useful &lt;code&gt;vtysh&lt;/code&gt; commands are:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
show ip ospf interface &amp;lt;interface&amp;gt;
show ip ospf neighbor 
show ip ospf database
show ip ospf route
show ip route
&lt;/pre&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/anycast_dns/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/anycast_dns.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2009</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Yum Download SRPMs</title>                                   
                        <link>http://www.openfusion.net/linux/yum_download_srpms.html</link>                                                                             
                        <description>&lt;p&gt;Found a nice post today on 
&lt;a href="http://www.imminentweb.com/technologies/yum-download-source-rpm"&gt;how to use yum to download source RPMs&lt;/a&gt;,
rather than having to do a manual search on the relevant mirror.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/yum_download_srpms/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/yum_download_srpms.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2009</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Skype 2.1 on CentOS 5</title>                                   
                        <link>http://www.openfusion.net/linux/skype_2.1_on_centos5.html</link>                                                                             
                        <description>&lt;p&gt;The new &lt;a href="http://www.skype.com/go/getskype-linux-beta-static"&gt;skype 2.1 beta&lt;/a&gt; 
(woohoo - Linux users are now only 2.0 versions behind Windows, way to go Skype!) 
doesn't come with a CentOS rpm, unlike earlier versions. And the Fedora packages 
that are available are for FC9 and FC10, which are too recent to work on a stock 
RHEL/CentOS 5 system.&lt;/p&gt;

&lt;p&gt;So here's how I got skype working nicely on CentOS 5.3, using the static binary 
tarball.&lt;/p&gt;

&lt;p&gt;Note that while it appears skype has finally been ported to 64-bit architectures, the
only current 64-bit builds are for Ubuntu 8.10+, so installing on a 64-bit CentOS 
box requires 32-bit libraries to be installed (sigh). Otherwise you get the error:
&lt;code&gt;skype: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory&lt;/code&gt;.&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# the available generic skype binaries are 32-bit, so if you're running a 64-bit 
# system you need to make sure you have various 32-bit libraries installed
yum install glib2.i386 qt4.i386 zlib.i386 alsa-lib.i386 libX11.i386 \
  libXv.i386 libXScrnSaver.i386 

# installing to /opt (tweak to taste)
cd /tmp
wget http://www.skype.com/go/getskype-linux-beta-static
cd /opt
tar jxvf /tmp/skype_static-2.1.0.47.tar.bz2
ln -s skype_static-2.1.0.47 skype

# Setup some symlinks (the first is required for sounds to work, the second is optional)
ln -s /opt/skype /usr/share/skype
ln -s /opt/skype/skype /usr/bin/skype
&lt;/pre&gt;

&lt;p&gt;You don't seem to need &lt;code&gt;pulseaudio&lt;/code&gt; installed (at least with the static binary - I assume it's
linked in statically already).&lt;/p&gt;

&lt;p&gt;Tangentially, if you have any video problems with your webcam, you might want to check out 
the updated video drivers available in the 
&lt;a href="http://elrepo.org/tiki/kmod-video4linux"&gt;kmod-video4linux package&lt;/a&gt; from the shiny new 
&lt;a href="http://elrepo.org/"&gt;ELRepo.org&lt;/a&gt;. I'm using their updated &lt;code&gt;uvcvideo&lt;/code&gt; module with a Logitech 
QuickCam Pro 9000 and Genius Slim 1322AF, and both are working well.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/skype_2.1_on_centos5/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/skype_2.1_on_centos5.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2009</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>pvmove Disk Migrations</title>                                   
                        <link>http://www.openfusion.net/linux/pvmove_disk_migrations.html</link>                                                                             
                        <description>&lt;p&gt;Lots of people make use of linux's &lt;code&gt;lvm&lt;/code&gt; (Logical Volume Manager) for 
providing services such as disk volume resizing and snapshotting under linux.
But few people seem to know about the little &lt;code&gt;pvmove&lt;/code&gt; utility, which offers a
very powerful facility for migrating data between disk volumes on the fly.&lt;/p&gt;

&lt;p&gt;Let's say, for example, that you have a disk volume you need to rebuild for 
some reason. Perhaps you want to change the raid type you're using on it; 
perhaps you want to rebuild it using larger disks. Whatever the reason, you
need to migrate all your data to another temporary disk volume so you can
rebuild your initial one. &lt;/p&gt;

&lt;p&gt;The standard way of doing this is probably to just create a new filesystem on 
your new disk volume, and then copy or &lt;code&gt;rsync&lt;/code&gt; all the data across. But how 
do you verify that you have all the data at the end of the copy, and that 
nothing has changed on your original disk after the copy started? If you did
a second rsync and nothing new was copied across, &lt;em&gt;and&lt;/em&gt; the disk usage totals
exactly match, &lt;em&gt;and&lt;/em&gt; you remember to unmount the original disk immediately,
you might have an exact copy. But if your original disk data is changing at 
all, getting a good copy of a large disk volume can actually be pretty tricky.&lt;/p&gt;

&lt;p&gt;The elegant &lt;code&gt;lvm/pvmove&lt;/code&gt; solution to this problem is this: instead of doing
a userspace migration between disk volumes, you add your new volume into the
existing volume group, and then tell lvm to move all the physical extents 
off of your old physical volume, and the migration is magically handled by 
lvm, without even needing to unmount the logical volume!&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
# Volume group 'extra' exists on physical volume /dev/sdc1
&amp;#036; lvs
  LV   VG     Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  data extra  -wi-ao 100.00G

# Add new physical volume /dev/sdd1 into volume group
&amp;#036; vgextend extra /dev/sdd1
  Volume group "extra" successfully extended
&amp;#036; lvs
  LV   VG     Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  data extra  -wi-ao 200.00G

# Use pvmove to move physical extents off of old /dev/sdc1 (verbose mode)
&amp;#036; pvmove -v /dev/sdc1
# Lots of output in verbose mode ...

# Done - remove old physical volume
&amp;#036; pvremove /dev/sdc1
&amp;#036; lvs
  LV   VG     Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  data extra  -wi-ao 100.00G
&lt;/pre&gt;

&lt;p&gt;The joys of linux.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/linux/pvmove_disk_migrations/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/linux/pvmove_disk_migrations.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2009</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Currency On-Screen Display</title>                                   
                        <link>http://www.openfusion.net/perl/currency_osd.html</link>                                                                             
                        <description>&lt;p&gt;Here's a quick hack demonstrating a nice juxtaposition between the 
power of a CPAN module - in this case Christopher Laco's 
&lt;a href="http://search.cpan.org/~claco/Finance-Currency-Convert-WebserviceX-0.07001/lib/Finance/Currency/Convert/WebserviceX.pm"&gt;Finance::Currency::Convert::WebserviceX&lt;/a&gt;
- and the elegance and utility of the little known &lt;code&gt;osd_cat&lt;/code&gt;, putting 
together a desktop currency rates widget in a handful of lines:&lt;/p&gt;

&lt;pre class="sh_perl"&gt;
#!/usr/bin/perl

use strict;
use IO::File;
use Finance::Currency::Convert::WebserviceX;

# Configuration
my @currencies = map { uc } @ARGV || qw(USD GBP);
my &amp;#036;base_currency = 'AUD';
my &amp;#036;refresh = 300;   # seconds
my &amp;#036;font = '9x15bold';
# X colours: http://sedition.com/perl/rgb.html
my &amp;#036;colour = 'goldenrod3';
my &amp;#036;align = 'right';
my &amp;#036;pos = 'top';
my &amp;#036;offset = 25;

my &amp;#036;lines = scalar @currencies;
my &amp;#036;osd_refresh = &amp;#036;refresh + 1;
my &amp;#036;osd = IO::File-&amp;gt;new(
  "|osd_cat -l &amp;#036;lines -d &amp;#036;osd_refresh -c '&amp;#036;colour' -f &amp;#036;font -p &amp;#036;pos -A &amp;#036;align -o &amp;#036;offset"
) or die "can't open to osd_cat &amp;#036;!";
&amp;#036;osd-&amp;gt;autoflush(1);
local &amp;#036;SIG{PIPE} = sub { die "pipe failed: &amp;#036;!" };

my &amp;#036;cc = Finance::Currency::Convert::WebserviceX-&amp;gt;new;

while (1) {
  my &amp;#036;output = '';
  &amp;#036;output .= "&amp;#036;_ " . &amp;#036;cc-&amp;gt;convert(1, &amp;#036;base_currency, &amp;#036;_) . "\n" for @currencies;
  &amp;#036;osd-&amp;gt;print(&amp;#036;output);
  sleep &amp;#036;refresh;
}
&lt;/pre&gt;

&lt;p&gt;Most of this is just housekeeping around splitting out various &lt;code&gt;osd_cat&lt;/code&gt; 
options for tweaking, and allowing the set of currencies to display
to be passed in as arguments. I haven't bothered setting up any option 
handling in order to keep the example short, but that would be
straightforward.&lt;/p&gt;

&lt;p&gt;To use, you just run from the command line in the background:&lt;/p&gt;

&lt;pre class="sh_sh"&gt;
./currency_osd &amp;amp;
&lt;/pre&gt;

&lt;p&gt;and it shows up in the top right corner of your screen, like so:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.openfusion.net/images/currency_osd.png"&gt;&lt;img src="/images/currency_osd_small.png" alt="alt
text" width="640" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tweak to taste, of course.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/perl/currency_osd/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/perl/currency_osd.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 <title>Gavin Carr's Hackery</title>
                <link>http://www.openfusion.net</link>
                <description>World disintermediation, one hack at a time</description>
                <dc:date></dc:date>
                <dc:language>en-us</dc:language>
                <dc:creator>mailto:</dc:creator>
                <dc:rights>Copyright 2009</dc:rights>
                <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.1.2+dev" />
                <admin:errorReportsTo rdf:resource="mailto:" />
                <sy:updatePeriod>hourly</sy:updatePeriod>
                <sy:updateFrequency>1</sy:updateFrequency>
                <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
                <item>                                                          
                        <title>Delicious CSS Bookmarklet</title>                                   
                        <link>http://www.openfusion.net/web/delicious_css_bookmarklet.html</link>                                                                             
                        <description>&lt;p&gt;Further to my &lt;a href="http://www.openfusion.net/web/delicious_css"&gt;Delicious CSS&lt;/a&gt; post, here's a javascript
bookmarklet to make adding delicious css tags that much easier:&lt;/p&gt;

&lt;p&gt;&lt;a href="javascript:(function(){f='http://delicious.com/save?url='+encodeURIComponent(window.location.host)+'&amp;amp;title='+encodeURIComponent(window.location.host)+'&amp;amp;tags=delicious_css%2520delicious_css%253d'+encodeURIComponent(window.location.host)+'&amp;amp;v=5&amp;amp;';a=function(){if(!window.open(f+'noui=1&amp;amp;jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()"&gt;Delicious CSS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just drag it to your bookmarks toolbar somewhere, and click to use.&lt;/p&gt;

&lt;p&gt;Unfortunately, the latest version of the delicious tag form doesn't accept
tag arguments in the URL, which is what we need to preset the &lt;code&gt;delicious_css&lt;/code&gt;
tags we need. To workaround this, you need to also install the 
&lt;a href="http://userscripts.org/scripts/show/37076"&gt;Auto-Fill Delicious Tag Field&lt;/a&gt;
greasemonkey script.&lt;/p&gt;




</description>                                                         
                        <comments>http://www.openfusion.net/web/delicious_css_bookmarklet/</comments>                                                                     
                        <guid isPermaLink="true">http://www.openfusion.net/web/delicious_css_bookmarklet.html</guid>                                                          
                        <dc:date></dc:date>        
                        </item>                                                                 </channel>                                                      
        </rss>                                                                  
