<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Brandon Checketts</title> <link>http://www.brandonchecketts.com</link> <description>Web Programming, Linux System Administation, and other geeky stuff</description> <lastBuildDate>Wed, 10 Mar 2010 13:48:35 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BrandonChecketts" /><feedburner:info uri="brandonchecketts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Installing the Pandora One client on 64-bit Ubuntu 9.10</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/swCwqFeTwOg/installing-the-pandora-one-client-on-64-bit-ubuntu-910</link> <comments>http://www.brandonchecketts.com/archives/installing-the-pandora-one-client-on-64-bit-ubuntu-910#comments</comments> <pubDate>Tue, 26 Jan 2010 16:51:41 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category> <category><![CDATA[Linux Desktop]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=436</guid> <description><![CDATA[I was surprised and happy to see that the Pandora One client should work on Linux.  It uses the Adobe Air framework which means that Pandora doesn&#8217;t have to write a specific Linux variant.
However, installing it on a modern 64-Bit Ubuntu 9.10 install took just a bit of manipulation to get it [...]]]></description> <content:encoded><![CDATA[<p>I was surprised and happy to see that the <a
href="http://www.pandora.com/desktop_app">Pandora One client</a> <strong>should</strong> work on Linux.  It uses the Adobe Air framework which means that Pandora doesn&#8217;t have to write a specific Linux variant.</p><p>However, installing it on a modern 64-Bit Ubuntu 9.10 install took just a bit of manipulation to get it to work.  Pandora provides some basic instructions for Linux users <a
href="http://blog.pandora.com/faq/#1662">here</a>, even though Linux is officially unsupported.  Those instructions, along with the Adobe AIR notes <a
href="http://kb2.adobe.com/cps/408/kb408084.html">here</a> provided enough information for me to get it installed and working.</p><p>Here&#8217;s what I did:</p><ul><li>Start out <a
href="http://www.pandora.com/desktop_app">at the Pandora One site</a></li><li>Click on the &quot;Download Pandora Desktop&quot; link and save that file to /tmp</li><li>Follow the link to Install Adobe Air and save that file to /tmp also</li><li>Open a shell, and chmod the Adobe Air installer to 755 and then run it.</li><li>Go through the Adobe AIR install until it completes</li><li>Once Adobe AIR is installed, you will need to put some 32-bit libraries in place to make it run correctly. Some of the steps on <a
href="http://kb2.adobe.com/cps/408/kb408084.html">Adobe&#8217;s site</a> work, and some don&#8217;t, so this is what I did</li><li>Download the two .deb files for <a
href="http://mirrors.kernel.org/ubuntu/pool/main/n/nss/libnss3-1d_3.12.0%7Ebeta3-0ubuntu1_i386.deb">libnss3</a> and <a
href="http://mirrors.kernel.org/ubuntu/pool/main/n/nspr/libnspr4-0d_4.7.1%7Ebeta2-0ubuntu1_i386.deb">Libnspr4</a> to /tmp</li><li>From your shell, run:<pre>
 sudo file-roller ./libnss3-1d_3.12.0~beta3-0ubuntu1_i386.deb
</pre></li><li>Navigate to data.tar.gz =&gt; /usr =&gt; lib.  Click on all of the files in that directory and click Extract.  Type in /usr/lib32/ so that they extract there, then close all of the file-roller windows.</li><li>Do the same thing with the libnspr4 .deb file that you downloaded</li><li>Copy the adobe cert store into place with this command:<pre>
 sudo cp /usr/lib/libadobecertstore.so /usr/lib32
</pre></li><li>Now you can finally install the Pandora application by running:<pre>
sudo Adobe\ AIR\ Application\ Installer /tmp/pandora_2_0_2.air
</pre><p> That should install the application correctly.  It will add an icon to Applications / Accessories.</li><li>Upon starting up the Pandora One client, it currently complains about connecting to an untrusted server for me.  I have to click to accept for this session each time</li></ul><p>Now you should be able to play your Pandora music from your 64-bit Ubuntu 9.10 box.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/swCwqFeTwOg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/installing-the-pandora-one-client-on-64-bit-ubuntu-910/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/installing-the-pandora-one-client-on-64-bit-ubuntu-910</feedburner:origLink></item> <item><title>Speed up a Linux Software Raid Rebuild</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/iQ7p8a9L4qs/speed-up-a-linux-software-raid-rebuild</link> <comments>http://www.brandonchecketts.com/archives/speed-up-a-linux-software-raid-rebuild#comments</comments> <pubDate>Mon, 25 Jan 2010 21:08:16 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[Data Recovery]]></category> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=432</guid> <description><![CDATA[I&#8217;m setting up software raid on a running server and it is taking forever for the initial sync of the raid drives on the 1TB hard disks.  It has been running for about 6 hours and says that it will take about 5 days (7400 minutes) as this pace:[root@host ~]# cat /proc/mdstat
md1 : active [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m <a
href="http://www.brandonchecketts.com/archives/setting-up-software-raid-on-a-running-centos-5-server">setting up software raid on a running server</a> and it is taking forever for the initial sync of the raid drives on the 1TB hard disks.  It has been running for about 6 hours and says that it will take about 5 days (7400 minutes) as this pace:</p><pre>
[root@host ~]# cat /proc/mdstat
md1 : active raid1 sdb3[1] sda3[2]
      974559040 blocks [2/1] [_U]
      [>....................]  recovery =  3.9% (38109184/974559040) finish=7399.1min speed=2108K/sec
</pre><p>I did some read and write tests directly to the drives using dd to make sure that they were working okay, and they can operate at about 100 MB/s</p><pre>
[root@host ~]# dd if=/dev/zero of=/dev/sda2 bs=1024 count=1024000
    1048576000 bytes (1.0 GB) copied, 10.8882 seconds, 96.3 MB/s
[root@host ~]# dd if=/dev/zero of=/dev/sdb2 bs=1024 count=1024000
    1048576000 bytes (1.0 GB) copied, 11.1162 seconds, 94.3 MB/s
[root@host ~]# dd if=/dev/sda2 of=/dev/null bs=1024 count=1024000
    1048576000 bytes (1.0 GB) copied, 10.2829 seconds, 102 MB/s
[root@host ~]# dd if=/dev/sdb2 of=/dev/null bs=1024 count=1024000
    1048576000 bytes (1.0 GB) copied, 10.5109 seconds, 99.8 MB/s
</pre><p>What I failed to realize is that there is a configurable limit for the min and max speed of the rebuild.  Those parameters are configured in /proc/sys/dev/raid/speed_limit_min and /proc/sys/dev/raid/speed_limit_max.   They default to a pretty slow 1MB/s minimum which was causing it to take forever.</p><p>Increasing the maximum limit didn&#8217;t automatically make it faster either.  I had to increase the minimum limit to get it to jump up to a respectable speed.</p><p>[root@host ~]# echo 100000 > /proc/sys/dev/raid/speed_limit_min</p><pre>
[root@host ~]# watch cat /proc/mdstat
Every 2.0s: cat /proc/mdstat
md1 : active raid1 sdb3[1] sda3[2]
      974559040 blocks [2/1] [_U]
      [=>...................]  recovery =  7.7% (75695808/974559040) finish=170.5min speed=87854K/sec
</pre><p>Now it is up around 87 MB/s and will take just a few hours to complete the rest of the drive.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/iQ7p8a9L4qs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/speed-up-a-linux-software-raid-rebuild/feed</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/speed-up-a-linux-software-raid-rebuild</feedburner:origLink></item> <item><title>PHP Wrapper Class for a Read-only database</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/r_9_wHc1Aws/php-wrapper-class-for-a-read-only-database</link> <comments>http://www.brandonchecketts.com/archives/php-wrapper-class-for-a-read-only-database#comments</comments> <pubDate>Tue, 05 Jan 2010 04:11:58 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=421</guid> <description><![CDATA[This is a pretty special case of a database wrapper class where I wanted to discard any updates to the database, but want SELECT queries to run against an alternative read-only database.  In this instance, I have a planned outage of a primary database server, but would like the public-facing websites and web services [...]]]></description> <content:encoded><![CDATA[<p>This is a pretty special case of a database wrapper class where I wanted to discard any updates to the database, but want SELECT queries to run against an alternative read-only database.  In this instance, I have a planned outage of a primary database server, but would like the public-facing websites and web services to remain as accessible as possible.</p><p>I wrote this quick database wrapper class that will pass all SELECT queries on to a local replica of the database, and silently discard any updates.   On this site almost all of the functionality still works, but it obviously isn&#8217;t saving and new information while the primary database is unavailable.</p><p>Here is my class.  This is intended as a wrapper to an ADOdb class, but it is generic enough that I think it would work for many other database abstraction functions as well.</p><pre>
class db_unavailable {
    var $readonly_db;

    function __construct($readonly_db)
    {
        $this->query_db = $readonly_db;
    }

    function query($sql)
    {
        $args = func_get_args();
        if (preg_match("#(INSERT INTO|REPLACE INTO|UPDATE|DELETE)#i", $args[0])) {
            // echo "Unable to do insert/replace/update/delete query: $sql\n";
            return true;
        } else {
            return call_user_func_array(array($this->readonly_db, 'query'), $args);
        }
    }

    function __call($function, $args)
    {
        return call_user_func_array(array($this->readonly_db, $function), $args);
    }
}
</pre><p>I simply create my $query_db object that points to the read-only database.  Then create my main $db object as a new db_unavailable() object.  Any select queries against $db will behave as they normally do, and data-modifying queries will be silently discarded.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/r_9_wHc1Aws" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/php-wrapper-class-for-a-read-only-database/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/php-wrapper-class-for-a-read-only-database</feedburner:origLink></item> <item><title>LUG Presentation on SQL Basics</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/iPSHOaAxcHs/lug-presentation-on-sql-basics</link> <comments>http://www.brandonchecketts.com/archives/lug-presentation-on-sql-basics#comments</comments> <pubDate>Fri, 18 Dec 2009 03:52:59 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[LUG]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=416</guid> <description><![CDATA[I gave a presentation tonight at my local Linux Users Group meeting on SQL Basics.   I had a fun time preparing the presentation and made up a bunch of examples having to do with Santa&#8217;s database.
It started out with a simple table for kids who were either naughty or nice.  [...]]]></description> <content:encoded><![CDATA[<p>I gave a presentation tonight at my local <a
href="http://www.uga.edu/chugalug/">Linux Users Group</a> meeting on SQL Basics.   I had a fun time preparing the presentation and made up a bunch of examples having to do with Santa&#8217;s database.</p><p>It started out with a simple table for kids who were either naughty or nice.  We then added some reports to that.   Then imported kids&#8217; wish lists from CSV files.  From there we were able to generate some manufacturing reports for the workshop.</p><p>When we joined the wish list table with the kids table, we were then able to generate a sleigh-loading report which included only gifts for kids who had been good.   Then we got even more complicated and introduced several joins with some complicated mathematics to select gifts for kids within a certain radius from a given zip code.</p><p>The presentation is <a
href="/downloads/CHUGALUG Chrsitmas SQL.ppt">available for download here</a>.  And Brian recorded part of the presentation which is available to view <a
href="http://www.ustream.tv/recorded/3205751">on uStream.tv</a> or here. (We&#8217;re still experimenting with getting the video recording set up correctly)</p><p><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="386" id="utv528934" name="utv_n_851113"><param
name="flashvars" value="loc=%2F&amp;autoplay=false&amp;vid=3205751" /><param
name="allowfullscreen" value="true" /><param
name="allowscriptaccess" value="always" /><param
name="src" value="http://www.ustream.tv/flash/video/3205751" /><embed
flashvars="loc=%2F&amp;autoplay=false&amp;vid=3205751" width="480" height="386" allowfullscreen="true" allowscriptaccess="always" id="utv528934" name="utv_n_851113" src="http://www.ustream.tv/flash/video/3205751" type="application/x-shockwave-flash" /></object></p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/iPSHOaAxcHs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/lug-presentation-on-sql-basics/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/lug-presentation-on-sql-basics</feedburner:origLink></item> <item><title>Booting from a Software Raid device on Ubunto Karmic (9.10)</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/yKDVT-GewAI/booting-from-a-software-raid-device-on-ubunto-karmic-910</link> <comments>http://www.brandonchecketts.com/archives/booting-from-a-software-raid-device-on-ubunto-karmic-910#comments</comments> <pubDate>Mon, 26 Oct 2009 19:00:41 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=411</guid> <description><![CDATA[Its a few days away from Karmic&#8217;s official release, and I&#8217;m putting together a new computer and thought I would give the new version a try.  I set everything up with Software raid, and it is still annoying to me that to do so on Ubuntu still requires the Alternate CD and a text-based [...]]]></description> <content:encoded><![CDATA[<p>Its a few days away from Karmic&#8217;s official release, and I&#8217;m putting together a new computer and thought I would give the new version a try.  I set everything up with Software raid, and it is still annoying to me that to do so on Ubuntu still requires the Alternate CD and a text-based install.</p><p>I configured the /boot partition to use a RAID1 array, as I normally do.  After getting most of the way through the install, I got a big red screen with the following error:</p><pre>
====================================
Unable to install GRUB in /dev/md0
Executing 'grub-install /dev/md0 failed'
This is a fatal error
====================================
</pre><p>I tried several variations on continuing, but nothing seemed to work.   Turns out that a <a
href="http://www.ubuntu.com/testing/karmic/beta?info=EXLINK">known issue</a> with Karmic is that this doesn&#8217;t work.  Actually the known issue says that grub is only installed to the first drive, but that was not my experience.</p><p><a
href="https://bugs.launchpad.net/bugs/427048">Bug 420748</a> gives some detail on the issue, and it seems that the change to Grub2 might have something to do with it.  From the red screen, I chose to proceed without installing a boot loader.  I Rebooted to Alternate CD, and chose to repair a broken installation. Once to a shell, I ran these commands to install grub to the master boot records on both drives</p><pre>
grub-install /dev/sda
grub-install /dev/sdb
</pre><p>I removed the CD and rebooted. It ended up at a grub shell. At which point I ran the following to boot into the system (note the difference in grub2 commands)</p><pre>
set root=(hd0,1)
linux /vmlinuz-2.6.31-14-generic ro root=/dev/md1 (use tab-completion on the kernel image filename)
initrd /initrd.img-2.6.31-14-generic (again, use tab-completion)
boot
</pre><p>At that point, it started up normally. Once logged in, I started a terminal and then ran this command as root to create a minimal grub.cfg file (note that it is no longer called menu.lst)</p><pre>
grub-mkconfig > /boot/grub/grub.cfg
</pre><p>I&#8217;m now able to reboot into a working system.  So much for a flawless install experience.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/yKDVT-GewAI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/booting-from-a-software-raid-device-on-ubunto-karmic-910/feed</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/booting-from-a-software-raid-device-on-ubunto-karmic-910</feedburner:origLink></item> <item><title>Setting Up Virtualmin on an OpenVZ Guest</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/mN1WQ2EthX4/setting-up-virtualmin-on-an-openvz-guest</link> <comments>http://www.brandonchecketts.com/archives/setting-up-virtualmin-on-an-openvz-guest#comments</comments> <pubDate>Mon, 07 Sep 2009 17:42:04 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Add new tag]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=399</guid> <description><![CDATA[I&#8217;m experimenting with a hosting control panel and am interested in Virtualmin.   I generally avoid web-based control panels, because they generally make direct configuration via the command line and manually editing config files very difficult.  However one of Virtualmin&#8217;s goals is to not interfere with such manual configurations.   I&#8217;ve had [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m experimenting with a hosting control panel and am interested in <a
href="http://www.virtualmin.com/">Virtualmin</a>.   I generally avoid web-based control panels, because they generally make direct configuration via the command line and manually editing config files very difficult.  However one of Virtualmin&#8217;s goals is to not interfere with such manual configurations.   I&#8217;ve had plenty of clients who use Webmin, and they seem to do a good job, so Virtualmin seems like a good choice.</p><p>These are the steps that I went through to get a new OpenVZ guest set up with the GPL version of Virtualmin.</p><p>Download a CentOS 5 OS template and create the guest</p><pre>
# wget http://download.openvz.org/template/precreated/centos-5-x86_64.tar.gz
# vzctl create &lt;VEID&gt; --ostemplate centos-5-x86_64
</pre><p>I replaced all of these limits in /etc/vz/&lt;VEID&gt;.conf.  This is based off of a different running machine with some fairly generous limits.   Most importantly, it includes 1GB of RAM.</p><pre>
# UBC parameters (in form of barrier:limit)
KMEMSIZE="43118100:44370492"
LOCKEDPAGES="256:256"
PRIVVMPAGES="262144:262144"
SHMPAGES="21504:21504"
NUMPROC="2000:2000"
PHYSPAGES="0:9223372036854775807"
VMGUARPAGES="65536:65536"
OOMGUARPAGES="26112:9223372036854775807"
NUMTCPSOCK="360:360"
NUMFLOCK="380:420"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="10321920:16220160"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="4504320:16777216"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="5000:5000"
DCACHESIZE="3409920:3624960"
NUMFILE="18624:18624"
AVNUMPROC="180:180"
NUMIPTENT="128:128"
</pre><p>Then set up some host-specific parameters and start it up.</p><pre>
# vzctl set &lt;VEID&gt; --ipadd 10.0.0.1 --hostname yourhostname.com --nameserver 4.2.2.1 --diskspace 4G --save
# vzctl start &lt;VEID&gt;
# vzctl enter &lt;VEID&gt;
</pre><p>You are now logged in to the guest, where you can download and install virtualmin</p><pre>
# yum update
# cd /root
# wget http://software.virtualmin.com/gpl/scripts/install.sh
# sh install.sh
 Continue? (y/n) y
</pre><p>That should install without significant errors.  Finally, set a password for root, and then log in to Virtualmin to go through the post-installation configuration</p><pre>
passwd root
</pre><p>Login at https://&lt;your-ip&gt;:10000/  and go through the post-installation configuration</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/mN1WQ2EthX4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/setting-up-virtualmin-on-an-openvz-guest/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/setting-up-virtualmin-on-an-openvz-guest</feedburner:origLink></item> <item><title>No-Referer Plugin for Firefox 3.7</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/9MeU7VPLTIk/no-referer-plugin-for-firefox-37</link> <comments>http://www.brandonchecketts.com/archives/no-referer-plugin-for-firefox-37#comments</comments> <pubDate>Fri, 28 Aug 2009 12:37:17 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=397</guid> <description><![CDATA[Not allowing Firefox to install plugins from previous versions is kindof annoying.   Especially when the developer doesn&#8217;t maintain something.   The No-Referer plugin is very simple and handy, but hasn&#8217;t been updated to allow it to be installed in Firefox 3.5 or above.
In many cases, all that needs to be done is [...]]]></description> <content:encoded><![CDATA[<p>Not allowing Firefox to install plugins from previous versions is kindof annoying.   Especially when the developer doesn&#8217;t maintain something.   The <a
href="https://addons.mozilla.org/en-US/firefox/addon/1999">No-Referer plugin</a> is very simple and handy, but hasn&#8217;t been updated to allow it to be installed in Firefox 3.5 or above.</p><p>In many cases, all that needs to be done is a version number needs to be incremented in the install.rdf file.   I&#8217;ve posed a new version of this that works for FireFox 3.7 <a
href="http://www.brandonchecketts.com/downloads/no-referer-1.3.1-ff37.xpi">here</a></p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/9MeU7VPLTIk" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/no-referer-plugin-for-firefox-37/feed</wfw:commentRss> <slash:comments>4</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/no-referer-plugin-for-firefox-37</feedburner:origLink></item> <item><title>Converting Tables to InnoDB Takes Forever</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/0AGaSOwoK2k/converting-tables-to-innodb-takes-forever</link> <comments>http://www.brandonchecketts.com/archives/converting-tables-to-innodb-takes-forever#comments</comments> <pubDate>Tue, 25 Aug 2009 17:36:57 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=391</guid> <description><![CDATA[I have been familiar with some of the benefits of the InnoDB storage engine for a long time.  Of particular interest to me has been row-level locking which should significantly reduce some locking problems that I have on a big table during peak times.
I have made various attempts over the past six months or [...]]]></description> <content:encoded><![CDATA[<p>I have been familiar with some of the benefits of the InnoDB storage engine for a long time.  Of particular interest to me has been row-level locking which should significantly reduce some locking problems that I have on a big table during peak times.</p><p>I have made various attempts over the past six months or so to convert this table to InnoDB, but each attempt has always taken a tremendously long time and I have always ended up canceling the query before it completes, because it doesn&#8217;t seem to be making any progress.</p><p>I finally have had a reason and opportunity to dig into this more and have spent the last day or two learning and experimenting with InnoDB.  Of particular use was this set of slides from a <a
href="http://www.scribd.com/doc/2085411/MySQL-UC-2007-Innodb-Performance-Optimization">2007 presentation on InnoDB performance</a>.  It had some very good information about understanding how InnoDB works.</p><p>Slide 9 of the presentation includes this extremely helpful bit:</p><blockquote><p> PRIMARY KEY in random order are costly and lead to table fragmentation (primary key inserts should normally be in an ascending order)<br
/> Load data in primary_key order if you can</p></blockquote><p>In the data that I have been attempting to convert from MyISAM, my primary keys are inserted in whatever order that that the data has occurred.  When converting that to InnoDB, it would basically run a bunch of insert statements using my unordered data.   Each insert would require the storage engine to move a bunch of data in the InnoDB table around to keep the primary keys in order.</p><p>In my case, I was converting a MyISAM table containing about 1.9 million rows and occupying 600 MB of disk space.   That took over 8 hours using the unordered data.   After ordering the data and retrying, it then took about 10 minutes.</p><p>Also, I learned the usefulness of the &#8216;SHOW TABLE STATUS&#8217; command.  It is semi-useful in seeing the progress of the import.  It is a bit strange to me it shows the number of rows in the table changing by 10% every second, but it is better than nothing:</p><pre>
mysql> SHOW TABLE STATUS WHERE name = 'sometable'

*************************** 1. row ***************************
           Name: books_innodb
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 2158501
 Avg_row_length: 286
    Data_length: 617611264
Max_data_length: 0
   Index_length: 70008832
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2009-08-25 10:03:43
    Update_time: NULL
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment: InnoDB free: 1799168 kB
</pre><p>Also worth noting is the data inserted in random order used about 30% more space according to the Data_length value.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/0AGaSOwoK2k" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/converting-tables-to-innodb-takes-forever/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/converting-tables-to-innodb-takes-forever</feedburner:origLink></item> <item><title>AmazonAPISigning.com</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/6WXZHMO5Ty0/amazonapisigningcom</link> <comments>http://www.brandonchecketts.com/archives/amazonapisigningcom#comments</comments> <pubDate>Mon, 27 Jul 2009 04:12:57 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=388</guid> <description><![CDATA[Amazon Associate Web Services will start requiring API Requests to contain a cryptographic signature on August 15th.  Any website that uses their Product API&#8217;s will need to be modified to correctly sign the requests using their Secret Key.
I&#8217;ve just created AmazonAPISigning.com which is a website that offers services to help in making the [...]]]></description> <content:encoded><![CDATA[<p>Amazon Associate Web Services will start requiring API Requests to contain a cryptographic signature on August 15th.  Any website that uses their Product API&#8217;s will need to be modified to correctly sign the requests using their Secret Key.</p><p>I&#8217;ve just created <a
href="http://www.amazonapisigning.com/">AmazonAPISigning.com</a> which is a website that offers services to help in making the transition to the signed requests.  Specifically, it offers  a programming service to modify websites code to implement the required changes.   It also offers a <a
href="http://www.amazonapisigning.com/service.html">free API Signing service</a> for those websites that aren&#8217;t able to implement the signatures within their own code for whatever reason.   The signing service is specifically intended for widgets and tools that are implemented completely via JavaScript, and thus aren&#8217;t able to keep their private key hidden from the Javascript Source code.</p><p>The signing service may also serve as a really quick solution for webmasters to be able to start signing requests.   Their website code simply needs to change the hostname used in the Amazon API requests, and the service will start calculating the signatures on their behalf.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/6WXZHMO5Ty0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/amazonapisigningcom/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/amazonapisigningcom</feedburner:origLink></item> <item><title>ProFTPd allows multipled DefaultRoot lines for flexible chrooting</title><link>http://feedproxy.google.com/~r/BrandonChecketts/~3/a6Np9bDVKkc/proftpd-allows-multipled-defaultroot-lines-for-flexible-chrooting</link> <comments>http://www.brandonchecketts.com/archives/proftpd-allows-multipled-defaultroot-lines-for-flexible-chrooting#comments</comments> <pubDate>Thu, 02 Jul 2009 19:25:45 +0000</pubDate> <dc:creator>Brandon</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux System Administration]]></category> <category><![CDATA[Security]]></category><guid isPermaLink="false">http://www.brandonchecketts.com/?p=385</guid> <description><![CDATA[The ProFTPd documentation gives good examples of how to use the DefaultRoot directive to chroot users to a specific directory.
A customer today wanted to have different chroot directories for different groups of users.  The documentation didn&#8217;t mention if it was okay to include multiple DefaultRoot lines.  After some experimenting, I can verify [...]]]></description> <content:encoded><![CDATA[<p>The <a
href="http://www.proftpd.org/docs/directives/linked/config_ref_DefaultRoot.html">ProFTPd documentation</a> gives good examples of how to use the DefaultRoot directive to chroot users to a specific directory.</p><p>A customer today wanted to have different chroot directories for different groups of users.  The documentation didn&#8217;t mention if it was okay to include multiple DefaultRoot lines.  After some experimenting, I can verify that it is allowed and works well.</p><p>I used something like this in /etc/proftpd/proftpd.conf</p><pre>
DefaultRoot                     ~ jailed
DefaultRoot                     ~/../.. othergroup
</pre><p>Users in the group &#8216;jailed&#8217; are chrooted to their own home directory immediately upon logging in.   Users in the &#8216;othergroup&#8217; are chrooted two levels up from their home directory.  If you want to get really specific, each user generally has a group of their own, so you can effectively do this a the user-level as well.</p> <img src="http://feeds.feedburner.com/~r/BrandonChecketts/~4/a6Np9bDVKkc" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.brandonchecketts.com/archives/proftpd-allows-multipled-defaultroot-lines-for-flexible-chrooting/feed</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.brandonchecketts.com/archives/proftpd-allows-multipled-defaultroot-lines-for-flexible-chrooting</feedburner:origLink></item> </channel> </rss><!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching 8/12 queries in 0.073 seconds using disk

Served from: bookscouter.com @ 2010-03-10 08:48:45 -->
