<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2enclosuresfull.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Sambal</title>
	
	<link>http://www.sambal.org</link>
	<description>Self-employment + software = fun, bitter</description>
	<pubDate>Sat, 04 Oct 2008 15:37:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<itunes:explicit>no</itunes:explicit><itunes:subtitle>Self-employment + software = fun, bitter</itunes:subtitle><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Sambal" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>STL lower_bound: set vs. list</title>
		<link>http://www.sambal.org/2008-10/stl-lower_bound-set-vs-list/</link>
		<comments>http://www.sambal.org/2008-10/stl-lower_bound-set-vs-list/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 04:33:36 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=724</guid>
		<description><![CDATA[Commentor Paul asks why we would use a list instead of a set, since a set has an efficient lower_bound() method and has cheaper insertion/deletion than a sorted vector; set insertion also preserves iterators.
First, recall the the lower_bound() on a list problem is purely a hypothetical, and I&#8217;m not using this data structure anywhere.  The [...]]]></description>
			<content:encoded><![CDATA[<p>Commentor Paul asks <a href="http://www.sambal.org/2008-07/use-stl-lower_bound-even-though-its-slower/#comment-77">why we would use a list instead of a set</a>, since a set has an efficient lower_bound() method and has cheaper insertion/deletion than a sorted vector; set insertion also preserves iterators.</p>
<p>First, recall the the lower_bound() on a list problem is purely a hypothetical, and I&#8217;m not using this data structure anywhere.  The point of the series is that the STL lower_bound() algorithm is suboptimal when used with bidirectional and forward iterators, not that you should use lists to store sorted data.</p>
<p>But to answer Paul&#8217;s question: they&#8217;re different data structures.  I would certainly choose a set if it was the most appropriate data structure for the job: if there were many random access insertions and deletions, only one instance of each key, and the data not dense enough to justify an array or a bit vector.  But a set is not a drop-in replacement for a list.</p>
<p>STL&#8217;s set is implemented as a red-black tree.  So the cost of insertion is O( lg N ) to find the insertion point, and potentially another O( lg N ) to rebalance the tree.  With a list, in contrast, it costs O( N ) to find the insertion point and O( 1 ) for each element inserted.</p>
<p>Now you&#8217;d have to make a heck of a lot of insertions at one point to make that pay off in the list&#8217;s favor.  In general.  </p>
<p>But the situation changes if the data structure is a concurrent shared resource.  With a set, you have to lock the whole data structure for an insertion, because the tree rebalancing operation can touch quite a few nodes and the tree is in an inconsistent state until the rebalance completes.</p>
<p>But with a list, you can use <a href="http://www.ddj.com/hpc-high-performance-computing/208801371?pgno=2">hand-over-hand locking</a> during the search and also during the insertion, locking only the two nodes where the insertion occurs.  So a list offers better behavior with multiple concurrent accesses.</p>
<p>Finally, even if you use a set, you can&#8217;t take advantage of its efficient lower_bound method while using generic programming.  You&#8217;d have to know the data structure was a set.  In code:</p>
<pre><code class=prettyprint>
set s&lt;int&gt;;
list l&lt;int&gt;;
// populate data structures
s.lower_bound( 5 );  // this is fast
lower_bound( l.begin(), l.end(), 5 ); // this is slow

// this is slow too because it can't use s.lower_bound()
lower_bound( s.begin(), s.end(), 5 );
</code></pre>
<p>Obviously if you&#8217;re in the scope that s is declared, you know it&#8217;s a set.  But if you have a generic routine that takes an iterator pair and then uses lower_bound(), you don&#8217;t get any benefit from using a set.</p>
<p>In a dynamic language such as Ruby, it doesn&#8217;t matter how the lower_bound method gets called: it ultimately would dispatch to the class-specific one if it existed.  But in C++ / STL generic programming, where you would use the lower_bound() template function defined in &lt;algorithm&gt;, all STL knows is what type of iterator it is, by looking at the iterator tag.  Both list and set have bidirectional iterators.</p>
<p>I&#8217;m not even sure it would work to try to provide specializations for lower_bound specific to sets &#8211;</p>
<pre><code class=prettyprint>template&lt; class T &gt;
set&lt;T&gt;::iterator lower_bound(
  set&lt;T&gt;::iterator first, set&lt;T&gt;::iterator last, const T&amp; v )
{// and so on, for set&lt;T&gt;::const_iterator
// and don't forget multiset and reverse iterators too!
</code></pre>
<p>Because to my relatively untutored C++ eyes, that looks like a partial template specialization of a function, and those aren&#8217;t allowed.  And even if they were, how do you get from the iterator to the parent object in order to call its lower_bound() method?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-10/stl-lower_bound-set-vs-list/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Snapback2: –link-dest arg does not exist: ../hourly.1</title>
		<link>http://www.sambal.org/2008-09/snapback2-link-dest-arg-does-not-exist-hourly1/</link>
		<comments>http://www.sambal.org/2008-09/snapback2-link-dest-arg-does-not-exist-hourly1/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 04:01:15 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=723</guid>
		<description><![CDATA[I added a new host to snapback a while ago and started getting these horrible messages mailed to me by cron every six hours.  The entire body of the email was:
&#8211;link-dest arg does not exist: ../hourly.1
I finally fixed it today.
The problem?  Snapback was backing up an empty directory.  One solution would be to remove the directory [...]]]></description>
			<content:encoded><![CDATA[<p>I added a new host to snapback a while ago and started getting these horrible messages mailed to me by cron every six hours.  The entire body of the email was:</p>
<blockquote><p>&#8211;<span class="nfakPe">link</span>-<span class="nfakPe">dest</span> arg does not exist: ../hourly.1</p></blockquote>
<p>I finally fixed it today.</p>
<p>The problem?  Snapback was backing up an empty directory.  One solution would be to remove the directory from snapback.  I chose to instead create an empty file ($ touch empty) in the directory because I don&#8217;t want to have to come back and re-set up snapback for that directory if it ever gets populated.</p>
<p>I&#8217;ll see if its fixed in four more hours.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-09/snapback2-link-dest-arg-does-not-exist-hourly1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>You’ve been coding for the Intel platform too long when…</title>
		<link>http://www.sambal.org/2008-09/youve-been-coding-for-the-intel-platform-too-long-when/</link>
		<comments>http://www.sambal.org/2008-09/youve-been-coding-for-the-intel-platform-too-long-when/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 00:15:20 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=722</guid>
		<description><![CDATA[You know you&#8217;ve been coding for the Intel platform too long when &#8220;eax&#8221; looks more like a word than &#8220;wax&#8221;.
I typed &#8220;wax&#8221;; it looked wrong, so I semi-consciously backspaced out and retyped it as &#8220;eax&#8221;.  Which looked more correct.  Then my conscious mind realized I really did want &#8220;wax&#8221; so I changed it [...]]]></description>
			<content:encoded><![CDATA[<p>You know you&#8217;ve been coding for the Intel platform too long when &#8220;eax&#8221; looks more like a word than &#8220;wax&#8221;.</p>
<p>I typed &#8220;wax&#8221;; it looked wrong, so I semi-consciously backspaced out and retyped it as &#8220;eax&#8221;.  Which looked more correct.  Then my conscious mind realized I really did want &#8220;wax&#8221; so I changed it back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-09/youve-been-coding-for-the-intel-platform-too-long-when/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Problems with Redundant dhcpd/dns (part 2)</title>
		<link>http://www.sambal.org/2008-08/problems-with-redundant-dhcpddns-part-2/</link>
		<comments>http://www.sambal.org/2008-08/problems-with-redundant-dhcpddns-part-2/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 18:15:17 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=721</guid>
		<description><![CDATA[As I mentioned last time, I ran into some challengesincredibly annoying problems setting up a dhcpd failover server.
1. Dhcpd doesn&#8217;t record full data for foreign leases.
At first I thought it would be enough to run dhcpd with a failover peer and use djb_update.pl to create the host list for tinydns.  But then I discovered that [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned last time, I ran into some <span style="text-decoration: line-through;">challenges</span>incredibly annoying problems setting up a dhcpd failover server.</p>
<p>1. Dhcpd doesn&#8217;t record full data for foreign leases.</p>
<p>At first I thought it would be enough to run dhcpd with a failover peer and use djb_update.pl to create the host list for tinydns.  But then I discovered that when the dhcpd master grants a lease, it communicates to the dhcpd slave.  But this communication apparently consists only of the slave&#8217;s IP address and ethernet address, and not its hostname.  So it&#8217;s not possible to rely on the dhcpd failover protocol to keep the name-IP mappings synchronized on the dhcpd servers.</p>
<p>2. Dhcpd servers race to respond.</p>
<p>Like little virtual fire engines and paramedics, the dhcpd servers race to answer a poor IPless host&#8217;s cry for help.  It took me a while to see this one because taurus and draco were initially on the same segment.  Then we did a server move and got hung up halfway, with taurus in its new location but draco still in the old one.  Then all of a suddent a bunch of hosts disappeared from dns.</p>
<p>The problem appears to be that the nearest dhcpd server usually wins in assigning IP addresses, and the way dhcpd failover is implemented is a lot more like load-balancing than I would have thought.  In my opinion, the failover peer should be quiet unless its peer is down (which it is aware of as part of the failover protocol).  In any case, the failover server is live and ready to fill requests, and if it happens to be the nearest server to a given host, it gives out the IP address.</p>
<p>So it&#8217;s not enough to be able to get a host list from the failover peer if the main server is down.  At any time, some IPs may be assigned from the master host and some from the failover host.</p>
<p>3. DHcpd doesn&#8217;t put hardcoded hosts into its leases file.</p>
<p>This is arguably not a design defect in dhcpd &#8212; rather, I can&#8217;t imagine that this was an accident &#8212; but it sure is annoying.  When you assign a permanent IP to a host using this syntax:</p>
<p>host foobar { hardware ethernet de:ad:be:ef:ca:fe; fixed-address 10.1.1.15; }</p>
<p>then the host suddenly disappears from DNS.</p>
<p>So I managed to briefly lose taurus, my secondary dhcpd server.  Because taurus would be the backup source of internal DNS data, I decided to fix its IP address.  (dnscache can&#8217;t accept hostnames in its servers file, for the obvious reason.)  But I neglected to add an entry for taurus in the static host file, and when the old lease expired, dhcpd did not record a new one.  Even though taurus was still getting all its host configuration information from dhcp, including IP address, routing, name servers, etc., dhcpd did not consider it to have a lease since its address could not expire.  Since taurus did not have a valid lease in dhcpd.leases, the djb_update script didn&#8217;t put an entry for taurus into the dhcp file.</p>
<p>The most annoying thing about this one is that in order to fix the IP address of a host it&#8217;s not enough to change the dhcpd.conf; you also better remember to change the static host table.  And the penalty for error is a delayed failure, because the host won&#8217;t disappear from DNS until the old lease expires.</p>
<p>4. djb_update lets the last live lease it reads win.</p>
<p>This is a reasonable design decision since djb_update expects to run on one servers dhcpd.leases file, not on the concatenation of two servers&#8217; files.  But it means that if a host gets a lease from the failover server and then the master recovers, if we manually renew the lease and now get a response from the master, there appear to be two live leases for the host.  (I&#8217;d call that a bug in the dhcp protocol, that the host can abandon the lease without notifying the failover server.)</p>
<p>Sinec djb_update doesn&#8217;t expect that to happen, it just runs through the leases file making a name -&gt; IP hash using all the valid leases.  If it sees two valid leases for the same name, it uses whichever lease it sees last.  That means that order matters when concatenating the lease files.</p>
<p>A more robust solution would be to honor the most recently written active lease; to add another condition when updating the lease data that the start time of the lease under consideration must be greater than the start time of the saved lease.</p>
<p>This is one of those problems where it takes more time to complain about it than to fix it.  I plan to hack this into my already-hacked-up djb_update.pl script.</p>
<p>Next time: the file layout, Makefiles, scripts, duct tape and baling wire necssary to make this thing work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-08/problems-with-redundant-dhcpddns-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Redundant DHCPd and Tinydns Setup (part 1)</title>
		<link>http://www.sambal.org/2008-08/redundant-dhcpd-and-tinydns-setup-part-1/</link>
		<comments>http://www.sambal.org/2008-08/redundant-dhcpd-and-tinydns-setup-part-1/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 14:26:27 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=716</guid>
		<description><![CDATA[Here are the before and after pictures.  We used to have two independent single points of failure.

If boris was down, nobody could get an IP address, and internal name resolution didn&#8217;t work because the cache couldn&#8217;t see the tinydns server (on boris) that is authoritative for the internal network.
If draco the firewall was down, [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the before and after pictures.  We used to have two independent single points of failure.</p>
<p><a href="http://www.sambal.org/wp-content/uploads/2008/08/olddhcpdbig.png"><img class="alignnone size-full wp-image-717" title="olddhcpd" src="http://www.sambal.org/wp-content/uploads/2008/08/olddhcpd.png" alt="Old DHCPd Setup" width="500" height="319" /></a></p>
<p>If boris was down, nobody could get an IP address, and internal name resolution didn&#8217;t work because the cache couldn&#8217;t see the tinydns server (on boris) that is authoritative for the internal network.</p>
<p>If draco the firewall was down, not only could nobody connect to the internet (after all, that <em>is </em>the point of having a firewall), and external name resolution didn&#8217;t work.  But internal name resolution didn&#8217;t work either, because the single caching name server (dnscache) lived on draco.</p>
<p>That&#8217;s a result of the &#8220;djb way,&#8221; where name servers are separate from caches.  Tinydns won&#8217;t answer queries for a domain which it&#8217;s not authoritative over, and dnscache won&#8217;t ever give an authoritative answer, but only process requests from clients, get answers from authoritative servers, and cache the results.</p>
<p><a href="http://www.sambal.org/wp-content/uploads/2008/08/newdhcpdbig.png"><img class="alignnone size-full wp-image-718" title="newdhcpd" src="http://www.sambal.org/wp-content/uploads/2008/08/newdhcpd.png" alt="New dhcpd setup" width="500" height="376" /></a></p>
<p>In the new setup, there are no single points of failure for dhcp or name service.  (There&#8217;s still a single firewall host.)  We moved all functions off of boris, which is slated for decommissioning.</p>
<p>Draco keeps a dnscache, since it has easy access to outside name servers.  It picks up a dhcpd server and associated tinydns.  I made it the dhcpd master, because it&#8217;s the least-frequently-rebooted server.</p>
<p>Since dnscache and tinydns use the same port (53/udp, the domain service), I had to configure an ethernet alias on draco to serve the tinydns off of.  (I couldn&#8217;t use localhost, because it needs to be visible to the other dnscache server if the other tinydns server is down.)</p>
<p>Taurus, a new machine still figuring out its identity (external web/intranet/wiki/login/database/&#8230;?), gets the dhcpd slave server and an associated tinydns.  At first I thought it made sense to separate the dhcpd from the tinydns server, but eventually I recognized that if one dhcpd server was down, it would not do any good to be trying to fetch its dhcpd.leases file to build a dns table.  The functions are so closely associated &#8212; dhcp gives named hosts an IP address while tinydns reports what the IP address is.</p>
<p>Scorpio, the backup server (BackupPC/snapback), picks up an additional function as an internal name cache.  That was a last-minute decision when I realized I needed a second name cache, and I&#8217;m not entirely happy about it.  Since scorpio carries backup data, I&#8217;d like to be able to unplug it and take it offsite (e.g., if I&#8217;m reconstructing a crashed machine from its backups) without disrupting the network.  So that&#8217;s going to have to change.  I suppose there&#8217;s no deep reason why I can&#8217;t put the dnscache on taurus, but I&#8217;d have to configure another alias&#8230;</p>
<p>That&#8217;s the overall layout for redundant dhcpd and internal name service using tinydns and dnscache.  Next post: &#8220;challenges&#8221; (aka annoying problems) I encountered making this work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-08/redundant-dhcpd-and-tinydns-setup-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thought For Today</title>
		<link>http://www.sambal.org/2008-08/thought-for-today-2/</link>
		<comments>http://www.sambal.org/2008-08/thought-for-today-2/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 04:32:27 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[programming koan]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=714</guid>
		<description><![CDATA[A compiler warning tells you where you are probably making a mistake.  Changing the code to eliminate the warning may not remove the mistake.
]]></description>
			<content:encoded><![CDATA[<p>A compiler warning tells you where you are probably making a mistake.  Changing the code to eliminate the warning may not remove the mistake.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-08/thought-for-today-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New BlackBerry</title>
		<link>http://www.sambal.org/2008-07/new-blackberry/</link>
		<comments>http://www.sambal.org/2008-07/new-blackberry/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 18:41:50 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/2008-07/new-blackberry/</guid>
		<description><![CDATA[I bought a new cell phone on Friday, and went with the new-ish BlackBerry Curve 8330 from Telus.
I like it a lot so far.  (I&#8217;m typing on it right now.). But I&#8217;m unhappy with Telus.
First, as others have reported, they&#8217;ve done something to hobble the GPS.  GPS works in Telus Navigator or when [...]]]></description>
			<content:encoded><![CDATA[<p>I bought a new cell phone on Friday, and went with the new-ish BlackBerry Curve 8330 from Telus.</p>
<p>I like it a lot so far.  (I&#8217;m typing on it right now.). But I&#8217;m unhappy with Telus.</p>
<p>First, as others have reported, they&#8217;ve done something to hobble the GPS.  GPS works in Telus Navigator or when Navigator is running in the background, but not in Google Maps or Blackberry Maps.  Navigator is an extra $10/month value added service.  After my free trial of navigator runs out, I will have to call up Telus and bully them into giving it to me for free, and that&#8217;s no fun.</p>
<p>Second, Telus had a data outage last Saturday which seemed to affect only 3rd party apps like MidpSSH.  When I phoned them three times to ask about it, nobody knew anything.  It magically fixed itself Sunday morning.  But since ssh is the key reason I have a full-keyboard handheld, this is almost worth returning the phone if it happens again.</p>
<p>I like the overall experience though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-07/new-blackberry/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Art of War - Moral Law</title>
		<link>http://www.sambal.org/2008-07/art-of-war-moral-law/</link>
		<comments>http://www.sambal.org/2008-07/art-of-war-moral-law/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 17:05:33 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/2008-07/art-of-war-moral-law/</guid>
		<description><![CDATA[At the very beginning of The Art of War, Sun Tsu writes:
The MORAL LAW causes the people to be in complete accord with their ruler, so that they will follow him regardless of their lives, undismayed by any danger.
This is something that the US lacks at present.  Even without ther 2000 election mess in [...]]]></description>
			<content:encoded><![CDATA[<p>At the very beginning of The Art of War, Sun Tsu writes:</p>
<blockquote><p>The MORAL LAW causes the people to be in complete accord with their ruler, so that they will follow him regardless of their lives, undismayed by any danger.</p></blockquote>
<p>This is something that the US lacks at present.  Even without ther 2000 election mess in Florida, a substantial fraction of the American people would have been unwilling to follow George W Bush to war.  It&#8217;s been going on for decades, the division of America and the dissolution of our common goals and ideals.</p>
<p>I&#8217;m also reading Churchill&#8217;s history of the second world war, and I&#8217;m struck by how similarly divided Britain was in the pacifist period of the 20s and 30s was.</p>
<p>Good news?  Maybe.  The allies won the war, after all.  But divided Britain came together under a wise respected statesman, and had the help of a wealthy, productive and nearly invulnerable ally in the US.  Today we seem short of both.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-07/art-of-war-moral-law/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sorry, you actually need COM to get WMI data</title>
		<link>http://www.sambal.org/2008-07/sorry-you-actually-need-com-to-get-wmi-data/</link>
		<comments>http://www.sambal.org/2008-07/sorry-you-actually-need-com-to-get-wmi-data/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 22:29:29 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=708</guid>
		<description><![CDATA[If you want to run on Windows 2000, you can&#8217;t use wmic.exe.  That&#8217;s too bad, because my solution posted the other day relies on wmic.  And I have to support W2K.
]]></description>
			<content:encoded><![CDATA[<p>If you want to run on Windows 2000, you can&#8217;t use wmic.exe.  That&#8217;s too bad, because my solution posted the other day relies on wmic.  And I have to support W2K.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-07/sorry-you-actually-need-com-to-get-wmi-data/feed/</wfw:commentRss>
		</item>
		<item>
		<title>djbdns and DHCP server</title>
		<link>http://www.sambal.org/2008-07/djbdns-and-dhcp-server/</link>
		<comments>http://www.sambal.org/2008-07/djbdns-and-dhcp-server/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 06:28:58 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[dhcp]]></category>

		<category><![CDATA[djbdns]]></category>

		<guid isPermaLink="false">http://www.sambal.org/?p=711</guid>
		<description><![CDATA[There is a script for extracting DNS data from dhcpd.leases that I&#8217;ve been using for a few years.  It generates a tinydns data file which can be merged with the static file.
But I am not content with only one DHCP server.  I have implemented a backup/failover server.  Now I have twice the problems!
The ISC DHCP [...]]]></description>
			<content:encoded><![CDATA[<p>There is a <a href="http://www.thismetalsky.org/projects/dhcp_dns.xml">script for extracting DNS data from dhcpd.leases</a> that I&#8217;ve been using for a few years.  It generates a tinydns data file which can be merged with the static file.</p>
<p>But I am not content with only one DHCP server.  I have implemented a backup/failover server.  Now I have twice the problems!</p>
<p>The ISC DHCP server only records the hostname in the dhcpd.leases file if it granted the lease.  Although most leases will be written by the primary server, it would be a mistake to assume that the failover peer will never write a lease.</p>
<p>So the solution appears to be to run a dhcp-serving copy of axfrdns on each machine, and then pull that data together, collate it, and serve a single unified copy.<br />
A picture might help, but I&#8217;m on a blackberry right now and can&#8217;t draw one.</p>
<p>I hope to implement this next week and report how it came out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambal.org/2008-07/djbdns-and-dhcp-server/feed/</wfw:commentRss>
		<enclosure url="http://www.thismetalsky.org/projects/dhcp_dns.xml" length="3849" type="application/xhtml+xml" /><media:content url="http://www.thismetalsky.org/projects/dhcp_dns.xml" fileSize="3849" type="application/xhtml+xml" /><itunes:subtitle>There is a script for extracting DNS data from dhcpd.leases that I&amp;#8217;ve been using for a few years.  It generates a tinydns data file which can be merged with the static file. But I am not content with only one DHCP server.  I have implemented a backu</itunes:subtitle><itunes:summary>There is a script for extracting DNS data from dhcpd.leases that I&amp;#8217;ve been using for a few years.  It generates a tinydns data file which can be merged with the static file. But I am not content with only one DHCP server.  I have implemented a backup/failover server.  Now I have twice the problems! The ISC DHCP [...]</itunes:summary><itunes:keywords>Uncategorized, dhcp, djbdns</itunes:keywords></item>
	<media:rating>nonadult</media:rating></channel>
</rss>
