<?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>Eamonn's Ramblings</title>
	<atom:link href="http://bogpeople.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://bogpeople.com/blog</link>
	<description>Sharing The Few Thoughts I Have With The World</description>
	<lastBuildDate>Tue, 06 Jan 2009 15:43:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Diary of a Hard Disk Upgrade</title>
		<link>http://bogpeople.com/blog/?p=15</link>
		<comments>http://bogpeople.com/blog/?p=15#comments</comments>
		<pubDate>Tue, 06 Jan 2009 15:43:54 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=15</guid>
		<description><![CDATA[I recently found myself needing to upgrade the hard disks in a few PCs to bigger and and faster ones.  The thought of having to reinstall Windows from scratch an all of them made my heart sink into the pit of my stomach so I set about seeing what would be involved in &#8220;cloning&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found myself needing to upgrade the hard disks in a few PCs to bigger and and faster ones.  The thought of having to reinstall Windows from scratch an all of them made my heart sink into the pit of my stomach so I set about seeing what would be involved in &#8220;cloning&#8221; the contents of the existing disks onto the new replacements.  I could have just paid for <a title="Acronis Migrate Easy" href="http://www.acronis.com/homecomputing/products/migrateeasy/" target="_blank">Acronis Migrate Easy</a> (which seems to be generally well-regarded), but where&#8217;s the fun in that ?!  In the end, I successfully migrated a number of PCs using free software.  This article describes how.</p>
<p>The usual disclaimers apply&#8230;this is what worked for me &#8211; if you try it and it goes wrong and you haven&#8217;t taken the normal sensible precautions before embarking on an endeavour like this then please don&#8217;t come crying to me.</p>
<p><strong>Step 1 &#8211; Partition the new hard disk</strong></p>
<p>I found it easiest to do this from Windows.  I connected the new hard disk to the PC and created the partitions using the normal Disk Management tool.  You will save yourself some trouble if you &#8220;match up&#8221; the partition numbers on the old and new disks (i.e. if your Windows partition is on partition #1 on the old disk, make sure it is on partition #1 on the new disk also).  On some of the PCs there was a Dell diagnostics partition present (so the Windows partition was actually the second partition).  More about this below.</p>
<p><strong>Step 2 &#8211;  Delete (or rename) the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices key in the registry</strong></p>
<p>Doing this now will save you a world of pain later on.  The problem is that Windows maintains a mapping of volume IDs to drive letters under this registry key</p>
<p><img title="MountedDevices registry key" src="/blog/images/hdd_upgade_diary/MountedDevices_before.png" alt="MountedDevices registry key" width="739" height="368" align="middle" /></p>
<p>Here, my new drive was mounted as drive N: when I partitioned it.  If I do nothing now, Windows will remount it as drive N: (instead of C:) when I later boot from it, which won&#8217;t end well.  If I just zap this registry key, Windows will recreate it when it next boots (although it will have forgotten about what drive letters you liked for your USB keys etc.)  I guess you could just delete the entries for C: and N:&#8230;I didn&#8217;t try this.</p>
<p><strong>Step 3 &#8211; Reboot into Linux</strong></p>
<p>I variously used <a href="http://fedoraproject.org/" target="_blank">Fedora Core 8</a> and <a href="http://www.knoppix.org/" target="_blank">Knoppix 5.1.1</a>&#8230;both contained the required NTFS tools and both worked perfectly.  At this stage, I have both the old and the new drives attached to the PC.  I did this with various combinations to attachment from direct PATA to USB-to-PATA or USB-to-SATA converters and they all worked perfectly.</p>
<p><strong>Step 4 &#8211; Dell Diagnostics Partition</strong></p>
<p>One of the candidates was a Dell PC and I wanted to preserve the Dell Diagnostics partition, partly because it is a good thing to have and partly &#8211; as I mentioned above &#8211; to keep my partition numbering consistent between the old and the new drives (which saves a bunch of trouble).  I did this by using the <strong>gparted</strong> utility to create a new partition on the new disk, similar in size to the original (but rounded up to an even cylinder boundary) with a system ID of &#8216;de&#8217; (copied from the original).  Then I simply did a &#8220;dump&#8221; sector-by-sector copy of the diagnostics partition from the old to the new:-</p>
<p><code># <strong>dd if=/dev/sda1 of=/dev/sdb1 bs=32768</strong></code></p>
<p>This worked a treat.  I could then recreate my NTFS partition (again using <strong>gparted</strong>) as the second partition on the drive.  It may seem that this rather wastes the effort of partitioning the disk in Step 1 above, but by doing it this way the standard Microsoft boot code is installed in the MBR.  Of course, there are lots of other ways the same thing could be achieved, such as copying the MBR from the original disk to the new disk using the command</p>
<p><code># <strong>dd if=/dev/sda of=/dev/sdb bs=512 count=1</strong></code></p>
<p>&#8230;and then using <strong>gparted </strong>to resize the partitions accordingly.   Either way, <strong>be very careful.</strong> If you manage to zap the partition table on your original disk at this stage you are going to have a seriously bad day !</p>
<p>The fun isn&#8217;t over yet&#8230;see below !</p>
<p><strong>Step 5 &#8211; Clone the NTFS parition</strong></p>
<p>The next step is to clone the contents of the old NTFS partition into the new one.  This is done using the aptly-named <strong>ntflsclone</strong> command:-</p>
<p><code># <strong>ntfsclone -O /dev/sdb2 /dev/sda2</strong></code></p>
<p>In this form, the command clones /dev/sda2 to /dev/sdb2.  Once again, <strong>be careful</strong>.  This command doesn&#8217;t ask for any confirmation and if you get your partitions mixed up (e.g. specify them the wrong way around) it <em>will</em> hurt.</p>
<p><strong>Step 6 &#8211; Resize the partition</strong></p>
<p>At this point, all of the data is copied from the old disk to the new disk, but the filesystem on the new disk still &#8220;thinks&#8221; it is the same size as it was on the old disk.  If you just reboot at this point you will find &#8211; to your dismay &#8211; that the new filesystem is no bigger than the old one, even though the partition containing the filesystem is bigger.</p>
<p>To fix this, we run <strong>ntfsresize</strong> on the new partition</p>
<p><code># <strong>ntfsresize /dev/sdb2</strong></code></p>
<p><strong>Step 7 &#8211; Fix the number of &#8220;hidden sectors&#8221; in the NTFS Boot Sector</strong></p>
<p>If the new NTFS partition doesn&#8217;t start on the same sector number as the old one, you will need to adjust the number of &#8220;hidden sectors&#8221; recorded at offset <tt>0x1C</tt> in the NTFS boot sector.</p>
<p>TODO: Describe using &#8220;hexedit&#8221; to complete this job</p>
<p>I did it a different way (kind of by accident).  I wound up booting from the Windows Vista installation DVD and selecting &#8220;Repair&#8221;.  This located and repaired the incorrect boot sector for me automatically.</p>
<p><strong>Step 8 &#8211; Insert the new disk and reboot</strong></p>
<p><img src="/blog/images/hdd_upgade_diary/clone_success.png" alt="" hspace="5" vspace="5" width="367" height="481" align="right" />All going well, it will boot up exactly as before &#8211; except possibly faster &#8211; and you will miraculously have lots of available space</p>
<p><br style="clear: both" /></p>
<p><strong>Step 9 &#8211; Defragment</strong></p>
<p>If your original disk was heavily fragmented (which it probably was if you were running close to capacity for a good while), then the copy is still heavily fragmented.  Now would be an excellent time to defragment the new partition.</p>
<p><img src="/blog/images/hdd_upgade_diary/after_clone_need_defrag.png" alt="" width="663" height="590" /></p>
<p><strong>Other Alternatives</strong></p>
<p>In the course of my research I came across a promising tool called <a href="http://www.xxclone.com/">XXCLONE</a>.  This works a different way, being file-oriented rather than sector/block-oriented.  Apparently, it copies individual files from the old to the new.  As an experiment, I cloned one of the PCs using this tool rather than using the procedure described above.  Initially all seemed well&#8230;I could boot from it and everything appeared to work OK.  However, a few days later I was trying to install Microsoft.NET Framework 3.5 and found that it simply would not install.  I can&#8217;t be certain that the problem was with the method used to clone the disk, but when I went back and recloned using the Linux tools I could then install the same .NET Framework without any problems.  If the problem was caused by XXCLONE it is a pity&#8230;it is very elegant and simple to use.  I have sent some feedback to the developers&#8230;hopefully it will be helpful to them.</p>
<p><strong>Acknowledgements</strong></p>
<p>I can&#8217;t claim to have worked all of this out from scratch by myself.  The most useful online guide I found was Michael Dominok&#8217;s at <a href="http://www.dominok.net/en/it/en.it.clonexp.html" target="_blank">http://www.dominok.net/en/it/en.it.clonexp.html</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding IP addresses hidden in &#8220;ifconfig -a&#8221;</title>
		<link>http://bogpeople.com/blog/?p=17</link>
		<comments>http://bogpeople.com/blog/?p=17#comments</comments>
		<pubDate>Tue, 06 Jan 2009 15:31:27 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=17</guid>
		<description><![CDATA[Wow&#8230;is it really over a year since my last blog post ?
Anyway, here&#8217;s something which I hope will be useful.
I find it awkward to pick out my Mac&#8217;s IP addresses at a glance from the output of &#8220;ifconfig -a&#8221;.  Here&#8217;s a command-line that makes it very easy&#8230;
[eamonn@stig ~]$ ifconfig -a &#124; perl -ne '$interface=$1 if [...]]]></description>
			<content:encoded><![CDATA[<p>Wow&#8230;is it really over a year since my last blog post ?</p>
<p>Anyway, here&#8217;s something which I hope will be useful.</p>
<p>I find it awkward to pick out my Mac&#8217;s IP addresses at a glance from the output of &#8220;ifconfig -a&#8221;.  Here&#8217;s a command-line that makes it very easy&#8230;</p>
<p><code>[eamonn@stig ~]$ <b><span style="color: #0000ff;">ifconfig -a | perl -ne '$interface=$1 if (/^([a-z]+[0-9]+:)/); print "$interface $1\n" if (/inet (\d+\.\d+\.\d+\.\d+)/);'</span></b><br />
lo0: 127.0.0.1<br />
en0: 192.168.78.112</code></p>
<p>Now even the most commited command-line disciple is likely to baulk at typing all that, so I have an alias set up in ~/.bash_login.  The quotes are a little fiddly to get right, so here&#8217;s the alias&#8230;</p>
<p><code>alias ipa='ifconfig -a | perl -ne '\''$interface=$1 if (/^([a-z]+[0-9]+:)/); print "$interface $1\n" if (/inet (\d+\.\d+\.\d+\.\d+)/);'\'</code><br />
 <br />
A slight variation of the same thing works on Linux also (with adjustments to compensate for the differences  in output format)&#8230;<br />
 <br />
<code>alias ipa='ifconfig -a | perl -ne '\''$interface=$1 if (/^([a-z]+[0-9]+) /); print "$interface $1\n" if (/inet addr:(\d+\.\d+\.\d+\.\d+)/);'\'</code></p>
<p>I hope its useful&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The eircom Master Socket</title>
		<link>http://bogpeople.com/blog/?p=14</link>
		<comments>http://bogpeople.com/blog/?p=14#comments</comments>
		<pubDate>Fri, 28 Dec 2007 01:16:21 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Telecomms]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=14</guid>
		<description><![CDATA[Have you ever wondered what lurks inside the master telephone socket that eircom provide?  Surprisingly little, as it turns out.  Here is a photo of the insides of one of them:-

(click on the photo above for a bigger version) 
The circuit diagram of the master socket is:-

There are two sets of three connectors.  The connectors are [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Have you ever wondered what lurks inside the master telephone socket that eircom provide?  Surprisingly little, as it turns out.  Here is a photo of the insides of one of them:-</p>
<p align="center"><a target="_blank" href="/blog/images/eircom_master_socket/eircom_master_socket-photo_big.jpg"><img vspace="5" width="500" src="/blog/images/eircom_master_socket/eircom_master_socket-photo.jpg" hspace="5" alt="Photograph of the inside of an eircom master socket" height="188" style="width: 500px; height: 188px" title="Photograph of the inside of an eircom master socket" /></a></p>
<p align="center"><em>(click on the photo above for a bigger version)</em> </p>
<p>The circuit diagram of the master socket is:-</p>
<p style="text-align: center"><img vspace="5" width="400" src="/blog/images/eircom_master_socket/eircom_master_socket-complete.png" hspace="5" alt="Circuit diagram of the eircom master socket" height="400" style="width: 400px; height: 400px" title="Circuit diagram of the eircom master socket" /></p>
<p style="text-align: left">There are two sets of three connectors.  The connectors are labelled L1, L2 and R.  Each connector is directly connected to its counterpart on the other side via a breakable link on the circuit board.  The breakable links are tracks on the circuit board which run between pairs of oblong holes (visible in the photo above on the far right-hand side).  I <em>think</em> the idea is that two lines could be delivered via the same socket by breaking these links (although I have never seen or heard of this being done).  The (two-wire) eircom line is connected to L1 and L2.  L1 from the left-hand side connects directly to pin 6 on the RJ11 socket and via the breakable link to pin 4 in the RJ11 socket.  Similarly, L2 from the left-hand side connects directly to pin 1 on the RJ11 socket and via another breakable link to ping 3 in the RJ11 socket.  Since pretty much all modern telephones only connect to pins 3 and 4 of the RJ11 socket, this is really all you need.  For historical reasons, there is a 1.8uF capacitor connecting L1 on the left-hand side to the R pin on the left-hand side.  This is connected to pin 2 directly (and pin 5 via another breakable link) on the RJ11 socket.  This provides a separate ringing signal for (old) phones that need it.</p>
<p style="text-align: left">Apart from the capacitor, the only other component on the circuit board is a 470K resistor.  Between R and L2.  This (in series with the capacitor) provides a load which eircom can use to test the line remotely when there is nothing else connected (even at a few tens of Hertz, the impedance of the resistor will dominate that of the capacitor).</p>
<p style="text-align: left"> I had expected to find some sort of surge arrestor or something like that in there but there isn&#8217;t one (the equivalent BT master socket has a surge arrestor, but is otherwise identical internally &#8211; although obviously the socket is physically different).</p>
<p style="text-align: left"> Practically speaking, you can ignore the R pin completely&#8230;I think pretty much all modern telephones will derive their own ringing signal from the line and don&#8217;t rely on it being delivered separately from the master socket.  So the only significant connections in the master socket are these:-</p>
<p style="text-align: center"><img vspace="5" width="401" src="/blog/images/eircom_master_socket/eircom_master_socket-essential.png" hspace="5" alt="Essential connections in the eircom master socket" height="401" style="width: 401px; height: 401px" title="Essential connections in the eircom master socket" /></p>
<p>The idea is that the eircom line will connect to L1 and L2 on the left-hand side (I think these are labelled S1 and S2 in newer sockets) and you will connect your own internal wiring to L1 and L2 on the right-hand side.  Then, in the event of a fault, it is easy to isolate your internal wiring from the bit eircom are responsible for (thus avoiding a costly call-out charge if you haul out and eircom engineer to a fault which turns out to be with your internal wiring !). </p>
<p style="text-align: left">There are stories told of old modems which <em>require</em> you to snip everything except pings 3 and 4.  I have only come across it twice in my long and distinguished career fiddling with such things.  I can&#8217;t claim to have a clear understanding of exactly why this is (sometimes) necessary&#8230;I have been offered several conflicting explanations.  I <em>think</em> it is to do with some (cheap and nasty) modems shorting some pins together internally.  If anyone would care to volunteer an explanation I will update this article accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The source of all network and security problems finally identified!!!</title>
		<link>http://bogpeople.com/blog/?p=13</link>
		<comments>http://bogpeople.com/blog/?p=13#comments</comments>
		<pubDate>Thu, 20 Dec 2007 12:01:42 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=13</guid>
		<description><![CDATA[[This post is a slight departure from my stated policy of trying not to increase the average level of inane wittering on the Internet any further by keeping my opinions to myself in this blog, but this particular insight is just too penetrating not to share it with the world.  Like all of my [...]]]></description>
			<content:encoded><![CDATA[<p><em>[This post is a slight departure from my stated policy of trying not to increase the average level of inane wittering on the Internet any further by keeping my opinions to myself in this blog, but this particular insight is just too penetrating not to share it with the world.  Like all of my opinions, it is - of course - entirely correct <img src='http://bogpeople.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />    ]<br />
</em></p>
<p>I have had an epiphany.  I now know what causes pretty much all network problems:  <strong>GUIs</strong>.  At first blush, this may sound like a slightly sweeping statement but I have come to believe in it very deeply.  Stick with me here and I will explain why.</p>
<p>Take today for example:  Myself and one of my esteemed colleagues squandered an hour of our lives dealing with a guy in a secondary school where we support the Internet router.  His Internet access was broken.  I&#8217;ll spare you the long and painful details of the hour&#8230;suffice it to say that by the end of it we determined that there was a server sitting between his 140 snotty, insolent teenagers and our router.  It took a startlingly large fraction of that hour to glean from this barely-adequate specimen of humanity that this server even existed.  We also figured out that &#8211; somehow &#8211; the server was at the core of the problem.  After a conversation reminiscent of having teeth pulled, our hero volunteered that &#8211; infact &#8211; there had been a change to the server that morning:  he had uninstalled Microsoft ISA server off it !!  Somehow &#8211; and it completely eludes me how anyone can be quite this gormless &#8211; it never entered his head that perhaps uninstalling the proxy/firewall software off the server separating the hormonal masses from the Internet router might be <em>somehow </em>related to his current predicament (140 horny teenagers separated from their porn supply and becoming increasingly antsy about it).</p>
<p>So, how do I extrapolate from this to my theory about GUIs being the root of all evil ?  Well, if that server had been a Linux server, there is no way on earth that this guy would have taken it upon himself to touch it.  The slightly arcane (yes&#8230;I admit it) Linux command-line has a way of scaring off people like this who really need most of their brain power just so they remember to breathe regularly and are taking huge risks by trying to apply their limited stock of intelligence to anything else.  In short, command-lines have a way of making things appear a little harder to do than they actually are and therefore act as a built-in safety-net, preventing &#8220;special&#8221; people from trying to do things they are simply not equipped to do.  GUIs, have exactly the opposite effect:  they allow the dimmest of knuckle-dragging troglodytes to poke and prod at things they don&#8217;t really understand until eventually they manage to break it.</p>
<p>I formulated a more limited form of this theory some years ago when I formed the opinion that Checkpoint Firewall-1 was the source of all security problems on the Internet.  When I first started working in the field of data security I could never really understand how hackers seemed to be able to waltz past the best of access lists and firewalls as if they weren&#8217;t there.  How could it be that the hackers were all so clever and the developers of firewalls were all apparently dribbling idiots ?  Then, one day, I was on-site with a large multinational customer watching the guys in there trying to get an application working through a Checkpoint firewall.  So, they fired up Checkpoint&#8217;s very lovely GUI and they added the rule they thought should do the trick.  It didn&#8217;t, so the relaxed the rule a little further.  It still didn&#8217;t, so they relaxed it a little further again, and so the cycle continued through several iterations until eventually the application did work and the &#8220;firewall&#8221; was reduced to the functional equivalent of a piece of wire.  At that moment I understood for the first time that security holes were rarely caused by weaknesses in firewalls and far more often caused by mental deficiencies in those charged with configuring them.  I also understood that the GUI was at fault:  Checkpoint&#8217;s (lovely) GUI makes it very easy to set up rules without the bothersome inconvenience of having to have the remotest understanding of what the hell you are doing.  If they had a PIX rather than a Checkpoint (these were the halcyon days before PIX Device Manager, when all was right with the world), this would not have happened.  The only thing I didn&#8217;t grasp at the time was exactly how generally-applicable the GUI theory was.</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adventures With Windows Vista and the svchost CPU Hog</title>
		<link>http://bogpeople.com/blog/?p=12</link>
		<comments>http://bogpeople.com/blog/?p=12#comments</comments>
		<pubDate>Wed, 11 Jul 2007 23:57:03 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=12</guid>
		<description><![CDATA[Imagine my dismay when my new, fast-everything-dual-core-with-tons-of-RAM PC suddenly started running at around 50% CPU utilisation more-or-less constantly, even when it wasn&#8217;t supposed to be doing anything.  You just don&#8217;t have these problems with Linux   .  Anyway so began the detective-work.
Most of the CPU utilisation appears to be Kernel-space:-

 The obvious [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/blog/images/svchostcpuhog/systemtray.png" title="System tray icon showing 50% CPU utilisation" alt="System tray icon showing 50% CPU utilisation" align="left" hspace="5" vspace="5" />Imagine my dismay when my new, fast-everything-dual-core-with-tons-of-RAM PC suddenly started running at around 50% CPU utilisation more-or-less constantly, even when it wasn&#8217;t supposed to be doing anything.  You just don&#8217;t have these problems with Linux <img src='http://bogpeople.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .  Anyway so began the detective-work.</p>
<p>Most of the CPU utilisation appears to be Kernel-space:-</p>
<p align="center"><img src="/blog/images/svchostcpuhog/cpugraph.png" title="Graphs showing CPU utilisation" alt="Graphs showing CPU utilisation" /></p>
<p align="left"> The obvious place to start is to find out which process(es) are doing the damage:-</p>
<p align="center"><img src="/blog/images/svchostcpuhog/processlist.png" /></p>
<p align="left">Pretty consistently the culprit seems to be <strong>svchost</strong> with a process ID of 1468&#8230;it is running steadily at around 50%.</p>
<p align="left">So what is it doing ?  <a href="http://support.microsoft.com/kb/314056">Microsoft&#8217;s Knowledgebase article 314056</a> says:-</p>
<blockquote><p><em>The Svchost.exe file is located in the %SystemRoot%\System32 folder. At startup, Svchost.exe checks the services part of the registry to construct a list of services that it must load. Multiple instances of Svchost.exe can run at the same time. Each Svchost.exe session can contain a grouping of services. Therefore, separate services can run, depending on how and where Svchost.exe is started. This grouping of services permits better control and easier debugging.</em></p></blockquote>
<p>Easier debugging my ass.  Anyway, it goes on to give some information about how to find out what this particular instance of svchost is doing.  The command:-</p>
<p><code>tasklist /svc /fi "pid eq 1468"</code></p>
<p>shows exactly which services are running under this particular process ID:-</p>
<p align="center"><img src="/blog/images/svchostcpuhog/tasklist.png" title="tasklist /svc output" alt="tasklist /svc output" height="241" width="677" /></p>
<p>So it only remains to figure out which of these services has gone awry.  A little bit of guesswork comes in here, matching the abbreviated names from the output above to services.  This isn&#8217;t too difficult.  All I had to do was stop the services listed one-by-one until the CPU utilisation dropped to zero.  At it turned out, the culprit was the &#8220;TapiSrv&#8221;, the Telephony service.  This wouldn&#8217;t stop when I asked politely (which was a bad sign all by itself) and when it was the only one remaining the CPU utilisation was still at 50%.  When I forcibly killed the svchost process from Task Manager the CPU utilisation finally dropped to 0%.</p>
<p>Hindsight is wonderful.  It turned out that the reason the Telephony service wouldn&#8217;t stop was because it depended on the Fax service and it was the Fax service that was <em>really</em> stuck.  Once I had figured that out it dawned on me that the problem began around the time I was (unsuccessfully) trying to send a Fax to my bank to berate them for their stupidity (but that&#8217;s a whole other blog entry).  I have worked around the problem for the moment by disabling the Fax service and all is well again (by Windows standards, at any rate).  I haven&#8217;t yet got around to working out what is wrong with the Fax service (the urgency has passed&#8230;I found another way to beat up the bank !)</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effect of Camera Aperture on Depth of Field &#8211; A Demonstration</title>
		<link>http://bogpeople.com/blog/?p=11</link>
		<comments>http://bogpeople.com/blog/?p=11#comments</comments>
		<pubDate>Sun, 03 Jun 2007 17:00:35 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=11</guid>
		<description><![CDATA[This is a neat demonstration of the effect of camera aperture on picture depth of field.  All of these photos were taken at the same time with decreasing aperture (or increasing f-stop if you prefer).




f/5.6





f/6.3





f/7.1





f/8





f/9





f/10





f/11





f/13





f/14





f/16





f/18





f/20





f/22





f/25





f/29





 f/36


For those who are curious about such things, the pictures were all taken with a Nikon D50 fitted with [...]]]></description>
			<content:encoded><![CDATA[<p>This is a neat demonstration of the effect of camera aperture on picture depth of field.  All of these photos were taken at the same time with decreasing aperture (or increasing f-stop if you prefer).<br />
<center></p>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f5p6.jpg" alt="f/5.6" /><br />
<center>f/5.6</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f6p3.jpg" alt="f/6.3" /><br />
<center>f/6.3</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f7p1.jpg" alt="f/7.1" /><br />
<center>f/7.1</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f8.jpg" alt="f/8" /><br />
<center>f/8</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f9.jpg" alt="f/9" /><br />
<center>f/9</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f10.jpg" alt="f/10" /><br />
<center>f/10</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f11.jpg" alt="f/11" /><br />
<center>f/11</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f13.jpg" alt="f/13" /><br />
<center>f/13</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f14.jpg" alt="f/14" /><br />
<center>f/14</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f16.jpg" alt="f/16" /><br />
<center>f/16</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" height="343" width="471">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f18.jpg" alt="f/18" /><br />
<center>f/18</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f20.jpg" alt="f/20" /><br />
<center>f/20</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f22.jpg" alt="f/22" /><br />
<center>f/22</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f25.jpg" alt="f/25" /><br />
<center>f/25</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f29.jpg" alt="f/29" /><br />
<center>f/29</center></td>
</tr>
</table>
<table style="border: 2px solid red; margin: 10px 5px; background: #dddddd none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<tr>
<td><img src="http://bogpeople.com/blog/images/dofdemo/f36.jpg" alt="f/36" /><br />
<center> f/36</center></td>
</tr>
</table>
<p></center>For those who are curious about such things, the pictures were all taken with a Nikon D50 fitted with a Sigma 18-200mm zoom lens.  According to the EXIF information in the original images, the focal length when the pictures were taken was 65mm (and I have no reason to doubt it !!).</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SCART connection from DVD player to TV blanks the TV picture</title>
		<link>http://bogpeople.com/blog/?p=6</link>
		<comments>http://bogpeople.com/blog/?p=6#comments</comments>
		<pubDate>Sun, 27 May 2007 17:45:49 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[TV & Satellite]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=6</guid>
		<description><![CDATA[The problem: when my cheap-n-cheerful 14&#8243; Philips portable TV was connected to my even-cheaper-n-just-as-cheerful Bush DVD player, the screen on the TV was completely blank when trying to watch ordinary TV. Sound came through OK, but no picture.  Disconnecting the SCART cable or plugging out the DVD power cable cured the problem, so it [...]]]></description>
			<content:encoded><![CDATA[<p>The problem: when my cheap-n-cheerful 14&#8243; Philips portable TV was connected to my even-cheaper-n-just-as-cheerful Bush DVD player, the screen on the TV was completely blank when trying to watch ordinary TV. Sound came through OK, but no picture.  Disconnecting the SCART cable or plugging out the DVD power cable cured the problem, so it was pretty apparent that the problem was something being sent up the SCART cable from the DVD player to the TV.</p>
<p style="clear: left; padding: 3mm; background: #eeeeee none repeat scroll 0% 50%; margin-left: 5%; margin-right: 5%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" align="left;"> <img src="images/scart.png" alt="SCART pinout" style="margin-right: 3mm; float: left" /> SCART pinout (female connector seen from the front).  Image is taken from Wikipedia.</p>
<p><br class="clear: both;" /><br />
After a visit to <a href="http://en.wikipedia.org/wiki/Scart" target="_blank">Wikipedia</a> (source of all wisdom) and a bit of poking around with a multimeter, I found a 2.5v signal from the DVD player to the TV on SCART pin 16, even when the DVD player was turned off.  This should tell the TV to expect RGB (rather than composite video) from the DVD player but appears to have a negative side-effect.   Snipping pin 16 in the SCART cable has cured the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPSec problems between Cisco PIX and WatchGuard Firebox</title>
		<link>http://bogpeople.com/blog/?p=5</link>
		<comments>http://bogpeople.com/blog/?p=5#comments</comments>
		<pubDate>Fri, 25 May 2007 22:29:10 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=5</guid>
		<description><![CDATA[OK&#8230;this is my first useful post to this blog.
I have spent the better part of the day trying to diagnose an IPSec connectivity problem between a Cisco PIX (version 6.3.5) and a WatchGuard Firebox of some kind (I have no visibility of it).  The problem turns out to be rather subtle, so I thought [...]]]></description>
			<content:encoded><![CDATA[<p>OK&#8230;this is my first useful post to this blog.</p>
<p>I have spent the better part of the day trying to diagnose an IPSec connectivity problem between a Cisco PIX (version 6.3.5) and a WatchGuard Firebox of some kind (I have no visibility of it).  The problem turns out to be rather subtle, so I thought I would share it here.</p>
<p>The configuration on the PIX is fairly standard (IP addresses have been changed to protect the innocent !):-<br />
<code><br />
crypto ipsec transform-set Esp3DesMD5 esp-3des esp-md5-hmac<br />
:<br />
:<br />
access-list VPNToFirebox permit 192.168.1.0 255.255.255.0 192.168.2.0 255.255.255.0<br />
:<br />
:<br />
crypto map VPN 60 ipsec-isakmp<br />
crypto map VPN 60 match address VPNToFirebox<br />
crypto map VPN 60 set pfs<br />
crypto map VPN 60 set peer 2.2.2.2<br />
crypto map VPN 60 set transform-set Esp3DesMD5<br />
crypto map VPN 60 set security-association lifetime seconds 86400 kilobytes 8192<br />
:<br />
:<br />
isakmp key ******** address 2.2.2.2 netmask 255.255.255.255 no-xauth no-config-mode<br />
</code></p>
<p>The ISAKMP (Phase 1) SA establishes just fine, but the IPSEC (Phase 2) SA never comes up.  Watching the debug information on the PIX, here&#8217;s what happens:-</p>
<p><code><br />
ISAKMP : Checking IPSec proposal 1<br />
ISAKMP: transform 1, ESP_3DES<br />
ISAKMP:   attributes in transform:<br />
ISAKMP:      SA life type in seconds<br />
ISAKMP:      SA life duration (VPI) of  0x0 0x1 0x51 0x80<br />
ISAKMP:      SA life type in kilobytes<br />
ISAKMP:      SA life duration (basic) of 8192<br />
ISAKMP:      group is 2<br />
<span style="color: red"><strong> ISAKMP:      encaps is 61433</strong></span><br />
ISAKMP:      authenticator is HMAC-MD5<br />
ISAKMP (0): atts not acceptable. Next payload is 0<br />
ISAKMP (0): SA not acceptable!<br />
ISAKMP (0): sending NOTIFY message 14 protocol 0<br />
return status is IKMP_ERR_NO_RETRANS<br />
</code></p>
<p>The key is the &#8220;encaps is 61433&#8243; line.  What this <em>should</em> say is &#8220;encaps is 61443&#8243; which is the (old, pre-RFC3947) encapsulation ID for ESP via NAT Traversal.  As it is, the PIX has no idea what &#8220;61433&#8243; is supposed to be and the SA negotiation fails.</p>
<p>Here&#8217;s what the debug output looks like when talking to another PIX (which sends the correct ID):-</p>
<p><code><br />
ISAKMP (0): processing SA payload. message ID = 177759204<br />
ISAKMP : Checking IPSec proposal 1<br />
ISAKMP: transform 1, ESP_3DES<br />
ISAKMP:   attributes in transform:<br />
<span style="color: red"><strong>ISAKMP:      encaps is 61443</strong></span><br />
ISAKMP:      SA life type in seconds<br />
ISAKMP:      SA life duration (VPI) of  0x0 0x1 0x51 0x80<br />
ISAKMP:      SA life type in kilobytes<br />
ISAKMP:      SA life duration (basic) of 8192<br />
ISAKMP:      authenticator is HMAC-MD5<br />
ISAKMP:      group is 1<br />
ISAKMP (0): atts are acceptable.IPSEC(validate_proposal_request): proposal part #1,</code></p>
<p>Here the encapsulation ID is correct and the tunnel comes up.</p>
<p>The problem only arises when NAT is detected on the path between the Firebox and the PIX&#8230;otherwise there is no need to encapsulate the ESP inside UDP.</p>
<p><strong>References</strong></p>
<ul>
<li><a href="http://http://tools.ietf.org/html/draft-ietf-ipsec-nat-t-ike-04"> Negotiation of NAT-Traversal in the IKE &#8211; http://tools.ietf.org/html/draft-ietf-ipsec-nat-t-ike-04</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello, World</title>
		<link>http://bogpeople.com/blog/?p=4</link>
		<comments>http://bogpeople.com/blog/?p=4#comments</comments>
		<pubDate>Fri, 25 May 2007 19:16:23 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bogpeople.com/blog/?p=4</guid>
		<description><![CDATA[Temptation has got the better of me. I have a blog. This will be a source of some mirth to those who have suffered through my several diatribes about a certain class of self-important, highly-opinionated person who believes that they somehow make the world a richer place by filling it with their random flashes of [...]]]></description>
			<content:encoded><![CDATA[<p>Temptation has got the better of me. I have a blog. This will be a source of some mirth to those who have suffered through my several diatribes about a certain class of self-important, highly-opinionated person who believes that they somehow make the world a richer place by filling it with their random flashes of cerebral diarrohea. Bloggers, in other words.</p>
<p>I have a good excuse. I figure a blog is a viable substitute for a memory and that is how I intend to use it. I have little intention of banging on about Iraq (and the activities of the evil warmongers there), politics (even though yesterday was election day in Ireland), religion (which I am generally in favour of up to the point where it calls upon me to actually be <em>good</em>) or sex (which I am generally in favour of up to the point where it calls upon me to actually be <em>good</em>).  That’s not to say that I definitely <em>won’t</em> impose my view about all of those things on the world, but it isn’t the main idea. Rather, the plan is to use this as a way of writing down lots of stuff that I figured out once and will probably need to figure out again at some point long after I have forgotten how I did it the first time.</p>
<p>You can thank/blame (depending on your perspective) John Dunn for inspiring me to actually do this since it was the arrival of his blog (to which I will link if he ever makes it public <img src="http://bogpeople.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> ) that finally pushed me over the edge.  I feel certain that his comment will be found below before too much longer.</p>
<p>If, in a spirit of benevolence and generosity, you feel compelled to follow me down the path towards being a blogger, I highly recommend <a href="http://wordpress.org" title="WordPress" target="_blank">WordPress</a>.  I found it very easy to set up (it <em>really</em> did take only 10 minutes) and it is real a pleasure to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://bogpeople.com/blog/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
