<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" >

<channel>
	<title>spiralbound.net</title>
	<atom:link href="http://spiralbound.net/feed" rel="self" type="application/rss+xml" />
	<link>http://spiralbound.net</link>
	<description>my digital notebook</description>
	<lastBuildDate>Wed, 27 Jan 2010 02:24:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ZoneType.sh Version 2.0</title>
		<link>http://spiralbound.net/2010/01/26/zonetype-sh-version-2-0</link>
		<comments>http://spiralbound.net/2010/01/26/zonetype-sh-version-2-0#comments</comments>
		<pubDate>Tue, 26 Jan 2010 17:29:29 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cfengine]]></category>
		<category><![CDATA[global zone]]></category>
		<category><![CDATA[local zone]]></category>
		<category><![CDATA[prtdiag]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[zonetype.sh]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1316</guid>
		<description><![CDATA[We just started supporting Solaris 10 in our VMware cluster so I had to update my zone type script to detect if the OS is running there. I&#8217;m not sure how I feel about depending on the output of ptrdiag since the interface is labeled &#8220;unstable&#8221;, but it works for now, and I really don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>We just started supporting Solaris 10 in our VMware cluster so I had to update <a href="http://spiralbound.net/2009/03/03/script-to-determine-solaris-10-zone-type">my zone type script</a> to detect if the OS is running there. I&#8217;m not sure how I feel about depending on the output of <strong>ptrdiag</strong> since the interface is labeled &#8220;unstable&#8221;, but it works for now, and I really don&#8217;t see Sun changing the first line of output where the system configuration is listed. Anyhow, when issued with the -v or &#8211;vmware flag, the script returns 0 if it&#8217;s running on the cluster and 1 if it is not.</p>
<p>Usage:</p>
<p># zonetype.sh -g or &#8211;global<br />
Return 0: The machine is a global zone with 1 or more local zones<br />
Return 1: The machine is not a global zone</p>
<p># zonetype.sh -l or &#8211;local<br />
Return 0: The machine is a local zone<br />
Return 1: The machine is not a not a local zone</p>
<p># zonetype.sh -v or &#8211;vmware<br />
Return 0: The machine is running on a VMware hypervisor<br />
Return 1: The machine is not running in VMware</p>
<pre>
#! /bin/bash
#
# When issued with the -g or --global flag, this script will return:
# 0 if the machine is a global zone and has one or more local zones.
# Otherwise, it will return 1
#
# When issued with the -l or --local flag, this script will return:
# 0 if if is a local zone and 1 if it is not
#
# When issued with the -v or --vmware flag, this script will return:
# 0 if it is a vmware host and 1 if not.
#

list=( `/usr/sbin/zoneadm list -civ | awk '{ print $1 }'`)

  case "$1" in
    -g|--global)
        # If the third element in our array is null, set it to 0
        if [ "${list[2]}" == ""  ]; then
        list[2]=0
        fi
        # This is a global zone only if it has one or more local zones.
        if [ ${list[1]} -eq 0 ] &#038;&#038; [ ${list[2]} -ge 1 ]; then
        # 1 is returned if we have a global and local zone,
        # otherwise, we return 0
                exit 0
            else
                exit 1
        fi
              ;;
    -l|--local)
        # If the second element in our array is = or > 1, it is a local zone.
        if [ ${list[1]} -ge 1 ]; then
        # Return 1 if this is a local zone, otherwise return 0.
                exit 0
            else
                exit 1
        fi

              ;;
   -v|--vmware)
        # Don't run our check on local zones... Prtdiag can't run there
        if [ ${list[1]} != 0 ]; then
                exit 1
           else
                vmhost=( `/usr/sbin/prtdiag | grep System | awk '{ print $5 }'`)
                if [ $vmhost == VMware ]; then
                        #If the host is running on the vmware cluster return 0,
                        # otherwise, return 1
                        exit 0
                else
                        exit 1
                fi
        fi
              ;;
        *)
        echo "Usage: /local/adm/zonetype.sh {-l | --local | -g | --global | -v | --vmware}"
        exit 1
  esac
