<?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/"
	>

<channel>
	<title>North Star Labs &#187; Solution</title>
	<atom:link href="http://northstarlabs.net/category/solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://northstarlabs.net</link>
	<description>System Administration hacks and howto articles.</description>
	<lastBuildDate>Thu, 03 Jun 2010 21:52:10 +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>OpenSolaris milestone/xvm grub dom0_mem problem</title>
		<link>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/</link>
		<comments>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:53:10 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xvm]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=214</guid>
		<description><![CDATA[I&#8217;ve recently been struggling to track down a problem with my OpenSolaris xVM system.  I&#8217;m running xvm in OpenSolaris b133.  The issue is that my manual configuration of dom0_mem in /rpool/boot/grub/menu.lst seems to constantly be overwritten upon reboot.  This is a problem since I need dom0 to be clamped down to prevent [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png" alt="" title="OpenSolaris logo" width="167" height="158" class="alignright size-full wp-image-168" /></a>I&#8217;ve recently been struggling to track down a problem with my OpenSolaris xVM system.  I&#8217;m running xvm in OpenSolaris b133.  The issue is that my manual configuration of dom0_mem in /rpool/boot/grub/menu.lst seems to constantly be overwritten upon reboot.  This is a problem since I need dom0 to be clamped down to prevent Xen&#8217;s balloon feature from fighting with the ZFS arc.  In addition to this problem, there are bugs in the b132 and b133 of OpenSolaris which require the config/dom0-min-mem SMF property to be set to match dom0_mem.</p>
<p>I&#8217;ve also been running into the dom0-min-mem issues documented at <a href="http://southbrain.com/south/2009/11/sun-xvm-342-dom0-min-mem.html">My South &#8211; Sun xVM 3.4.2 available, dom0_min_mem</a>.  Pascal also mentions setting the dom0-min-mem propery, but doesn&#8217;t appear to be running into the issue I have with b132 and b133 where the property is consistently changes by the xvm-milestone service method script.</p>
<p>The problem is caused by the SMF xvm milestone ( svc:/milestone/xvm) constantly re-writing these properties and the menu.lst file.  The solution is to disable the xvm milestone and re-enable all of the xvm services manually.  This will allow you to make manual changes to the menu.lst file without the xvm milestone interfering with you.</p>
<p>OpenSolaris introduced the xvm milestone in b126 around October of 2009.  Please see <a href="http://www.opensolaris.org/jive/thread.jspa?threadID=114957&#038;tstart=0#424030">[xen-discuss] FYI: enable/disable the xVM hypervisor</a>.</p>
<p>Here is the recipe to fix the problem.  First, make a backup copy of your menu.lst file, then disable the xvm milestone, enable the other xvm SMF services, and finally restore your menu.lst file.  We do this because disabling the xvm milestone disables all of xvm, where we really just want to prevent /lib/svc/method/xvm-milestone from executing.</p>
<p>This assumes you already have xVM enabled through the use of svcadn enable milestone/xvm.<br />
<code><br />
cd /rpool/boot/grub<br />
pfexec cp -p menu.lst menu.lst.milestone-xvm.enabled<br />
pfexec svcadm disable milestone/xvm<br />
pfexec svcadm enable -r svc:/system/xvm/domains:default<br />
pfexec cp -p menu.lst menu.lst.milestone-xvm.disabled<br />
pfexec cp -p menu.lst.milestone-xvm.enabled menu.lst<br />
</code></p>
<p>Before rebooting, ensure the dom0_mem setting is something reasonable.  I find 1.5GB to be a good balance.<br />
<code><br />
title os-133-xvm1<br />
findroot (pool_rpool,0,a)<br />
bootfs rpool/ROOT/os-133-xvm1<br />
kernel$ /boot/$ISADIR/xen.gz console=vga dom0_mem=1536M dom0_vcpus_pin=false watchdog=false<br />
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS<br />
module$ /platform/i86pc/$ISADIR/boot_archive<br />
</code></p>
<p>Finally, ensure SMF properties match the dom0_mem value:<br />
<code><br />
svccfg -s svc:/milestone/xvm listprop hypervisor/dom0_mem<br />
svccfg -s xend listprop config/dom0-min-mem<br />
</code></p>
<p>If they don&#8217;t match, they may be set using:<br />
<code><br />
pfexec svccfg -s svc:/system/xvm/xend setprop config/dom0-min-mem = 1536<br />
pfexec /usr/sbin/svccfg -s svc:/milestone/xvm setprop hypervisor/dom0_mem = 1536<br />
</code></p>
<p>I plan to diagnose just why the xvm-milestone service method script is misbehaving so much and file the appropriate bug reports.  If anyone has any suggestions or ideas, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomato and AT&amp;T U-Verse Disconnects</title>
		<link>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/</link>
		<comments>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:39:31 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[uverse]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=208</guid>
		<description><![CDATA[I recently ran into an issue with my home network setup where my Linksys WRT54G router running Tomato 1.27 was disconnecting my long-running active TCP connections every 10 minutes or so.  After further investigation, this is known to be a common issue resulting from Tomato&#8217;s dhcp client performing a unicast DHCP renewal which the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2008/10/crystal-tux-rt_thumb.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/10/crystal-tux-rt_thumb.png" alt="" title="Tux" width="100" height="121" class="alignright size-full wp-image-70" /></a>I recently ran into an issue with my home network setup where my <a href="http://en.wikipedia.org/wiki/Linksys_WRT54G_series">Linksys WRT54G</a> router running <a href="http://www.polarcloud.com/firmware">Tomato</a> 1.27 was disconnecting my long-running active TCP connections every 10 minutes or so.  After further investigation, this is known to be a common issue resulting from Tomato&#8217;s dhcp client performing a unicast DHCP renewal which the firewall blocks or misroutes.</p>
<p>A number of people have published similar reports, but none of the suggested solutions appeared to work reliably for me, so I decided to diagnose, troubleshoot and resolve the issue myself.  Here&#8217;s how I solved the problem.  The notes I gathered while working on this are also located at <a href="http://docs.google.com/View?id=dgmh95gf_142f58q2cg5">2WIRE &#038; Tomato &#8211; Google Docs</a>.</p>
<p>If you&#8217;d like to stop reading and skip right to the pay off, simply add the following two lines to the firewall script which is located in the web based user interface under administration, scripts, in the firewall tab:<br />
<code><br />
iptables -t nat -I PREROUTING -p udp -i vlan1 --dport 68 --sport 67 -j ACCEPT<br />
iptables -I INPUT -p udp -i vlan1 --dport 68 --sport 67 -j ACCEPT<br />
</code></p>
<p>These firewall rules allow DHCP traffic to and from the Linksys router, regardless if the traffic is broadcast or unicast.  Please let me know if these rules are not optimal or could be improved.</p>
<p>Here are some references to other reports of this issue:</p>
<ul>
<li><a href="http://www.genmay.com/showthread.php?t=822727">ATT Uverse + Tomato firmware = connection timeouts &#038; reset every 10min (Fix inside)</a></li>
<li><a href="http://www.dslreports.com/forum/r23633546-Internet-2wire-in-dmz-plus-mode-downloadsstreaming-interrupt">2wire in dmz plus mode, downloads/streaming interrupt</a></li>
</ul>
<p>My troubleshooting process follows.</p>
<p>I can see in the logs that udhcpc attempts a renewal right up until the lease expires:<br />
<code><br />
Feb 17 15:14:26 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:16:56 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:18:11 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:18:48 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:06 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:15 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:19 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:21 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Lease lost, entering init state<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_allmulti(master, 1)<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_promiscuity(master, -1)<br />
Feb 17 15:19:22 tomato user.info kernel: device vlan1 left promiscuous mode<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending discover...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending select for 99.29.172.159...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Lease of 99.29.172.159 obtained, lease time 600<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_allmulti(master, -1)<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[12612]: exiting on receipt of SIGTERM<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: started, version 2.51 cachesize 150<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N DHCP no-scripts no-TFTP<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq-dhcp[13007]: DHCP, IP range 192.168.3.100 -- 192.168.3.149, lease time 1d<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: reading /etc/resolv.dnsmasq<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 192.168.4.254#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 8.8.4.4#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 8.8.8.8#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: read /etc/hosts - 0 addresses<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: read /etc/hosts.dnsmasq - 16 addresses<br />
Feb 17 15:19:25 tomato daemon.err miniupnpd[12649]: recv (state0): Connection reset by peer<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[12649]: received signal 15, good-bye<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[13043]: HTTP listening on port 5000<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[13043]: Listening for NAT-PMP traffic on port 5351<br />
Feb 17 15:19:27 tomato user.info kernel: device br0 left promiscuous mode<br />
Feb 17 15:19:27 tomato user.info kernel: vlan1: dev_set_allmulti(master, -1)<br />
Feb 17 15:19:27 tomato user.info kernel: vlan1: del 01:00:5e:00:00:02 mcast address from master interface<br />
</code></p>
<p>Working with the solution mentioned in the forums, I added a firewall rule to allow DHCP traffic into the router itself.  This is in the INPUT chain.  This worked well up until I enabled DMZ mode for my Xbox 360.  Once I enabled DMZ mode, the DHCP renewal issue cropped back up and I kept getting dropped.  Luckily, I have experience with netfilter and iptables so I know that DMZ is probably implemented in tomato as a catch-all PREROUTING rule to perform NAT on all unknown connections to a specified address.  I also know the PREROUTING chain is processed before the INPUT chain, so any catch-all rule there would trump my fix to allow DHCP in the INPUT chain.</p>
<p>This can be verified with <a href="http://www.tcpdump.org/">tcpdump</a> and <a href="http://www.wireshark.org/">wireshark</a>.  Luckily, there are pre-compied versions of tcpdump for the mips architecture located at <a href="http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/">http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/</a>.</p>
<p>In order to get the tcpdump binary onto the router, I had to unpack the ipkg file:<br />
<code><br />
wget http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/tcpdump_3.9.7-1_mipsel.ipk<br />
gzip -dc <tcpdump_3.9.7-1_mipsel.ipk| tar xvf -<br />
tar xvzf data.tar.gz<br />
scp opt/bin/tcpdump fw:/tmp<br />
</code></p>
<p>Finally, capturing the data is easy and since we're dealing with DHCP traffic, there's not much worry about filling up the small /tmp filesystem on the router:<br />
<code><br />
/tmp/tcpdump -w /tmp/renew.cap -v -i vlan1 -s 1500 port 67 or port 68<br />
</code></p>
<p>I copied the cap files back to my desktop and fired them up in wireshark.  Not too surprising, it's clear as day the request packets are making it out, but the acknowledgement packts coming back from the DHCP server aren't making it to udhcpc.</p>
<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Bad.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Bad.png" alt="Screen capture of wireshark displaying repeated attempts to renew the DHCP lease" title="Tomato DHCP Wireshark bad" width="994" height="923" class="aligncenter size-full wp-image-209" /></a></p>
<p>Adding the explicit rule to the PREROUTING and INPUT tables, the conversation looks much less confusing:</p>
<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Good.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Good.png" alt="" title="Tomato DHCP Wireshark good" width="994" height="923" class="aligncenter size-full wp-image-210" /></a></p>
<p>The logs tell a similar tale.  Note the lack of the full re-initialization of dnsmasq, upnpd, and the firewall script itself.<br />
<code><br />
Feb 17 15:29:31 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:29:31 tomato daemon.info udhcpc[285]: Lease of 99.29.172.159 obtained, lease time 600<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Podcasting the unix nerd way or Peapod for the win</title>
		<link>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/</link>
		<comments>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/#comments</comments>
		<pubDate>Thu, 28 May 2009 13:00:25 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Disruptive Tech]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=180</guid>
		<description><![CDATA[
I cooked dinner for myself today and sat down at the table looking forward to streaming The Daily Show or The Colbert Report on Hulu since there&#8217;s no way I&#8217;m paying $65 a month for cable TV.  As it turns out, there haven&#8217;t been any new episodes in awhile, and I like my fake [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/10/terminal.png" alt="Terminal" title="Terminal" width="64" height="64" class="size-full wp-image-69" /><br />
I cooked dinner for myself today and sat down at the table looking forward to streaming <a href="http://www.thedailyshow.com/">The Daily Show</a> or <a href="http://www.colbertnation.com/">The Colbert Report</a> on <a href="http://www.hulu.com/">Hulu</a> since there&#8217;s no way I&#8217;m paying $65 a month for cable TV.  As it turns out, there haven&#8217;t been any new episodes in awhile, and I like my fake news fresh off the wire, so I decided to catch up on my other fake news addiction; aggregated blog rss feeds.</p>
<p>I came across the <a href="http://www.ted.com/">TED</a> talk for today, which is Michell Obama.  Great speech by the way, check it out at: <a href="http://www.ted.com/talks/michelle_obama.html">http://www.ted.com/talks/michelle_obama.html</a>.  The streaming video quality left something to be desired, so I looked around and found the HD podcast URL at <a href="http://www.podcasters.tv/podcast/77862/tedtalks_hd_.html">podcasters.tv</a>.</p>
<p>This works well with iTunes, and <a href="http://www.nullriver.com/products/medialink">MediaLink</a> is able to copy the movie file from my MacBook pro, but for some reason streaming the video usually quits part way through playback with an obscure error code.</p>
<p>I have my OpenSolaris, Intel Atom based file server running on a gigabit network connected up to the Playstation 3 and HDTV using MediaLink, so I decided to look for some unix tool to download the podcast which could easily be run from cron.</p>
<p>After some searching and research into different options, I downloaded <a href="http://www.peapodpy.org.uk/">Peapod</a>, a wonderful python command line application, and gave it a whirl.</p>
<p>To my complete satisfaction, peapod runs from my home directory without requiring any piece of itself being installed into the system.  The only missing dependency I ran into was urlgrabber for python 2.4.  Luckily, I have <a href="http://peak.telecommunity.com/DevCenter/EasyInstall">easy_install</a> installed so it was a simple matter of:<br />
<code>pfexec /usr/bin/easy_install-2.4 urlgrabber</code><br />
Once urlgrabber was installed, setup of the podcast client was a breeze:<br />
<code><br />
jmccune@rain:~$ cd ~/bin<br />
jmccune@rain:~/bin/$ ln -s ../apps/peapod/peapod.py peapod<br />
jmccune@rain:~/bin/$ cd ~<br />
jmccune@rain:~$ peapod<br />
Creating user directory: /home/jmccune/.peapod<br />
Created a default configuration file in :<br />
/home/jmccune/.peapod/peapod.xml<br />
Please edit this file to contain your feeds and options.<br />
</code><br />
I commented out the sample podcast and added TED in HD.<br />
(Note: I found the feed URL by doing a &#8220;Get Info&#8221;, or clicking on the little i next to the podcast title in the podcast section of iTunes.)<br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/05/picture-2.png" alt="Podcast Get Info Image" title="Podcast Get Info Image" width="474" height="61" class="alignright size-full wp-image-181" /></p>
<p>For the title I made it &#8220;TED Talks (HD)&#8221; and for the URL, I used <a href="http://feeds.feedburner.com/TedtalksHD">http://feeds.feedburner.com/TedtalksHD</a>.</p>
<p>Finally, running peapod simply works.<br />
<code><br />
jmccune@rain:~$ peapod<br />
...Spawning thread 0 for feed url http://feeds.feedburner.com/TedtalksHD<br />
Fetching feed for TED Talks (HD)<br />
        Downloading TED Talks (HD) -- http://video.ted.com/talks/podcast/MichelleObama_2009P_480.mp4<br />
        Trackname MichelleObama_2009P_480.mp4<br />
        Savename /export/dozer/podcasts/jmccune/TED Talks (HD)/MichelleObama_2009P_480.mp4<br />
        Mime-type video/mp4<br />
</code></p>
<p>This will be added to cron to run every day a few hours before I get home from work, and <a href="http://mediatomb.cc/">MediaTomb</a> should pickup the new content.</p>
<p>And now to figure out how to manually kick off a MediaTomb scan of the folder once downloading is complete.</p>
<p>Here are some decent feeds I&#8217;ve found so far:<br />
<code><br />
peapod --addnew=http://www.hbo.com/podcasts/billmaher/podcast.xml --title="Bill Maher"<br />
</code></p>
<p>Please post more video feed URL&#8217;s, especially 720p and higher, in the comments if you have some good video podcasts worth watching on my TV.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://video.ted.com/talks/podcast/MichelleObama_2009P_480.mp4" length="197619597" type="video/mp4" />
		</item>
		<item>
		<title>Screenshot Highlights with the Gimp</title>
		<link>http://northstarlabs.net/2008/10/24/screenshot-highlights-with-the-gimp/</link>
		<comments>http://northstarlabs.net/2008/10/24/screenshot-highlights-with-the-gimp/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 20:45:00 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solution]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=76</guid>
		<description><![CDATA[Here&#8217;s my preferred method of drawing attention to screen elements in technical documentation.
Direct Link: Screen Shot Highlights
iPhone / iPod Direct Video Link
 
Procedure:

Copy window to clipboard with ALT+PrintScreen
Paste as a new image into the Gimp with CTRL+SHIFT+V
Use the rectangular selection tool to select the regions you want to draw attention to.
Feather the selection for effect.
Create [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my preferred method of drawing attention to screen elements in technical documentation.</p>
<p>Direct Link: <a href="http://northstarlabs.net/uploads/2008/10/ScreenShotHighlights.mp4">Screen Shot Highlights</a></p>
<p id="preview"><a href="/uploads/2008/10/ScreenShotHighlights_iPhone.mp4">iPhone / iPod Direct Video Link</a></p>
<p><script src="/uploads/mediaplayer/swfobject.js" type="text/javascript"></script> <script type="text/javascript"><!--
var s1 = new SWFObject('/uploads/mediaplayer/player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=/uploads/2008/10/ScreenShotHighlights.mp4');
s1.write('preview');
// --></script></p>
<p>Procedure:</p>
<ol>
<li>Copy window to clipboard with ALT+PrintScreen</li>
<li>Paste as a new image into the Gimp with CTRL+SHIFT+V</li>
<li>Use the rectangular selection tool to select the regions you want to draw attention to.</li>
<li>Feather the selection for effect.</li>
<li>Create a drop shadow if desired.</li>
<li>Insert a new, totally black layer named mask.</li>
<li>Keeping the selection in place, select the mask layer and delete the black pixels, creating a &#8220;hole&#8221; through the layer to the underlying image of the window.</li>
<li>Set the mask layer&#8217;s transparency appropriately.</li>
<li>Save the image, flattening the layers.</li>
<li>Insert the image into your word processor of choice.</li>
</ol>
<p>The embedded screen cast was created with <a title="CamStudio" href="http://camstudio.org/">CamStudio</a>, by converting the resulting AVI into an H.264 AVC MP4 file using the SUPER ffmpeg/x264 front end by <a title="eRightSoft" href="http://www.erightsoft.com/SUPER.html">eRightSoft</a>.  The embedded player is <a title="JW FLV Media Player" href="http://www.jeroenwijering.com/">JW FLV Media Player</a>.  All tools are open source software.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2008/10/24/screenshot-highlights-with-the-gimp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://northstarlabs.net/uploads/2008/10/ScreenShotHighlights.mp4" length="7838604" type="video/mp4" />
		</item>
		<item>
		<title>LDAP Berkeley Database Recovery</title>
		<link>http://northstarlabs.net/2008/02/06/ldap-berkeley-database-recovery/</link>
		<comments>http://northstarlabs.net/2008/02/06/ldap-berkeley-database-recovery/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 21:04:30 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solution]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[bdb]]></category>
		<category><![CDATA[corrupt]]></category>
		<category><![CDATA[corrupted]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[openldap]]></category>
		<category><![CDATA[recover]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[slapd]]></category>
		<category><![CDATA[sleepycat]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2008/02/06/ldap-berkeley-database-recovery/</guid>
		<description><![CDATA[We experienced a power outage today, caused by someone tripping the emergency power off relay to our server room.  Unfortunately, emergency power off really means &#8220;power off&#8221; so our UPS did the right thing and completely cut power rather than fall back to battery backup.
It was a little bit stressful getting everything back up, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2007/12/directory.png" alt="Directory" class="right" align="right" height="96" width="96" />We experienced a power outage today, caused by someone tripping the emergency power off relay to our server room.  Unfortunately, emergency power off really means &#8220;power off&#8221; so our UPS did the right thing and completely cut power rather than fall back to battery backup.</p>
<p>It was a little bit stressful getting everything back up, but everything appears to be working fine now.</p>
<p>The one serious error message we ran into is the following, when bring our OpenLDAP server back up:</p>
<pre class="code">
[root@ldap ldap]# /etc/init.d/ldap restart
Stopping slapd:                                            [FAILED]
Checking configuration files for slapd:  bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
bdb(dc=math,dc=ohio-state,dc=edu): PANIC: fatal region error detected; run recovery
bdb_db_open: Database cannot be opened, err -30974. Restore from backup!
bdb(dc=math,dc=ohio-state,dc=edu): DB_ENV-&gt;lock_id_free interface requires an environment configured for the locking subsystem
backend_startup_one: bi_db_open failed! (-30974)
slap_startup failed (test would succeed using the -u switch)
                                                           [FAILED]
stale lock files may be present in /var/lib/ldap           [WARNING]</pre>
<p>Fortunately, the solution to this problem is easy enough.  Just run slapd_db_recover -v in the Berkeley Database directory.</p>
<pre class="code">
cd /var/lib/ldap
slapd_db_recover -v

Finding last valid log LSN: file: 4 offset 4818337
Recovery starting from [4][4815752]
Recovery complete at Wed Feb  6 15:33:42 2008
Maximum transaction ID 80000ba7 Recovery checkpoint [4][4818337]</pre>
<p>After that, slapd should startup just fine.</p>
<pre class="code">
[root@ldap lib]# /etc/init.d/ldap start
Checking configuration files for slapd:  bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
config file testing succeeded
                                                           [  OK  ]
Starting slapd:                                            [  OK  ]</pre>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2008/02/06/ldap-berkeley-database-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nifty Work Around for File Size Limitations of FAT32</title>
		<link>http://northstarlabs.net/2008/01/11/nifty-work-around-for-file-size-limitations-of-fat32/</link>
		<comments>http://northstarlabs.net/2008/01/11/nifty-work-around-for-file-size-limitations-of-fat32/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 21:37:10 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[2gig]]></category>
		<category><![CDATA[big]]></category>
		<category><![CDATA[dmg]]></category>
		<category><![CDATA[encrypted]]></category>
		<category><![CDATA[fat32]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[large]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[limits]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2008/01/11/nifty-work-around-for-file-size-limitations-of-fat32/</guid>
		<description><![CDATA[I picked up a 250 Gig Western Digital Passport portable hard drive to keep a backup copy of my file vault home directory, among other things while I travel next week, in the somewhat-likely event something disastrous happens to my laptop.
I really like how small and portable the drive is, along with it&#8217;s USB bus [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2007/11/filevault.png" align=right width="96" height="96" />I picked up a 250 Gig Western Digital Passport portable hard drive to keep a backup copy of my file vault home directory, among other things while I travel next week, in the somewhat-likely event something disastrous happens to my laptop.</p>
<p>I really like how small and portable the drive is, along with it&#8217;s USB bus powered interface.  There&#8217;s no futzing around with wall warts and power supplies, it truly is plug and play.</p>
<p>I also really like that my PS3 recognizes the device, since I&#8217;ve transfered my entire iTunes library over to it (Huzzah, Option-Starting iTunes to select a library!).  All of my H.264 AVC movies play right off of the drive on my Playstation 3 as well, which is really nice and convenient.</p>
<p>Copying some rather large files, specifically a 7 gig ASR Golden Master image of my demonstration PowerBook leopard OS, and the actual Leopard ISO image itself, I ran into a file size limitation of FAT32.  Of course, I knew FAT32 didn&#8217;t support large files, but I&#8217;ve just been spoiled in recent years by things like this &#8220;just working.&#8221;</p>
<p>I didn&#8217;t want to reformat the small drive, because that would surely mean my Playstation 3 would no longer recognize the file system, so instead I opted to create a sparsebundle HFS+ formatted disk image, exactly like I would do manually for <a href="http://northstarlabs.net/2007/11/01/manually-migrate-tiger-filevault-sparseimage-to-leopard-filevault-sparsebundle/" title="Permanent Link to Manually Migrate Tiger FileVault sparseimage to Leopard FileVault sparsebundle">Leopard File Vault</a> images.</p>
<p>The end result is that each &#8220;band&#8221; in the sparse bundle image will satisfy the limitations of FAT32, while providing a nice, secure and robust HFS+J file system to store all of the &#8220;big files&#8221; I need to carry with me.</p>
<p>Long live robust Disk Imaging Frameworks.</p>
<p>The only catch is that these files are only accessible on Mac OS X Leopard machines now, but that&#8217;s not a huge problem for me.  Especially traveling to the MacWorld conference.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2008/01/11/nifty-work-around-for-file-size-limitations-of-fat32/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TelePort NFS Home Directory</title>
		<link>http://northstarlabs.net/2008/01/11/teleport-nfs-home-directory/</link>
		<comments>http://northstarlabs.net/2008/01/11/teleport-nfs-home-directory/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 20:59:27 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[keychain]]></category>
		<category><![CDATA[preference pane]]></category>
		<category><![CDATA[teleport]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2008/01/11/teleport-nfs-home-directory/</guid>
		<description><![CDATA[I usually compute with n-tupel of Mac computers sitting in front of me.  I have a strong aversion to clutter, despite the state of my apartment, and the power of Teleport providing seamless, encrypted keyboard sharing, a-la so called &#8220;soft KVM&#8221; utilities is a killer app for me.
Alas, I&#8217;ve found that Teleport does not [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/01/teleport.png" alt="Teleport" height="96" width="96" class="right" align="right">I usually compute with n-tupel of Mac computers sitting in front of me.  I have a strong aversion to clutter, despite the state of my apartment, and the power of Teleport providing seamless, encrypted keyboard sharing, a-la so called &#8220;soft KVM&#8221; utilities is a killer app for me.</p>
<p>Alas, I&#8217;ve found that <a href="http://abyssoft.com/software/teleport/">Teleport</a> does not work as expected when operating from an NFS Mounted Home Directory.</p>
<p>Trying to connect to my Laptop, nutburner (Yes, nutburner is the given name of my first generation MacBook Pro), I received the following error.</p>
<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/01/teleport-keychain-access.png" alt="Teleport Keychain Access" height="185" width="501" align="center" class="center"></p>
<p>UNKNOWN wants permission to sign using key &#8220;privateKey&#8221; in your keychain.  Do you want to allow this?</p>
<p>On a working host, e.g. two machines with file vault home folders, that &#8220;UNKNOWN&#8221; will actually display as &#8220;teleportd&#8221;.  I suspect whatever logic Apple is using to verify the authenticity of program binaries doesn&#8217;t work as expected over NFS.</p>
<p>After clicking &#8220;Always Allow&#8221; twice, I get the following error:</p>
<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/01/teleport-connection-error.png" alt="Teleport Connection Error" height="156" width="420" align="center" class="center"></p>
<p>I synchronize my login.keychain, so the private key and certificate are identical between these two hosts, leading me to believe a certificate algorithm mismatch is unlikely.</p>
<p>In any event, my solution was to simply redirect the teleport.prefPane to a local HFS+ volume using a symbolic link.</p>
<pre class="code">
# /Scratch is a local HFS+ volume.
mkdir -p /Scratch/mccune/Library/PreferencePanes
mv ~/Library/PreferencePanes/teleport.prefPane \
  /Scratch/mccune/Library/PreferencePanes/
ln -s /Scratch/mccune/Library/PreferencePanes/teleport.prefPane \
  ~/Library/PreferencePanes/teleport.prefPane
</pre>
<p>Once teleport.prefPane resided on a local HFS volume, everything &#8220;just worked&#8221; perfectly.</p>
<p>As an alternative, you could deploy the prefPane to /Library/PreferencePanes to make teleport available to all users of the system.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2008/01/11/teleport-nfs-home-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache and strace /usr/sbin/httpd</title>
		<link>http://northstarlabs.net/2007/12/12/apache-and-strace-usrsbinhttpd/</link>
		<comments>http://northstarlabs.net/2007/12/12/apache-and-strace-usrsbinhttpd/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 18:18:42 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[strace]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2007/12/12/apache-and-strace-usrsbinhttpd/</guid>
		<description><![CDATA[Working with Apache today, I ran into an issue where the process would appear to start OK, returning a zero exit status, yet strace was showing a SIGCHLD being caught.
Needless to say, the server wasn&#8217;t actually running for any length of time, but I found the following strace command immensely helpful in figuring out the [...]]]></description>
			<content:encoded><![CDATA[<p><img align="right" class="right" width="96" src="http://northstarlabs.net/blog/wp-content/uploads/2007/08/crystal-tux-rt_thumb.png" alt="Tux" height="116" />Working with Apache today, I ran into an issue where the process would appear to start OK, returning a zero exit status, yet strace was showing a SIGCHLD being caught.</p>
<p>Needless to say, the server wasn&#8217;t actually running for any length of time, but I found the following strace command immensely helpful in figuring out the problem.</p>
<pre class="code">
  strace -o /tmp/httpd.strace -ff /usr/sbin/httpd
</pre>
<p>Because apache spawns a number of children, strace with -ff attaches to each child and recorded the system calls in /tmp/httpd.strace.$PID</p>
<p>As it turns out, I was receiving the following error in the child processes:</p>
<pre class="code">
    bind(5, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("0.0.0.0")}, 16) \
    = -1 EADDRINUSE (Address already in use)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2007/12/12/apache-and-strace-usrsbinhttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplify Media &#8211; Rockin&#8217; on the Road</title>
		<link>http://northstarlabs.net/2007/11/09/simplify-media-rockin-on-the-road/</link>
		<comments>http://northstarlabs.net/2007/11/09/simplify-media-rockin-on-the-road/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 14:55:06 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Disruptive Tech]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2007/11/09/simplify-media-rockin-on-the-road/</guid>
		<description><![CDATA[As a system administrator with a very large music collection, I&#8217;ve always been mildly irritated at the difficulty accessing my &#8220;master&#8221; music library while away from home.
Enter Simply Media a free, small application which does just as the name promises.
My iTunes library back home just shows up in my shared iTunes listing, regardless of where [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2007/11/simplify-media-icon.png" alt="Simplify Media Icon" height="96" width="96" align="right" class="right"/>As a system administrator with a very large music collection, I&#8217;ve always been mildly irritated at the difficulty accessing my &#8220;master&#8221; music library while away from home.</p>
<p>Enter <a href="http://www.simplifymedia.com/">Simply Media</a> a free, small application which does just as the name promises.</p>
<p>My iTunes library back home just shows up in my shared iTunes listing, regardless of where I am.  No firewall hackery, nothing to configure, it just works, and works well.</p>
<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2007/11/simplify-media.png" alt="Simplify Media" height="277" width="350" class="center"/></p>
<p>The iTunes integration is fantastic.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2007/11/09/simplify-media-rockin-on-the-road/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Large Backups with Bacula: /tmp Overfilling</title>
		<link>http://northstarlabs.net/2007/11/08/large-backups-with-bacula-tmp-overfilling/</link>
		<comments>http://northstarlabs.net/2007/11/08/large-backups-with-bacula-tmp-overfilling/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 14:53:22 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solution]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/2007/11/08/large-backups-with-bacula-tmp-overfilling/</guid>
		<description><![CDATA[I&#8217;ve run into several problems backing up our central file servers with Bacula, mostly centered around the sheer number of files (~6 million) a single job must process and store into the MySQL catalog.
I ran into the following error last night, attempting to back up the entire 6TB array as a single job:

  07-Nov [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve run into several problems backing up our central file servers with <a href="http://www.bacula.org/">Bacula</a>, mostly centered around the sheer number of files (~6 million) a single job must process and store into the MySQL catalog.</p>
<p>I ran into the following error last night, attempting to back up the entire 6TB array as a single job:</p>
<pre class="code">
  07-Nov 18:10 backup-dir JobId 3: Fatal error: sql_create.c:732 sql_create.c:732 insert INSERT INTO batch VALUES (1580771,3,'/Volumes/0/export/users/kodama/Desktop/GAP/gap4r4/small/small2/','sml800.z','OAAAD DkeW IGk B ih C+ A KZn BAA BY BHLtzL 1sNQO BFnqZZ A A C','0') failed:
  Incorrect key file for table '/tmp/#sql2459_94_0.MYI'; try to repair it
</pre>
<p>After doing <a href="http://bugs.mysql.com/bug.php?id=12291">a bit of research</a>, I&#8217;ve concluded the /tmp volume, which is only a 256M tmpfs partition is filling to capacity before the job is able to complete.</p>
<p>Restarting the job this morning confirms MySQL is spooling data into /tmp.</p>
<pre class="code">
  [root@backup tmp]# ls -l /tmp/
  total 332
  -rw-rw---- 1 mysql mysql 319276 Nov  8 09:48 #sql511e_3_0.MYD
  -rw-rw---- 1 mysql mysql   1024 Nov  8 09:48 #sql511e_3_0.MYI
  -rw-rw---- 1 mysql mysql   8722 Nov  8 09:48 #sql511e_3_0.frm
</pre>
<p>My solution for the time being is to reconfigure mysql to use /var/tmp for it&#8217;s temporary storage, rather than /tmp.  This places the data on a much larger file system.</p>
<pre class="code">
# /etc/my.cnf
[mysqld]
tmpdir=/var/tmp
</pre>
<p>I&#8217;m also planning to split the job into smaller jobs, using regular expressions to include only pieces of the home directory tree at a time.  This will keep the number of files each job needs to handle under a reasonable threshold.</p>
]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2007/11/08/large-backups-with-bacula-tmp-overfilling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