</pre>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2010/01/26/zonetype-sh-version-2-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Error: The data could not be converted to UTF-8</title>
		<link>http://spiralbound.net/2009/12/22/wp-error-the-data-could-not-be-converted-to-utf-8</link>
		<comments>http://spiralbound.net/2009/12/22/wp-error-the-data-could-not-be-converted-to-utf-8#comments</comments>
		<pubDate>Wed, 23 Dec 2009 01:27:23 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[coolstack]]></category>
		<category><![CDATA[iconv. mbstring]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[The data could not be converted to UTF-8]]></category>
		<category><![CDATA[utf-8]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1330</guid>
		<description><![CDATA[If you&#8217;ve just upgraded to WordPress 2.9 and you are now getting UTF 8 conversion errors on your dashboard, you&#8217;ll need to take a look at WordPress Trac Ticket #11219.

RSS Error: The data could not be converted to UTF-8

The bottom line is that you&#8217;ll need to enable either iconv or mbstring in your PHP configuration. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve just upgraded to WordPress 2.9 and you are now getting UTF 8 conversion errors on your dashboard, you&#8217;ll need to take a look at <a href="http://core.trac.wordpress.org/ticket/11219">WordPress Trac Ticket #11219</a>.<br />
<code><br />
RSS Error: The data could not be converted to UTF-8<br />
</code><br />
The bottom line is that you&#8217;ll need to enable either <a href="http://php.net/manual/en/book.iconv.php">iconv</a> or <a href="http://php.net/manual/en/book.mbstring.php">mbstring</a> in your PHP configuration. I&#8217;m using CoolStack on Solaris 10, so it was a simple matter of uncommenting the following lines from <code>/opt/coolstack/php5/lib/php.ini</code> and restarting apache. While you&#8217;re at it, may as well uncomment ctype as well since the new image uploader needs it.</p>
<p>Uncommnet the following lines in /opt/coolstack/php5/lib/php.ini.<br />
<code><br />
extension=iconv.so<br />
extension=mbstring.so<br />
extension=ctype.so<br />
</code></p>
<p>Finally, restart apache:<br />
<code><br />
svcadm restart apache22-csk<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/12/22/wp-error-the-data-could-not-be-converted-to-utf-8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNIX &#8211; Find Files that Changed Within Time Window</title>
		<link>http://spiralbound.net/2009/11/02/unix-find-files-that-changed-within-time-window</link>
		<comments>http://spiralbound.net/2009/11/02/unix-find-files-that-changed-within-time-window#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:57:56 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[newer]]></category>
		<category><![CDATA[posix]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=373</guid>
		<description><![CDATA[Every so often us lowly UNIX admins find ourselves needing to search a file system for files that have been created or changed within a certain time window. In other words, those files that are newer than time &#8220;X&#8221;, but not newer than time &#8220;Y&#8221;. There are a number of ways to accomplish this, but [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often us lowly UNIX admins find ourselves needing to search a file system for files that have been created or changed within a certain time window. In other words, those files that are newer than time &#8220;X&#8221;, but not newer than time &#8220;Y&#8221;. There are a number of ways to accomplish this, but my preferred method is to create two reference files to indicate the beginning and end of my window and use the &#8220;-newer&#8221; and &#8220;! -newer&#8221; flags to search for files that changed within that window.<br />
<code><br />
# touch -amt 200910260000 /tmp/starttime<br />
# touch -amt 200910262359 /tmp/endtime<br />
# find / -type f -newer /tmp/starttime -a ! -newer /tmp/endtime<br />
</code><br />
The guys at  virtuelvis.com <a href="http://virtuelvis.com/archives/2008/10/finding-files-modified-on-a-certain-date">point out</a> that it is more elegant to accomplish this without creating two files, but their solution does not work with operating systems that use strict <a href="http://en.wikipedia.org/wiki/POSIX">POSIX</a> compliant &#8220;find&#8221; implementations, making it of little use in some cases. For the curious, here is their example:<br />
<code><br />
# find . -type f -newermt 2009-10-26 ! -newermt 2009-10-27<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/11/02/unix-find-files-that-changed-within-time-window/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Resources for the n00b</title>
		<link>http://spiralbound.net/2009/10/14/arduino-resources-for-the-n00b</link>
		<comments>http://spiralbound.net/2009/10/14/arduino-resources-for-the-n00b#comments</comments>
		<pubDate>Wed, 14 Oct 2009 21:08:16 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[Highlights]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1321</guid>
		<description><![CDATA[Lately I&#8217;ve been entertaining myself by building a rebreather loop controller using the Arduino micro controller. This little open source board is really nice to work with for a number of reasons. Unlike many of the alternatives which employ proprietary programming languages, the Arduino simply uses &#8220;C&#8221;. It also has an IDE that runs the [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been entertaining myself by building a rebreather loop controller using the <a href="http://www.arduino.cc/">Arduino</a> micro controller. This little open source board is really nice to work with for a number of reasons. Unlike many of the <a href="http://www.parallax.com/propeller/">alternatives</a> which employ proprietary programming languages, the Arduino simply uses &#8220;C&#8221;. It also has an IDE that runs the my Mac, and it enjoys an enormous development community.</p>
<p>I&#8217;m pretty new to this kind of thing, so I&#8217;ve been using web tutorials to work my way up from the most basic blinking LED to something that actually monitors oxygen sensors and populates an LCD with information. Some of the more valuable resources I have used are as follows:</p>
<ul>
<li><a href="http://www.ladyada.net/learn/arduino/lesson0.html">A really good five-part tutorial to get started</a></li>
<li><a href="http://www.arduino.cc/en/Tutorial/AnalogInput">A tutorial to get started with analog input</a></li>
<li><a href="http://www.arduino.cc/playground/Learning/SparkFunSerLCD">Guide to using serial LCD&#8217;s from Spark Fun Electronics</a></li>
<li><a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1172808516/1">A solution to some common problems with interupts</a></li>
<li><a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233535986/7">Some good examples of code using an LCD menu with three buttons</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/10/14/arduino-resources-for-the-n00b/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Banana Slug is not a Mythical Creature</title>
		<link>http://spiralbound.net/2009/05/01/the-banana-slug-is-not-a-mythical-creature</link>
		<comments>http://spiralbound.net/2009/05/01/the-banana-slug-is-not-a-mythical-creature#comments</comments>
		<pubDate>Fri, 01 May 2009 06:27:55 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Et cetera]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[banana slug]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[mythical creature]]></category>
		<category><![CDATA[Santa cruz]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1241</guid>
		<description><![CDATA[OK, so I never actually believed that they were a mythical creature, but it took me so long to actually find one after moving to Santa Cruz that I had great fun telling those who didn&#8217;t know better that they were figment of the collective local imagination. Courtney, who had seen them before, always sighed, [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I never actually believed that they were a mythical creature, but it took me so long to actually find one after <a href="http://spiralbound.net/2008/08/23/move-to-santa-cruz">moving to Santa Cruz</a> that I had great fun telling those who didn&#8217;t know better that they were figment of the collective local imagination. <a href="http://twistedstitches.net">Courtney</a>, who had seen them before, always sighed, rolled her eyes, and reassured whatever unwitting soul I happened to be talking with at the moment that they did exist, and that I should absolutely not be taken seriously. On this point, I cannot disagree with her, but I must have been somewhat convincing because her mom actually sounded surprised when a friend finally pointed one out to me and I managed to snap a picture of it. She actually made me send her the picture because she didn&#8217;t believe me.</p>
<p>A few banana slug facts:</p>
<ul>
<li>They are native to the Northwest</li>
<li>The are HUGE! Some have reached 10 inches in length, and weights of a quarter of a pound.</li>
<li>They were almost the official mollusk of California. Yes, the legislature actually voted in the noble slug, but the Governor vetoed it.</li>
<li>They are the official mascot of <a href="http://ucsc.edu">UC Santa Cruz</a>.</li>
</ul>
<div id="attachment_1246" class="wp-caption aligncenter" style="width: 510px"><a href="http://spiralbound.net/wp-content/uploads/2009/05/img_0141.jpg"><img src="http://spiralbound.net/wp-content/uploads/2009/05/img_0141-768x1024.jpg" alt="Banana Slug" title="Banana Slug" width="500" height="666" class="size-large wp-image-1246" /></a><p class="wp-caption-text">Banana Slug</p></div>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/05/01/the-banana-slug-is-not-a-mythical-creature/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Useful MySQL Commands</title>
		<link>http://spiralbound.net/2009/04/30/useful-mysql-commands</link>
		<comments>http://spiralbound.net/2009/04/30/useful-mysql-commands#comments</comments>
		<pubDate>Fri, 01 May 2009 02:45:21 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[bootable]]></category>
		<category><![CDATA[corruption]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database optomization]]></category>
		<category><![CDATA[database password]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqlcheck]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[root password]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh tunneling]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1221</guid>
		<description><![CDATA[There are a lot of usefully MySQL commands that I either don&#8217;t run enough to remember or just end up using some GUI to accomplish. Nothing against Navicat, but what kind of sysadmin would I be if I couldn&#8217;t do it at the command line as well. Anyhow, I had to do a bunch of [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of usefully MySQL commands that I either don&#8217;t run enough to remember or just end up using some GUI to accomplish. Nothing against Navicat, but what kind of sysadmin would I be if I couldn&#8217;t do it at the command line as well. Anyhow, I had to do a bunch of this kind of work lately, so I thought I would write the more common commands down here so I would have them to reference.</p>
<p>It is generally a good idea to firewall off your MySQL port (3306) unless you are on a secure network. The downside to this is that it prevents you from using GUI tools like Navicat to connect to your database server. No problem, just use this command to SSH tunnel a connection. After doing this, you can connect to your database on localhost port 8888:<br />
<code><br />
ssh -fNg -L 8888:127.0.0.1:3306 login@mysql-server<br />
</code></p>
<p>Once you have installed a new instance of MySQL, you have to change the root password:<br />
<code><br />
# mysql -u root<br />
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');<br />
mysql> SET PASSWORD FOR 'root'@'yourhostname' = PASSWORD('newpwd');<br />
mysql> exit<br />
</code></p>
<p>Depending on the way you handle your MySQL installation, you will most likely have to run the mysql_upgrade script after upgrades to use all the new features:<br />
<code><br />
mysql_upgrade -u root –password=yourpassword<br />
</code></p>
<p>Do a thorough check to see if your tables are corrupted:<br />
<code><br />
mysqlcheck -u root -p --check --extended --all-databases<br />
</code></p>
<p>Repair any corruption if it exists:<br />
<code><br />
mysqlcheck -u root -p --repair --all-databases<br />
</code></p>
<p>Look at all your tables and optomize them if necessary:<br />
<code><br />
mysqlcheck -u root -p --optimize --all-databases<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/04/30/useful-mysql-commands/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of the Santa Cruz City Council</title>
		<link>http://spiralbound.net/2009/03/04/best-of-santa-cruz-city-council</link>
		<comments>http://spiralbound.net/2009/03/04/best-of-santa-cruz-city-council#comments</comments>
		<pubDate>Wed, 04 Mar 2009 15:00:39 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Et cetera]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[city council]]></category>
		<category><![CDATA[crazy lady]]></category>
		<category><![CDATA[Dumb Santa Cruz Lady Vs. Sarah Palin]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[funny video]]></category>
		<category><![CDATA[insane]]></category>
		<category><![CDATA[Santa cruz]]></category>
		<category><![CDATA[Santa Cruz Airhead]]></category>
		<category><![CDATA[Sarah Palin]]></category>
		<category><![CDATA[strange]]></category>
		<category><![CDATA[strange people]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=296</guid>
		<description><![CDATA[She may not the the world&#8217;s angriest woman, but the lady in this video may very well be the biggest airhead! The rest of the characters in the last one are pretty good too. It turns out that you don&#8217;t have to live in Santa Cruz very long before you start running into these folks. [...]]]></description>
			<content:encoded><![CDATA[<p>She may not the the <a href="http://spiralbound.net/2005/10/21/worlds-angriest-woman">world&#8217;s angriest woman</a>, but the lady in this video may very well be the biggest airhead! The rest of the characters in the last one are pretty good too. It turns out that you don&#8217;t have to live in Santa Cruz very long before you start running into these folks. What can I say&#8230; It&#8217;s a crazy place.</p>
<p>Santa Cruz lady at city council meeting:<br />
<center><object type="application/x-shockwave-flash" data="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1917596&#038;fullscreen=1" width="480" height="360" ><param name="allowfullscreen" value="true"/><param name="wmode" value="transparent"/><param name="AllowScriptAccess" value="true"/><param name="movie" quality="best" value="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1917596&#038;fullscreen=1"/><embed src="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1917596&#038;fullscreen=1" type="application/x-shockwave-flash" wmode="transparent"  width="480" height="360"  allowScriptAccess="always"></embed></object>
<div style="padding:5px 0; text-align:center; width:480px;"></div>
<p></center></p>
<p>Santa Cruz Lady Vs. Sarah Palin:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/vRwckV9NLb4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vRwckV9NLb4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>The whole Santa Cruz City Council Mashup:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/dChBN_zfofY&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dChBN_zfofY&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/03/04/best-of-santa-cruz-city-council/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Script to Determine Solaris 10 Zone Type</title>
		<link>http://spiralbound.net/2009/03/03/script-to-determine-solaris-10-zone-type</link>
		<comments>http://spiralbound.net/2009/03/03/script-to-determine-solaris-10-zone-type#comments</comments>
		<pubDate>Tue, 03 Mar 2009 22:46:27 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[cfengine]]></category>
		<category><![CDATA[global zone]]></category>
		<category><![CDATA[local zone]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[zoneadm]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1203</guid>
		<description><![CDATA[We use a lot of local zones in our Solaris 10 environment. We also use cfengine pretty heavily and there are some instances when we need to include or exclude certain automated tasks based on what type of zone we are working with. I wrote this little script that checks to see what type of [...]]]></description>
			<content:encoded><![CDATA[<p>We use a lot of local zones in our Solaris 10 environment. We also use cfengine pretty heavily and there are some instances when we need to include or exclude certain automated tasks based on what type of zone we are working with. I wrote this little script that checks to see what type of zone we are dealing with. Based on the return value, I can set a cfengine class and control what gets run and where.</p>
<ul>
<li>Return 0 if the machine is a global zone with 1 or more local zones</li>
<li>Return 1 if the machine is either a local zone or a global zone with 0 local zones</li>
</ul>
<pre>
#! /bin/bash
#
# When issued with the -g or --global flag, this script will return:
# 0 if the machine is a global zone and has one or more local zones.
# Otherwise, it will return 1
#
# Wen issued with the -l or --local flag, this script will return:
# 0 if if is a local zone and 1 if it is not
#

list=( `/usr/sbin/zoneadm list -civ | awk '{ print $1 }'`)
  case "$1" in
    -g|--global)
        # If the third element in our array is null, set it to 0
        if [ "${list[2]}" == ""  ]; then
        list[2]=0
        fi
        # This is a global zone only if it has one or more local zones.
        if [ ${list[1]} -eq 0 ] &#038;&#038; [ ${list[2]} -ge 1 ]; then
        # 1 is returned if we have a global and local zone, otherwise, we return 0
                exit 0
            else
                exit 1
        fi
              ;;
    -l|--local)
        # If the second element in our array is = or > 1, it is a local zone.
        if [ ${list[1]} -ge 1 ]; then
        # Return 1 if this is a local zone, otherwise return 0.
                exit 0
            else
                exit 1
        fi
              ;;
        *)
        echo "Usage: /local/adm/zonetype.sh {-l | --local | -g | --global}"
        exit 1
  esac
</pre>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/03/03/script-to-determine-solaris-10-zone-type/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Check Speed / Duplex on Solaris 10</title>
		<link>http://spiralbound.net/2009/03/02/check-speed-duplex-on-solaris-10</link>
		<comments>http://spiralbound.net/2009/03/02/check-speed-duplex-on-solaris-10#comments</comments>
		<pubDate>Mon, 02 Mar 2009 23:52:54 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[dladm]]></category>
		<category><![CDATA[duplex]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[link speed]]></category>
		<category><![CDATA[ndd]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1198</guid>
		<description><![CDATA[In the past, I always had to use the ndd &#8211; get command to figure out what my link speed and duplex settings were. In Solaris 10, Sun now gives us the handy dladm command, which makes it a whole lot easier. 

# dladm show-dev
e1000g2         link: up [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, I always had to use the ndd &#8211; get command to figure out what my link speed and duplex settings were. In Solaris 10, Sun now gives us the handy dladm command, which makes it a whole lot easier. <br clear="left"/><br />
<code><br />
# dladm show-dev<br />
e1000g2         link: up        speed: 1000  Mbps       duplex: full<br />
e1000g3         link: up        speed: 1000  Mbps       duplex: full<br />
e1000g0         link: up        speed: 1000  Mbps       duplex: full<br />
e1000g1         link: up        speed: 1000  Mbps       duplex: full<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/03/02/check-speed-duplex-on-solaris-10/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replace Failed SVM Mirror Drive</title>
		<link>http://spiralbound.net/2009/02/16/replace-failed-svm-mirror-drive</link>
		<comments>http://spiralbound.net/2009/02/16/replace-failed-svm-mirror-drive#comments</comments>
		<pubDate>Mon, 16 Feb 2009 05:45:42 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[cfgadm]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[disk suite]]></category>
		<category><![CDATA[failed drive]]></category>
		<category><![CDATA[metadb]]></category>
		<category><![CDATA[metareplace]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1141</guid>
		<description><![CDATA[So you have used SVM to mirror your disk, and one of the two drives fails. Aren&#8217;t you glad you mirrored them! You don&#8217;t have to do a restore from tape, but you are going have to replace the failed drive.
Many modern RAID arrays just require you to take out the bad drive and plug [...]]]></description>
			<content:encoded><![CDATA[<p>So you have used SVM to mirror your disk, and one of the two drives fails. Aren&#8217;t you glad you mirrored them! You don&#8217;t have to do a restore from tape, but you are going have to replace the failed drive.</p>
<p>Many modern RAID arrays just require you to take out the bad drive and plug in the new one, while everything else is taken care of automatically. It&#8217;s not quite that easy on a Sun server, but it&#8217;s really just a few simple steps.  I just had to do this, so I thought I would write down the procedure here.</p>
<p>Basically, the process boils down to the following steps:</p>
<ul>
<li>Detach the failed meta devices from the failed drive</li>
<li>Delete the meta devices from the failed drive</li>
<li>Delete the meta databases from the failed drive</li>
<li>Unconfigure the failed drive</li>
<li>Remove and replace the failed drive</li>
<li>Configure the new drive</li>
<li>Copy the remaining drive&#8217;s partition table to the new drive</li>
<li>Re-create the meta databases on the new drive</li>
<li>Install the bootblocks on the new drive</li>
<li>Recreate the meta devices</li>
<li>Attach the meta devices</li>
</ul>
<p>Let&#8217;s look at each step individually. In my case, c0t1d0 has failed, so, I detach all meta devices on that disk and then delete them:</p>
<p><code><br />
# metadetach -f d0 d2<br />
# metadetach -f d10 d12<br />
# metadetach -f d40 d42<br />
# metaclear d2<br />
# metaclear d12<br />
# metaclear d42<br />
</code></p>
<p>Next I take a look at the status of my meta databases. Below we can see the the replicas on that disk have write errors:</p>
<pre>
# metadb -i
        flags           first blk       block count
     a m  p  luo        16               8192            /dev/dsk/c0t0d0s3
     a    p  luo        8208             8192            /dev/dsk/c0t0d0s3
     W    p  luo        16                8192            /dev/dsk/c0t1d0s3
     W    p  luo        8208            8192            /dev/dsk/c0t1d0s3
 r - replica does not have device relocation information
 o - replica active prior to last mddb configuration change
 u - replica is up to date
 l - locator for this replica was read successfully
 c - replica's location was in /etc/lvm/mddb.cf
 p - replica's location was patched in kernel
 m - replica is master, this is replica selected as input
 W - replica has device write errors
 a - replica is active, commits are occurring to this replica
 M - replica had problem with master blocks
 D - replica had problem with data blocks
 F - replica had format problems
 S - replica is too small to hold current data base
 R - replica had device read errors
</pre>
<p>The replicas on c0t1d0s3 are dead to us, so let&#8217;s wipe them out!</p>
<p><code><br />
# metadb -d c0t1d0s3<br />
# metadb -i<br />
</code></p>
<pre>
        flags           first blk       block count
     a m  p  luo        16               8192            /dev/dsk/c0t0d0s3
     a    p  luo        8208             8192            /dev/dsk/c0t0d0s3
</pre>
<p>The only replicas we have left are on c0t0d0s3, so I&#8217;m all clear to unconfigure the device. I run cfgadm to get the c0 path:</p>
<p><code><br />
# cfgadm -al<br />
</code></p>
<pre>
Ap_Id                          Type         Receptacle   Occupant     Condition
c0                             scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0                 disk         connected    configured   unknown
c0::dsk/c0t1d0                 disk         connected    configured   unknown
c0::dsk/c0t2d0                 disk         connected    configured   unknown
c0::dsk/c0t3d0                 disk         connected    configured   unknown
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 CD-ROM       connected    configured   unknown
usb0/1                         unknown      empty        unconfigured ok
usb0/2                         unknown      empty        unconfigured ok
usb1/1.1                       unknown      empty        unconfigured ok
usb1/1.2                       unknown      empty        unconfigured ok
usb1/1.3                       unknown      empty        unconfigured ok
usb1/1.4                       unknown      empty        unconfigured ok
usb1/2                         unknown      empty        unconfigured ok
</pre>
<p>I run the following command to unconfigure the failed drive:</p>
<p><code><br />
# cfgadm -c unconfigure c0::dsk/c0t1d0<br />
</code></p>
<p>The drive light turns blue<br />
Pull the failed drive out<br />
Insert the new drive</p>
<p>Configure the new drive:</p>
<p><code><br />
# cfgadm -c configure c0::dsk/c0t1d0<br />
</code></p>
<p>Now that the drive is configured and visible from within the format command, we can copy the partition table from the remaining mirror member:</p>
<p><code><br />
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2<br />
</code></p>
<p>Next, I install the bootblocks onto the new drive:</p>
<p><code><br />
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s2<br />
</code></p>
<p>Create the state replicas:</p>
<p><code><br />
metadb -a -c 2 c0t1d0s3<br />
</code></p>
<p>Recreate the meta devices:<br />
<code><br />
metainit -f d2 1 1 c0t1d0s0<br />
metainit -f d12 1 1 c0t1d0s1<br />
metainit -f d42 1 1 c0t1d0s4<br />
</code></p>
<p>And finally, reattach the metadevices which will sync them up with the mirror.</p>
<p><code><br />
metattach d0 d2<br />
metattach d10 d12<br />
metattach d40 d42<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/02/16/replace-failed-svm-mirror-drive/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Happy 1234567890&#8242;th Second UNIX!</title>
		<link>http://spiralbound.net/2009/01/27/happy-1234567890-second-unix</link>
		<comments>http://spiralbound.net/2009/01/27/happy-1234567890-second-unix#comments</comments>
		<pubDate>Tue, 27 Jan 2009 19:31:24 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[1234567890]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[epoch]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[UNIX time]]></category>
		<category><![CDATA[UTC]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1144</guid>
		<description><![CDATA[Today, Friday February 13, at 3:31 PM (PST), the UNIX time will read exactly 1234567890. So exacly what is all this excitement about UNIX being able to count to 10? Surely, the operating system that is slowly but steadily putting Microsoft out of business must be able to do that. Well, it&#8217;s actually the UNIX [...]]]></description>
			<content:encoded><![CDATA[<p>Today, Friday February 13, at 3:31 PM (PST), the UNIX time will read exactly 1234567890. So exacly what is all this excitement about UNIX being able to count to 10? Surely, the operating system that is slowly but steadily <a href="http://www.talkibie.com/technology/606/">putting Microsoft out of business</a> must be able to do that. Well, it&#8217;s actually the UNIX time stamp, and what has all of us nerds talking is really just the fact that the numbers have never lined up in sequence like this before.</p>
<p>So what the heck is this UNIX time anyhow? Well, simply put, it&#8217;s actually the exact number of seconds since the the Unix epoch. This was 00:00:00 UTC on January 1, 1970.</p>
<p>From <a href="http://en.wikipedia.org/wiki/Unix_time">Wikipedia</a>:</p>
<blockquote><p>
It is not a linear representation of time nor a true representation of UTC (though it is frequently mistaken for both) as the times it represents are UTC but it has no way of representing UTC leap seconds (e.g. 1998-12-31 23:59:60).
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2009/01/27/happy-1234567890-second-unix/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/gijoe-firealarm.mpg" length="1179652" type="video/mpeg" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/deep6-11.mpg" length="1472516" type="video/mpeg" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/gijoe-porksand.mpg" length="1947652" type="video/mpeg" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/gijoebodymassage.mov" length="1074176" type="video/quicktime" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/gijoe-reggae.mov" length="1801785" type="video/quicktime" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2009/01/deep6-1.mpg" length="1472516" type="video/mpeg" />
		</item>
		<item>
		<title>Basic iptables Configuration</title>
		<link>http://spiralbound.net/2008/12/31/basic-iptables-configuration</link>
		<comments>http://spiralbound.net/2008/12/31/basic-iptables-configuration#comments</comments>
		<pubDate>Thu, 01 Jan 2009 00:05:54 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysl]]></category>
		<category><![CDATA[port forward]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=388</guid>
		<description><![CDATA[It&#8217;s always a good idea to setup a local firewall on hosts that are on unprotected networks. The internet &#8220;winds&#8221; blow harder and harder each day, and it&#8217;s only a matter of time before some daemon has an exploit that gets taken advantage of. I use CentOS 5 for all my web servers, and here [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always a good idea to setup a local firewall on hosts that are on unprotected networks. The internet &#8220;winds&#8221; blow harder and harder each day, and it&#8217;s only a matter of time before some daemon has an exploit that gets taken advantage of. I use <a href="http://centos.org">CentOS</a> 5 for all my web servers, and here is an example of the script I use to create a DEFAULT TO DENY set of firewall rules. This script generates a file called iptables in /etc/sysconfig.</p>
<p>I used to create a special rule for MySQL that only allowed connections from my own network, but lately I have been omitting this rule and <a href="http://spiralbound.net/2007/01/31/mysql-connection-over-an-ssl-tunnel">tunneling the connection through ssh instead</a>. That is why it is commented out in the script below.</p>
<p><code><br />
### SCRIPT ###<br />
#!/bin/sh<br />
# Drop all incoming traffic<br />
/sbin/iptables -P INPUT DROP<br />
# Drop all forwarded traffic<br />
/sbin/iptables -P FORWARD DROP<br />
# Allow all outgoing traffic<br />
/sbin/iptables -P OUTPUT ACCEPT<br />
# Allow returning packets<br />
/sbin/iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
# Allow incoming traffic on port 80 for web server<br />
/sbin/iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT<br />
# Allow MySQL only from a certain network<br />
/sbin/iptables -A INPUT -p tcp -m tcp -s XXX.XXX.XXX.0/24 --dport 3306 -j ACCEPT<br />
# Allow local traffic<br />
/sbin/iptables -A INPUT -i lo -j ACCEPT<br />
# Allow incoming SSH on port 22<br />
#/sbin/iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT<br />
# Allow ping<br />
/sbin/iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT<br />
/sbin/iptables-save > /etc/sysconfig/iptables<br />
chmod go-r /etc/sysconfig/iptables<br />
/sbin/sudo service iptables restart<br />
### /SCRIPT ###<br />
</code></p>
<p>Here is what /etc/sysconfig/iptables looks like after running this script:</p>
<p><code><br />
# Generated by iptables-save v1.3.5 on Wed Dec 31 13:47:40 2008<br />
*filter<br />
:INPUT DROP [0:0]<br />
:FORWARD DROP [0:0]<br />
:OUTPUT ACCEPT [12:8972]<br />
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT<br />
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT<br />
-A INPUT -i lo -j ACCEPT<br />
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT<br />
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT<br />
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT<br />
-A INPUT -i lo -j ACCEPT<br />
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT<br />
COMMIT<br />
# Completed on Wed Dec 31 13:47:40 2008<br />
</code></p>
<p>After you are done, make sure you have iptables setup to start when the system boots.</p>
<p><code><br />
# /sbin/chkconfig --list | grep iptables</p>
<pre>iptables       	0:off	1:off	2:on	3:on	4:on	5:on	6:off</pre>
<p></code></p>
<p>If it&#8217;s not on, just run:<br />
<code><br />
/sbin/chkconfig iptables on<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/12/31/basic-iptables-configuration/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install Solaris Package in Alternate Base Directory</title>
		<link>http://spiralbound.net/2008/12/28/install-solaris-package-in-alternate-base-directory</link>
		<comments>http://spiralbound.net/2008/12/28/install-solaris-package-in-alternate-base-directory#comments</comments>
		<pubDate>Sun, 28 Dec 2008 23:25:59 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[admin file]]></category>
		<category><![CDATA[basedir]]></category>
		<category><![CDATA[defaults]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[pkgadd]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=376</guid>
		<description><![CDATA[Unless you specify a different administrative file, the pkgadd command reads &#8220;/var/sadm/install/admin/default&#8221;, which specifies the base directory as &#8220;/opt&#8221;. Do not change the settings in this file, but rather create a custom admin file and enter an alternate &#8220;basedir&#8221; directive if you want to install your package into a different directory. We are going to [...]]]></description>
			<content:encoded><![CDATA[<p>Unless you specify a different administrative file, the pkgadd command reads &#8220;/var/sadm/install/admin/default&#8221;, which specifies the base directory as &#8220;/opt&#8221;. Do not change the settings in this file, but rather create a custom admin file and enter an alternate &#8220;basedir&#8221; directive if you want to install your package into a different directory. We are going to install our package into &#8220;/var/applications&#8221;, and call our custom admin file &#8220;custom&#8221;.</p>
<p>First, create and edit &#8220;/var/sadm/install/admin/custom&#8221;, adding a line similar to this:<br />
basedir=/var/applications/$PKGINST</p>
<p>Next, issue the pkgadd command with the &#8220;-a&#8221; flag to call you alternative admin file:</p>
<p>pkgadd -d device -a custom PackageName</p>
<p>This really comes in handy when your customers want to retain control over their packages, but you don&#8217;t want to give them access to write packages into the system area. More detailed instructions can be found <a href="http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch13/286-288.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/12/28/install-solaris-package-in-alternate-base-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World&#8217;s Coolest Datacenter</title>
		<link>http://spiralbound.net/2008/12/07/worlds-coolest-datacenter</link>
		<comments>http://spiralbound.net/2008/12/07/worlds-coolest-datacenter#comments</comments>
		<pubDate>Sun, 07 Dec 2008 23:10:11 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[bahnhof]]></category>
		<category><![CDATA[datacenter]]></category>
		<category><![CDATA[james bond]]></category>
		<category><![CDATA[pionen]]></category>
		<category><![CDATA[stockholm]]></category>
		<category><![CDATA[sweden]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[underground]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=310</guid>
		<description><![CDATA[Ever since coming to work at UC Santa Cruz, I have been feeling pretty lucky to work in a well engineered and managed datacenter. So lucky, in fact, that I&#8217;ve been cultivating hatred towards me in my former coworkers by regaling them with stories about how wonderfully designed everything is here. The problem with thinking [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since coming to work at <a href="http://its.ucsc.edu/core_tech/operations/">UC Santa Cruz</a>, I have been feeling pretty lucky to work in a well engineered and managed datacenter. So lucky, in fact, that I&#8217;ve been cultivating hatred towards me in my <a href="http://plymouth.edu/infotech/">former coworkers</a> by regaling them with stories about how wonderfully designed everything is here. The problem with thinking you have it made though, is that someone will always point out some greener grass in another field.</p>
<p>This is exactly what happened when I saw <a href="http://royal.pingdom.com/2008/11/14/the-worlds-most-super-designed-data-center-fit-for-a-james-bond-villain/">this article</a> about the <a href="http://www.bahnhof.se/colocation.php">Pionen datacenter</a>, owned by Bahnhof in Sweden. Located nearly 100 feet beneath the city of Stockholm, this epic datacenter has been compared (fairly I might add) to the secret layer of a James Bond villian. It&#8217;s got backup power provided by twin submarine engines, triple-redundant internet backbone connections, and can reportedly stand up to a Hydrogen bomb. We spend so much time and effort trying to make our servers comfortable when designing datacenters, we often forget about the Human element. Even though these guys are literally working in a cave, it&#8217;s nice to see that <a href="http://www.bahnhof.se/index.php">Bahnhof</a> is trying to make its people comfortable as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/12/07/worlds-coolest-datacenter/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Move to Santa Cruz</title>
		<link>http://spiralbound.net/2008/08/23/move-to-santa-cruz</link>
		<comments>http://spiralbound.net/2008/08/23/move-to-santa-cruz#comments</comments>
		<pubDate>Sat, 23 Aug 2008 20:14:54 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Et cetera]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[relocation]]></category>
		<category><![CDATA[Santa cruz]]></category>
		<category><![CDATA[UCSC]]></category>
		<category><![CDATA[vermont]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=354</guid>
		<description><![CDATA[Well, after five years living in Vermont, and something like thirteen years living in New England, Courtney and I have gone and moved to Santa Cruz, CA. There are a lot of reasons for this; the very hard winters and extremely rainy summers in Vermont were starting to wear on us, but mostly we just [...]]]></description>
			<content:encoded><![CDATA[<p>Well, after five years living in Vermont, and something like thirteen years living in New England, <a href="http://twistedstitches.net">Courtney</a> and I have gone and moved to Santa Cruz, CA. There are a lot of reasons for this; the very hard winters and extremely rainy summers in Vermont were starting to wear on us, but mostly we just wanted to live in a young and vital place that has a larger population. Courtney had some experience with the area during her brief stint working at <a href="http://www.medicinebuddha.org/medicine_buddha.htm">Land of Medicine Buddha</a>, and I had always enjoyed The Monterey Bay area when my family and I would camp here as a kid, so Santa Cruz seemed the perfect place for us.</p>
<p>I applied for a UNIX Systems Engineer position at the <a href="http://ucsc.edu">University of California Santa Cruz</a>, and was offered the job back in July. After some serious soul searching, I decided to accept, and we started the process of relocating a full 3,000 miles from home, which I can assure you is no simple task! I&#8217;ve been here just under two weeks, but Courtney is still tidying up our affairs in Vermont before she starts the long journey out here in <a href="http://spiralbound.net/2007/11/13/toyota-yaris-review">our car</a>. Yep&#8230; That&#8217;s car, not cars. The public transportation system is so good out here that we can finally be a single car family. For my part, I&#8217;ve managed to move clear across this country twice and not driven it a single time. This is fine with me, however, since I have very little interest in seeing <a href="http://en.wikipedia.org/wiki/Middle_America_(United_States)#As_a_cultural_and_geographical_label">middle America</a>.</p>
<p><a href="http://maisonbisson.com/blog/">Casey</a> and I managed to find <a href="http://flickr.com/photos/maisonbisson/tags/paulasbreakfastshack/">Paula&#8217;s Breakfast Shack</a> while he was out for <a href="http://2008.sf.wordcamp.org/">WordCamp 08</a>. Home of the $1.99 Basic Breakfast, this place is so good, that I simply can&#8217;t imagine going anywhere else for eggs and home fries! I&#8217;ve tried a number of <a href="http://en.wikipedia.org/wiki/Taquer%C3%ADa">taquerias</a>, but the jury is still out on which one is best. Once I find it I&#8217;ll have to freeze some tacos and burritos and send them out to <a href="http://borkweb.com">Matt</a>, who has strongly indicated that he hates me for having such easy access to good Mexican Food.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/08/23/move-to-santa-cruz/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<georss:point>36.9671745 -122.0388794</georss:point>	</item>
		<item>
		<title>Bare Metal Linux Restore</title>
		<link>http://spiralbound.net/2008/08/05/bare-metal-linux-restore</link>
		<comments>http://spiralbound.net/2008/08/05/bare-metal-linux-restore#comments</comments>
		<pubDate>Tue, 05 Aug 2008 16:14:34 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[bare metal]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[RHEL4]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=344</guid>
		<description><![CDATA[Several weeks ago we started seeing some pretty scary errors showing up on the main system disk for our Blackboard server. We had an extra server hanging around, so we decided to move all the data off the failing disk and onto our spare server. The only question was how to make the new server [...]]]></description>
			<content:encoded><![CDATA[<p>Several weeks ago we started seeing some pretty scary errors showing up on the main system disk for our Blackboard server. We had an extra server hanging around, so we decided to move all the data off the failing disk and onto our spare server. The only question was how to make the new server as close to a perfect copy of the old one as possible. Simply restoring all the filesystems failed for a variety of reasons, mostly related to GRUB and the kernel, so I had to find a way of excluding only the files and directories that were tied to the specific model of server.</p>
<p>To do this, I started by installing a minimal copy of RHEL 4, making sure to lay the filesystems out in exactly the same way as they were on the old server. I then went through several experiments, leaving just the bare minimum files and directories required for the hardware and booting, but formatting all other filesystems and restoring the data from our old server. In the end, the below process resulted in system that worked perfectly, and very closely mirrored the original server.<br />
<span id="more-344"></span></p>
<ul>
<li>I conducted a minimal OS install on the new server, replicating the filesystem layout on the old server.</li>
<li>I booted the new server from DVD in rescue mode, allowing it to mount the filesystems in /mnt/sysimage</li>
<li>I removed EVERYTHING in every filesystem and directory EXCEPT the following:</li>
</ul>
<ul>
<li>Everything in /sys</li>
<li>Everything in /dev</li>
<li>Everything in /proc</li>
<li>Everything in /boot</li>
<li>/lib/modules</li>
<li>/etc/grub.conf</li>
<li>/etc/sysconficg/grub</li>
<li>/etc/modules.conf</li>
<li>/etc/fstab</li>
</ul>
<p>Next, I went to my backups and restored the entire system to /mnt/sysimage, making sure not to overwrite existing files. We use NetBackup, which defaults to not overwrite, but other systems are not so careful. If you accidentally overwrite the files we excluded from deletion above, your restored system will not boot.</p>
<p>Once the restore was complete, I rebooted the system and it came up pretty much as a carbon copy of the old server. Once it was up and on the network, I ran &#8220;up2date -uf&#8221; to install the latest version of the kernel and I was done.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/08/05/bare-metal-linux-restore/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Installing APC on CentOS</title>
		<link>http://spiralbound.net/2008/07/14/installing-apc-on-centos</link>
		<comments>http://spiralbound.net/2008/07/14/installing-apc-on-centos#comments</comments>
		<pubDate>Mon, 14 Jul 2008 19:06:12 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=324</guid>
		<description><![CDATA[Casey needed me to install APC cache for the Scriblio project. It&#8217;s a PECL module, and pecl install apc gives an error. Here are some great instructions for getting it all to work.
UPDATE: Casey actually has some instructions that provide a more elegant method of installing APC on CentOS or RHEL. Both methods will work, [...]]]></description>
			<content:encoded><![CDATA[<p>Casey needed me to install APC cache for the <a href="http://about.scriblio.net/">Scriblio project</a>. It&#8217;s a PECL module, and <code>pecl install apc</code> gives an error. <a href="http://www.agileapproach.com/blog-entry/howto-install-pecl-apc-cache-centos-without-xampp">Here are some great instructions</a> for getting it all to work.</p>
<p>UPDATE: Casey actually has <a href="http://maisonbisson.com/blog/post/12589/installing-php-apc-on-rhel-centos/">some instructions</a> that provide a more elegant method of installing APC on CentOS or RHEL. Both methods will work, but Casey&#8217;s instructions will get you around the package management problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/07/14/installing-apc-on-centos/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RMAN 10G NFS Mount Options</title>
		<link>http://spiralbound.net/2008/06/11/rman-10g-nfs-mount-options</link>
		<comments>http://spiralbound.net/2008/06/11/rman-10g-nfs-mount-options#comments</comments>
		<pubDate>Wed, 11 Jun 2008 15:51:18 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[10G]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[mount options]]></category>
		<category><![CDATA[mountpoint]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[oralce 10G]]></category>
		<category><![CDATA[rman]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=323</guid>
		<description><![CDATA[We backup our Oracle databases using RMAN and then write the backup pieces out to an NFS share. This has always worked well, but RMAN started complaining that the NFS share was not mounted with the correct options when we upgraded to Oracle 10G. After some poking around in the docs I finally came up [...]]]></description>
			<content:encoded><![CDATA[<p>We backup our Oracle databases using RMAN and then write the backup pieces out to an NFS share. This has always worked well, but RMAN started complaining that the NFS share was not mounted with the correct options when we upgraded to Oracle 10G. After some poking around in the docs I finally came up with a set of mount options that work.</p>
<p>Vfstab entry on a Solaria 8 box:<br />
<code>nfsserver.domain.com:/path/to/remote/mountpoint  /local-mountpoint nfs 0 yes rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768</code><br />
Manual mount on a Solaris 8 box:<br />
<code>mount -o rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768 nfsserver.domain.com:/path/to/remote/mountpoint /local-mountpoint</code></p>
<p>According to the docs, the options on a Linux box are pretty much the same, except you would add the following:<br />
<code>nfsver=3,tcp</code></p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/06/11/rman-10g-nfs-mount-options/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Linux Partitions for CLARiiON</title>
		<link>http://spiralbound.net/2008/06/09/creating-linux-partitions-for-clariion</link>
		<comments>http://spiralbound.net/2008/06/09/creating-linux-partitions-for-clariion#comments</comments>
		<pubDate>Mon, 09 Jun 2008 20:50:39 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[alignment]]></category>
		<category><![CDATA[CLARiiON]]></category>
		<category><![CDATA[disk alignment]]></category>
		<category><![CDATA[EMC]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[offset]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[partition alignment]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[sector]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=322</guid>
		<description><![CDATA[Creating a properly offset slab of disk for Linux systems on your CLARiiON is not just a matter of creating a partition using the default fdisk values. The reason for this is that disk management utilities for Intel based systems generally write 63 sectors of metadata directly at the beginning of the LUN. The addressable [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a properly offset slab of disk for Linux systems on your CLARiiON is not just a matter of creating a partition using the default <code>fdisk</code> values. The reason for this is that disk management utilities for Intel based systems generally write 63 sectors of metadata directly at the beginning of the LUN. The addressable space begins immediately after these initial sectors causing the CLARiiON to cross disks, especially when writing larger IO because it doesn&#8217;t match up with the stripe element size (usually 64k).</p>
<p>To get around this, you have to align the partition in such a way that it will start writing data on a sector that will mesh up nicely with the stripe element size. In this case, 128. Below is an example of how I create partitions on our CLARiiON for Linux systems. Check out the <a href="http://www.virtual.com/whitepapers/EMC_Best_Practices_FC.pdf">EMC Best Practices for Fibre Chanel storage</a> white paper for more detail.</p>
<pre>
/sbin/fdisk /dev/emcpowera
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 39162.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-39162, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-39162, default 39162):
Using default value 39162

Command (m for help): x

Expert command (m for help): b
Partition number (1-4): 1
New beginning of data (63-629137529, default 63): 128

Expert command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/06/09/creating-linux-partitions-for-clariion/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X11 Forwarding Broken on Solaris</title>
		<link>http://spiralbound.net/2008/06/03/x11-forwarding-broken-on-solaris</link>
		<comments>http://spiralbound.net/2008/06/03/x11-forwarding-broken-on-solaris#comments</comments>
		<pubDate>Tue, 03 Jun 2008 14:39:31 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[socfs]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[X11]]></category>
		<category><![CDATA[X11 forwarding]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=321</guid>
		<description><![CDATA[If you&#8217;re running Solaris 8 or 9 and an upgrade results in broken SSH X11 forwarding, the problem may be Sun&#8217;s socfs bug. The symptom will be SSH&#8217;s failure to set the $DISPLAY variable and an error in your system log looking something like this:

Jun  3 09:40:24 servername sshd[26432]: [ID 800057 auth.error] error: Failed [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running Solaris 8 or 9 and an upgrade results in broken SSH X11 forwarding, the problem may be <a href="http://sunsolve.sun.com/search/document.do?assetkey=1-26-101834-1">Sun&#8217;s socfs bug</a>. The symptom will be SSH&#8217;s failure to set the <code>$DISPLAY</code> variable and an error in your system log looking something like this:<br />
<br clear="left" /></p>
<p><code>Jun  3 09:40:24 servername sshd[26432]: [ID 800057 auth.error] error: Failed to allocate internet-domain X11 display socket.</code></p>
<p>To fix this, you can either install Sun&#8217;s latest socfs patch for your version of the OS, or simply force sshd into IPv4 mode by doing the following:</p>
<p>Edit you sshd_config file, adding the following:<br />
<code><br />
# IPv4 only<br />
ListenAddress 0.0.0.0<br />
</code></p>
<p>Edit your sshd startup script to issue a &#8220;-4&#8243; to sshd on start:<br />
<code><br />
case "$1" in<br />
'start')<br />
echo 'starting ssh daemon'<br />
/usr/local/sbin/sshd -4<br />
;;<br />
</code></p>
<p>Restart sshd, and that should pretty much do it&#8230; Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/06/03/x11-forwarding-broken-on-solaris/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mallard Duck FAQ</title>
		<link>http://spiralbound.net/2008/05/24/mallard-duck-faq</link>
		<comments>http://spiralbound.net/2008/05/24/mallard-duck-faq#comments</comments>
		<pubDate>Sat, 24 May 2008 21:29:18 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Et cetera]]></category>
		<category><![CDATA[bird hreabilitation]]></category>
		<category><![CDATA[duck]]></category>
		<category><![CDATA[duck care]]></category>
		<category><![CDATA[duckling care]]></category>
		<category><![CDATA[duckling faq]]></category>
		<category><![CDATA[ducklings]]></category>
		<category><![CDATA[ducks]]></category>
		<category><![CDATA[mallard]]></category>
		<category><![CDATA[wild bird]]></category>
		<category><![CDATA[winter food]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=1268</guid>
		<description><![CDATA[I get quite a few questions about ducks every year. Since I answer these questions if the form of comments, many times people don&#8217;t read all the other questions and answers and end up asking about things that have been addressed elsewhere. The recent comment threading has helped a little, but it can still be [...]]]></description>
			<content:encoded><![CDATA[<p>I get quite a few questions about ducks every year. Since I answer these questions if the form of comments, many times people don&#8217;t read all the other questions and answers and end up asking about things that have been addressed elsewhere. The recent comment threading has helped a little, but it can still be tough to wade through the hundreds of questions and answers that have accumulated over the years. In the interest of not typing answers over and over again, I have created this FAQ.</p>
<ul>
<li><a href="#Q1">Q1. How old do ducks have to be before they will fly</a></li>
<li><a href="#Q2">Q2. How can I keep my ducks safe from predators?</a></li>
<li><a href="#Q3">Q3. What should I feed my ducklings / ducks?</a></li>
<li><a href="#Q4">Q4. Will my ducks fly away for the winter?</a></li>
<li><a href="#Q5">Q5. I want to raise baby ducks and release them when they are adults. Is this possible?</a></li>
<li><a href="#Q6">Q6. I rescued a baby duck that was all by itself. What do I do now?</a></li>
<li><a href="#Q7">Q7. How can I tell if my duckling is a male or a female?</a></li>
</ul>
<h2 id="1268_answer-how-old-do-du_1" ><a name="Q1">Answer: How old do ducks have to be before they will fly</a></h2>
<p>If you have true flying mallards, they should start flying between five and six weeks of age. In most cases, however, you will have domestic Mallards which have been selectively bred over the years to be larger. These birds will never fly as you expect from a duck, but will instead stay close to the ground, avoiding any dramatic flight. They can fly a little, but generally just in a straight line and close to the ground.</p>
<h2 id="1268_how-can-i-keep-my-du_1" ><a name="Q2">How can I keep my ducks safe from predators?</a></h2>
<p>Most people who keep ducks have some form of duck yard that is fenced in with chicken wire on the sides and top. Mine is about 8 feet X 20 feet. The wire is dug into the ground so animals can’t dig under it, and it is entirely closed in on the top. Inside that, I have a duckhouse which is a 4X8 plywood box lined with hay and secured with a door that is closed at night. Even if an animal could get into the duckyard, there is absolutely no way it could invade the duckhouse. </p>
<p>You need to defend against the predators in your area. If you have mink or weasels, you need to keep things very tight since they can get through holes as small as one inch. If your biggest worry is coyotes, chicken wire protected by heavy gating is preferable. I prefer to keep my ducks close to home, so I only let them out of the duckyard when I am going to be home for extended periods. Other people simply let them run free and try to get them in at night. Below is a picture of my duckyard. Multiple coyotes and raccoons have tried without success to get in. This is because of the heavy gating combined with chicken wire.<br />
<div id="attachment_1303" class="wp-caption aligncenter" style="width: 510px"><a href="http://spiralbound.net/wp-content/uploads/2008/05/DuckHouse.jpg"><img src="http://spiralbound.net/wp-content/uploads/2008/05/DuckHouse-1024x768.jpg" alt="Duck Coup" title="DuckHouse" width="500" height="375" class="size-large wp-image-1303" /></a><p class="wp-caption-text">Duck Coup</p></div></p>
<h2 id="1268_what-should-i-feed-m_1" ><a name="Q3">What should I feed my ducklings / ducks?</a></h2>
<p>When your ducklings first hatch or arrive, the first thing you should do is get them drinking. Make sure they all know where the water is, and where to find it. This will help prevent choking once they start eating. Once you are certain that everyone knows how to drink, start them off on a high quality, unmedicated game bird starter crumble. Mash will also work, but is less desierable because it tends to clog up their bills. The most important thing is that the food is unmedicated. Ducks eat a lot more than chickens, and will overdose on medicated food. Supplementing their food with fresh greens and vegetables is always appreciated, especially if given to them directly in their water.</p>
<p>Once your ducks are three to four weeks old, you will want get them started on an unmedicated game bird pellet. Game bird maintainer feed is best, but regular poultry feed will also work provided it is not medicated. This will be their staple for life, with the exception of Spring. When hens start laying eggs, you will want to feed them layer pellets so provide them with the calcium they need to produce eggs. This will not harm the drakes, but you don&#8217;t want it to be a permanent feed. Get them back on the maintainer pellets once the laying season is over.</p>
<p>You will find your local farm and garden store to be an excellent source of high quality feeds. Feel free to take their advice as well, but do NOT let them talk you into medicated food for ducks.</p>
<h2 id="1268_will-my-ducks-fly-aw_1" ><a name="Q4">Will my ducks fly away for the winter?</a></h2>
<p>Generally, no. In the same way that your domestic dog does not behave like a coyote of wolf, your ducks are domesticated, and will not behave like a wild duck. The look to you for food and safety, and will not know how to migrate unless they have been able to join in with a flock of wild ducks during the summer months. They can tolerate very cold temperatures provided they are given shelter from the wind, liquid water to drink and plenty of high quality food. Even though Mallard ducks are typically a wild bird, those raised by humans are tame, and not able to migrate or care for themselves in the wild.</p>
<h2 id="1268_i-want-to-raise-baby_1" ><a name="Q5">I want to raise baby ducks and release them when they are adults. Is this possible?</a></h2>
<p>See <a href="#Q4">Q4</a>. Ducklings are cute, but they grow into large, messy birds. I can&#8217;t stress this enough&#8230; Do not raise ducklings and expect them to fly away or live in the wild when they are adults. If you raise ducklings be prepared to care for them for their five to eight year lifespan. Even though Mallard ducks are typically a wild bird, those raised by humans are tame, and not able to care for themselves in the wild. If you abandon them and expect them to fend for themselves, they are likely to die a very slow and horrible death. There are methods of getting ducks to integrate into the wild, but this requires the special skills and training of a wild bird rehabilitator.</p>
<h2 id="1268_i-rescued-a-baby-duc_1" ><a name="Q6">I rescued a baby duck that was all by itself. What do I do now?</a></h2>
<p>You probably heard the duckling cheeping. This noies was the duckling calling its mother. Most likely she was hidden, but close by. For future reference, you have to be very careful about rescuing baby ducks in this way. Most states have laws against taking animals from the wild, so you could get yourself into a lot of trouble. The only time &#8220;rescuing&#8221; them is appropriate is if they are very obviously not going to survive unless you do. An example of this might be a situation in which you saw the mother get hit by a car and all her ducklings are wondering around in the middle of the road.</p>
<p>That said, your heart was most certainly in the right place. You now have a baby duck, and need help with it. Let me see what I can do. The first thing I would do is search all the local bodies of water to find the mother and other ducklings. If you can, try to reunite them. If not, the absolute best thing to do would be to call a wild bird rehabilitator. They have the skills and training to raise ducklings in such a way that they can be integrated into the wild when they are adults.</p>
<h2 id="1268_answer-how-can-i-tel_1" ><a name="Q7">Answer: How can I tell if my duckling is a male or a female?</a></h2>
<p>Everyone wants to know the gender of their ducklings before they get their voice. Unfortunately, the only way to know for sure is through a procedure called &#8220;<a href="http://en.wikipedia.org/wiki/Chick_sexing#Vent_sexing">vent sexing</a>&#8221; whereby you stretch open the vent and look inside to find the duckling&#8217;s sex organs. This procedure is not only very traumatic for the duckling, but potentially dangerous as well. Without having someone who is experienced to train you, you can very easily hurt or even kill the duckling.</p>
<p>The best way for you to tell the gender of your ducklings is to wait until they are four or five weeks old when they get their voice. Drakes will develop a soft &#8220;whrack&#8221; sound, while hens will produce a loud &#8220;QWACK&#8221;. Check out the recordings below:</p>
<p><a href='http://spiralbound.net/wp-content/uploads/2008/05/mallard_hen.mp3'>Mallard Hen</a><br />
<a href='http://spiralbound.net/wp-content/uploads/2008/05/mallard_drake.mp3'>Mallard Drake</a></p>
<p>Many people make the mistake of thinking they have only hens because they all look like hens. It is important to remember that Mallard drakes don&#8217;t get their nuptial plumage (green heads, red chest, etc) until they are one year old. All juvenile Mallards look more or less like hens for their entire first year.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/05/24/mallard-duck-faq/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
<enclosure url="http://spiralbound.net/wp-content/uploads/2008/05/mallard_hen.mp3" length="186373" type="audio/mpeg" />
<enclosure url="http://spiralbound.net/wp-content/uploads/2008/05/mallard_drake.mp3" length="54230" type="audio/mpeg" />
		</item>
		<item>
		<title>Darkness Beckons</title>
		<link>http://spiralbound.net/2008/04/24/darkness-beckons</link>
		<comments>http://spiralbound.net/2008/04/24/darkness-beckons#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:37:49 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Adventures]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[Cave Country]]></category>
		<category><![CDATA[Cave Diver Training]]></category>
		<category><![CDATA[Cave Diving]]></category>
		<category><![CDATA[Florida]]></category>
		<category><![CDATA[Sheck Exley]]></category>
		<category><![CDATA[Tom Mount]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=320</guid>
		<description><![CDATA[All next week I&#8217;ll be taking a cave diving class on my CCR down in North Florida. Cave diving has been a dream of mine since reading an article about Sheck Exley&#8217;s exploration of the Nacimiento Mante cave system in Mexico. At a time in my life when I almost bought into the idea that [...]]]></description>
			<content:encoded><![CDATA[<p>All next week I&#8217;ll be taking a cave diving class on my CCR down in North Florida. Cave diving has been a dream of mine since reading an article about <a href="http://en.wikipedia.org/wiki/Sheck_Exley">Sheck Exley&#8217;s</a> exploration of the Nacimiento Mante cave system in Mexico. At a time in my life when I almost bought into the idea that divers should not venture deeper than 130 feet, there I was, reading about a man who had plunged to a world record depth of 881 feet and returned safely to the surface after 14 hours of decompression. It was as if the wool that had been pulled over my eyes by the recreational diving agencies had suddenly been removed, and I was left totally inspired. I remain inspired to this day, and I am honored to have the opportunity to learn cave diving from legendary cave and technical diver <a href="http://iantd.com/">Tom Mount</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/04/24/darkness-beckons/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMware ESX 3.5 ntpdate strangeness</title>
		<link>http://spiralbound.net/2008/04/09/vmware-esx-35-ntpdate-strangeness</link>
		<comments>http://spiralbound.net/2008/04/09/vmware-esx-35-ntpdate-strangeness#comments</comments>
		<pubDate>Wed, 09 Apr 2008 14:07:50 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[esx. esx server]]></category>
		<category><![CDATA[firewall esxcfg-firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[nptdate]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[ntpClient]]></category>
		<category><![CDATA[ntpd]]></category>
		<category><![CDATA[outbound UDP]]></category>
		<category><![CDATA[port 123]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[time servr]]></category>
		<category><![CDATA[udp]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://spiralbound.net/?p=319</guid>
		<description><![CDATA[We just noticed that the time was very far off on our sparkly new VMware EXS 3.5 server. When I went to run ntpdate to bring it up to sync, I was suprised to find that it could not make a connection to the time server because outbound UDP 123 traffic was blocked by the [...]]]></description>
			<content:encoded><![CDATA[<p>We just noticed that the time was very far off on our sparkly new VMware EXS 3.5 server. When I went to run ntpdate to bring it up to sync, I was suprised to find that it could not make a connection to the time server because outbound UDP 123 traffic was blocked by the internal firewall. Here is what I got:<br />
<br clear="let" /></p>
<p># /usr/sbin/ntpdate -u time.nist.gov<br />
 9 Apr 03:47:53 ntpdate[20245]: sendto(192.43.244.18): Operation not permitted<br />
 9 Apr 03:47:54 ntpdate[20245]: sendto(192.43.244.18): Operation not permitted<br />
 9 Apr 03:47:55 ntpdate[20245]: sendto(192.43.244.18): Operation not permitted<br />
 9 Apr 03:47:56 ntpdate[20245]: sendto(192.43.244.18): Operation not permitted<br />
 9 Apr 03:47:57 ntpdate[20245]: no server suitable for synchronization found</p>
<p>Normally I would just add a rule to the &#8220;/etc/sysconfig/iptables&#8221; file to allow traffic out on this port, but Vmware ESX server does not use iptables&#8230; It uses its own firewall, so I had to figure out how to change it. Happily, it turns out that there is a handy &#8220;esxcfg-firewall&#8221; command built just for such things.</p>
<p>Running this:<br />
/usr/sbin/esxcfg-firewall -q | grep 123</p>
<pre>12300 1803K valid-tcp-flags  tcp  --  *   *     0.0.0.0/0        0.0.0.0/0</pre>
<p>Confirmed that UDP port 123 outbound was disallowed.</p>
<p>Running this opened it up:<br />
/usr/sbin/esxcfg-firewall -e ntpClient</p>
<p>Grep out &#8220;123&#8243; again just to be sure:<br />
/usr/sbin/esxcfg-firewall -q | grep 123</p>
<pre>1  76 ACCEPT  udp  --  *    *    0.0.0.0/0      0.0.0.0/0     udp dpt:123</pre>
<p>And you can now run ntpdate to sync up the time:<br />
/usr/sbin/ntpdate -u time.nist.gov</p>
<pre>9 Apr 09:52:54 ntpdate[20319]: step time server 192.43.244.18 offset 21689.039217 sec</pre>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/04/09/vmware-esx-35-ntpdate-strangeness/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL System Configuration Changes for Oracle 10G</title>
		<link>http://spiralbound.net/2008/03/17/rhel-system-configuration-changes-for-oracle-10g</link>
		<comments>http://spiralbound.net/2008/03/17/rhel-system-configuration-changes-for-oracle-10g#comments</comments>
		<pubDate>Mon, 17 Mar 2008 17:25:12 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[10G]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[preinstall]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[requirements]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[sysctl]]></category>

		<guid isPermaLink="false">http://spiralbound.net/2008/03/17/rhel-system-configuration-changes-for-oracle-10g</guid>
		<description><![CDATA[Below is a list of RHEL system configuration changes that Oracle 10G requires before  it is installed.
First, check the following kernel parameters using the commands below:



/sbin/sysctl -a &#124; grep kernel.shmall
/sbin/sysctl -a &#124; grep kernel.shmmax
/sbin/sysctl -a &#124; grep kernel.shmmni
/sbin/sysctl -a &#124; grep kernel.sem
/sbin/sysctl -a &#124; grep fs.file-max
/sbin/sysctl -a &#124; grep net.ipv4.ip_local_port_range
/sbin/sysctl -a &#124; grep net.core.rmem_default
/sbin/sysctl [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a list of RHEL system configuration changes that Oracle 10G requires before  it is installed.</p>
<p>First, check the following kernel parameters using the commands below:<br />
<br clear="left" /><br />
<code>
<pre>
/sbin/sysctl -a | grep kernel.shmall
/sbin/sysctl -a | grep kernel.shmmax
/sbin/sysctl -a | grep kernel.shmmni
/sbin/sysctl -a | grep kernel.sem
/sbin/sysctl -a | grep fs.file-max
/sbin/sysctl -a | grep net.ipv4.ip_local_port_range
/sbin/sysctl -a | grep net.core.rmem_default
/sbin/sysctl -a | grep net.core.rmem_max
/sbin/sysctl -a | grep net.core.wmem_default
/sbin/sysctl -a | grep net.core.wmem_max
</pre>
<p></code></p>
<p>If any parameters are lower than the examples below, you will have to increase them by editing &#8220;<strong>/etc/sysctl.conf</strong>&#8221; file, adding the appropriate lines as expressed below. If the current value is higher, leave it as is.<br />
<code>
<pre>
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
</pre>
<p></code></p>
<p>Next, edit your &#8220;<strong>/etc/security/limits.conf</strong>&#8221; file, adding the following lines:<br />
<code>
<pre>
oracle          soft    nproc           2047
oracle          hard    nproc           16384
oracle          soft    nofile          1024
oracle          hard    nofile          65536
</pre>
<p></code></p>
<p>If your current &#8220;/etc/pam.d/login&#8221; file does not already contain the following line, add it:</p>
<p><code>
<pre>
session    required     pam_limits.so
</pre>
<p>Finally, add the following lines to your "<strong>/etc/profile</strong>" file:</p>
<p></code><code>
<pre>
#Tweaks for Oracle
if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
fi
</pre>
<p></code></p>
<p>These are just the basic steps I take. See the &#8220;Oracle Database Installation Guide&#8221; for more complete instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/03/17/rhel-system-configuration-changes-for-oracle-10g/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>When Mac OSX SMB Connections Fail</title>
		<link>http://spiralbound.net/2008/03/14/when-mac-osx-smb-connections-fail</link>
		<comments>http://spiralbound.net/2008/03/14/when-mac-osx-smb-connections-fail#comments</comments>
		<pubDate>Fri, 14 Mar 2008 19:02:15 +0000</pubDate>
		<dc:creator>cliff</dc:creator>
				<category><![CDATA[Data and Technology]]></category>
		<category><![CDATA[datagram pinwheel]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[name service]]></category>
		<category><![CDATA[netbios]]></category>
		<category><![CDATA[nmb]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[smbclient]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://spiralbound.net/2008/03/14/when-mac-osx-smb-connections-fail</guid>
		<description><![CDATA[Earlier today I had a problem with some Macs that could not establish SMB connections to our Windows File Server. There was no quick error, so the problem really &#8220;felt&#8221; like a firewall issue but strangely I was able to make a CLI connection to the file server using smbclient:

smbclient //server/share -U domain/username
Password:*******
Domain=[DOMAIN] OS=[Windows Server [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today I had a problem with some Macs that could not establish SMB connections to our Windows File Server. There was no quick error, so the problem really &#8220;felt&#8221; like a firewall issue but strangely I was able to make a CLI connection to the file server using smbclient:<br />
<br clear="left" /><br />
<code>smbclient //server/share -U domain/username<br />
Password:*******<br />
Domain=[DOMAIN] OS=[Windows Server x] Server=[Windows Server x]<br />
smb: \> exit<br />
</code></p>
<p>I started thinking that perhaps the Mac was doing NETBIOS name lookups and that <code>nmbd</code> might be knocking on the firewall. Turns out this was the problem. Opening up the following ports on the Windows File Server did the trick:</p>
<p>SMB uses ports:<br />
UDP 137 (NETBIOS Name Service)<br />
UDP 138 (NETBIOS Datagram Service)<br />
TCP/UDP 139 (NETBIOS Session Service)</p>
<p>WARNING: Only open these ports to your trusted networks. Statistical data indicates that UDP ports 135 &#8211; 139 and TCP port 137 &#8211; 139 are amongst the most commonly scanned ports on remote computers.</p>
]]></content:encoded>
			<wfw:commentRss>http://spiralbound.net/2008/03/14/when-mac-osx-smb-connections-fail/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
