<?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>[ t h e f r a g g l e . c o m ] &#187; Linux</title>
	<atom:link href="http://www.thefraggle.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thefraggle.com</link>
	<description>technology, photography and anything else that springs to mind.</description>
	<lastBuildDate>Tue, 22 Sep 2009 15:02:25 +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>xen vcpu pinning defaults aren&#8217;t ideal</title>
		<link>http://www.thefraggle.com/2009/09/01/xen-vcpu-pinning-defaults-arent-ideal/</link>
		<comments>http://www.thefraggle.com/2009/09/01/xen-vcpu-pinning-defaults-arent-ideal/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 23:11:52 +0000</pubDate>
		<dc:creator>Chris Ganderton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.thefraggle.com/2009/09/01/xen-vcpu-pinning-defaults-arent-ideal/</guid>
		<description><![CDATA[I noticed an oddity the other day with a xen Domain0 host we have. There&#8217;s a cron scripted job that verifies the RPM database and the RPM&#8217;s that are installed on the system, for some reason this job failed, but kept the process open, and kept spinning around trying to do it&#8217;s job. Now, I [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed an oddity the other day with a xen Domain0 host we have. There&#8217;s a cron scripted job that verifies the RPM database and the RPM&#8217;s that are installed on the system, for some reason this job failed, but kept the process open, and kept spinning around trying to do it&#8217;s job. Now, I really ought to have set up a &#8220;process count&#8221; check on the nagios monitoring we have here, but I didn&#8217;t have this at the time, so didn&#8217;t pick it up for a few days. Whilst this was all going on, the Domain0 got pretty busy and started having to use time on the other CPU&#8217;s as well as the main VCPU that wasn&#8217;t pinned to anything but the Domain0.</p>
<p>You can see this from the list below of the vcpu resources used by a xen server currently:</p>
<p>[root@somedomain0 ~]# xm vcpu-list<br />
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity<br />
Domain-0                           0     0     0   -b-  1535018.3 0<br />
Domain-0                           0     1     1   -b-  139549.6 1<br />
Domain-0                           0     2     2   -b-  943651.0 2<br />
Domain-0                           0     3     3   -b-   53883.4 3<br />
Domain-0                           0     4     4   -b-  336268.9 4<br />
Domain-0                           0     5     5   -b-   65240.1 5<br />
Domain-0                           0     6     6   -b-   42854.6 6<br />
Domain-0                           0     7     7   r&#8211;   67960.9 7<br />
domain1                           4     0     2   r&#8211;  1791844.4 1-2<br />
domain1                           4     1     1   r&#8211;  1619120.1 1-2<br />
domain2                       5     0     3   -b-  511300.0 3-5<br />
domain2                       5     1     3   -b-  456253.1 3-5<br />
domain2                       5     2     5   -b-  456516.1 3-5<br />
domain3                     6     0     6   -b-  166344.6 6-7<br />
domain3                     6     1     7   -b-  137435.2 6-7</p>
<p>You’ll see Domain-0 which is the control domain, is pinned to all the other cpu’s that should only be used by the guests.</p>
<p>This isn&#8217;t ideal, and as a result you find that usually instead of a vmstat looking quite healthy and the &#8220;steal %&#8221; value that shows up being at 0, it&#8217;ll start to creep up. This means that the scheduler on the Domain0 side is interrupting the VCPU and requires CPU time from it, interrupting whatever is happening on the DomainU side.</p>
<p>There is a vcpu-pin action available within the xm command, which isn&#8217;t ideal to be used when you have the server live. What I found best, was to change the boot configuration for the Domain0 from the following:</p>
<p>title Enterprise Linux (2.6.18-128.el5xen)<br />
root (hd0,0)<br />
kernel /xen.gz-2.6.18-128.el5<br />
module /vmlinuz-2.6.18-128.el5xen ro root=/dev/vg01/root console=tty0 rhgb quiet<br />
module /initrd-2.6.18-128.el5xen.img</p>
<p>To the following:</p>
<p>title Enterprise Linux (2.6.18-128.el5xen)<br />
root (hd0,0)<br />
kernel /xen.gz-2.6.18-128.el5 <strong>dom0_max_vcpus=1</strong><br />
module /vmlinuz-2.6.18-128.el5xen ro root=/dev/vg01/root console=tty0 rhgb quiet<br />
module /initrd-2.6.18-128.el5xen.img</p>
<p>You&#8217;ll notice the option <strong>dom0_max_vcpus=1</strong>, this tells the Domain0 to pin to only one available VCPU, the one it&#8217;ll choose should be the first one.</p>
<p>You’ll see a difference in the vcpu-list afterwards like this:</p>
<p>[root@somedomain0 ~]# xm vcpu-list<br />
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity<br />
Domain-0                           0     0     0   r&#8211;      54.0 0<br />
domain1                           3     0     7   -b-       3.2 6-7<br />
domain1                           3     1     6   -b-       3.0 6-7<br />
domain2                          1     0     1   -b-      10.3 1-2<br />
domain2                           1     1     2   -b-       2.9 1-2<br />
domain3                          2     0     3   -b-       3.7 3-5<br />
domain3                          2     1     4   -b-       2.5 3-5<br />
domain3                          2     2     5   -b-       0.9 3-5</p>
<p>It&#8217;s worth noting that you can also limit this on the fly, by using the following command:</p>
<p>xm vcpu-pin Domain0 0 0</p>
<p>Which can be useful if you can&#8217;t get the down time for a box and it&#8217;s guests.</p>
<script type='text/javascript'>
<!--
digg_url='http://www.thefraggle.com/2009/09/01/xen-vcpu-pinning-defaults-arent-ideal/';
digg_skin = 'compact';
digg_bgcolor = '#FFFFFF';
digg_title = 'xen vcpu pinning defaults aren&#039;t ideal';
digg_bodytext = '';
digg_topic = '';
//-->
</script>
<script type='text/javascript' src='http://digg.com/tools/diggthis.js'></script>
]]></content:encoded>
			<wfw:commentRss>http://www.thefraggle.com/2009/09/01/xen-vcpu-pinning-defaults-arent-ideal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TanTan flickr photo gallery broken after upgrade to Wordpress 2.3</title>
		<link>http://www.thefraggle.com/2007/10/27/fixing-tantan-flickr/</link>
		<comments>http://www.thefraggle.com/2007/10/27/fixing-tantan-flickr/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 19:30:53 +0000</pubDate>
		<dc:creator>Chris Ganderton</dc:creator>
				<category><![CDATA[General Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.thefraggle.com/2007/10/27/fixing-tantan-flickr/</guid>
		<description><![CDATA[So I realised that the admin part of the Flickr Photo gallery plugin I use (which is at http://www.thefraggle.com/flickr/) was a bit broken after upgrading wordpress to v2.3.
It appeared to work with the configuration I had set previously. However, when on the options page for the plugin, it was complaining of not being able to [...]]]></description>
			<content:encoded><![CDATA[<p>So I realised that the admin part of the <a href="http://tantannoodles.com/toolkit/photo-album/" title="tantan" target="_blank">Flickr Photo gallery</a> plugin I use (which is at <a href="http://www.thefraggle.com/flickr/" title="mobocracy@flickr" target="_blank">http://www.thefraggle.com/flickr/</a>) was a bit broken after upgrading wordpress to v2.3.</p>
<p>It appeared to work with the configuration I had set previously. However, when on the options page for the plugin, it was complaining of not being able to <a href="http://img.thefraggle.info/wp-imglib/broken-flickr-plugin.jpg" title="broken flickr" target="_blank">find a standard wordpress include</a>.</p>
<p>A quick google search showed me a couple of resources, that <a href="http://blog.bittube.com/2007/09/28/fix-for-tantan-flickr-reports-plugin-on-wordpress-23/" title="http://blog.bittube.com/2007/09/28/fix-for-tantan-flickr-reports-plugin-on-wordpress-23/" target="_blank">told me</a> where I needed to make a slight alteration to the source of my flickr plugin &#8230;</p>
<p>in the file &#8220;<em>/path/to/your/wordpress-install/wp-content/plugins/silaspartners/flickr/admin-options-load.php</em>&#8221;</p>
<pre>    require_once(dirname(__FILE__).$tmpPath.'/wp-admin/admin-db.php');</pre>
<p>needs to change to</p>
<pre>    require_once(dirname(__FILE__).$tmpPath.'/wp-admin/includes/user.php');</pre>
<p>Once that&#8217;s done, the plugin works a treat!</p>
<script type='text/javascript'>
<!--
digg_url='http://www.thefraggle.com/2007/10/27/fixing-tantan-flickr/';
digg_skin = 'compact';
digg_bgcolor = '#FFFFFF';
digg_title = 'TanTan flickr photo gallery broken after upgrade to Wordpress 2.3';
digg_bodytext = '';
digg_topic = '';
//-->
</script>
<script type='text/javascript' src='http://digg.com/tools/diggthis.js'></script>
]]></content:encoded>
			<wfw:commentRss>http://www.thefraggle.com/2007/10/27/fixing-tantan-flickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual domains in exim4</title>
		<link>http://www.thefraggle.com/2007/06/14/virtual-domains-in-exim4/</link>
		<comments>http://www.thefraggle.com/2007/06/14/virtual-domains-in-exim4/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 18:59:04 +0000</pubDate>
		<dc:creator>Chris Ganderton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mail server]]></category>
		<category><![CDATA[mta]]></category>

		<guid isPermaLink="false">http://www.thefraggle.com/2007/06/14/virtual-domains-in-exim4/</guid>
		<description><![CDATA[I&#8217;ve been using exim for a while with virtual domain support, and thought it be best to document what I did somewhere.
For a long time I wondered how I might actually support virtual domains in exim 4 and held off by just dumping all mail from all domains into my mailbox (how gosh darn lazy [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using exim for a while with virtual domain support, and thought it be best to document what I did somewhere.</p>
<p>For a long time I wondered how I might actually support virtual domains in exim 4 and held off by just dumping all mail from all domains into my mailbox (how gosh darn lazy is that).</p>
<p>I finally got bothered enough to, and found a lot of easy to follow help on the internets (google), and came up with  the following additions to my exim4.conf :</p>
<p><code><br />
domainlist localdomains = dsearch;/etc/exim4/virtual : @ : localhost<br />
</code><br />
and in the routers section<br />
<code><br />
begin routers<br />
...<br />
vdom_aliases:<br />
driver = redirect<br />
allow_defer<br />
allow_fail<br />
domains = dsearch;/etc/exim4/virtual<br />
data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}}}<br />
retry_use_local_part<br />
pipe_transport   = address_pipe<br />
file_transport   = address_file<br />
no_more<br />
</code></p>
<p>As you can see there is a directory called /etc/exim4/virtual, which contains several files, each of which define the aliases for a domain, an example file in that directory could look like:<br />
filename: thefraggle.com</p>
<p><code><br />
* : :fail:<br />
chris : chris@localhost<br />
</code></p>
<p>As you can see this looks pretty simalar to the sendmail aliases file, but requires no rebuilding (if you have used sendmail at some point, you&#8217;ll know that you need to issue a &#8220;newaliases&#8221; command.</p>
<p>Anyway, hopefully that wasn&#8217;t too painful, any improvements, suggestions and other observations welcome!</p>
<script type='text/javascript'>
<!--
digg_url='http://www.thefraggle.com/2007/06/14/virtual-domains-in-exim4/';
digg_skin = 'compact';
digg_bgcolor = '#FFFFFF';
digg_title = 'Virtual domains in exim4';
digg_bodytext = '';
digg_topic = '';
//-->
</script>
<script type='text/javascript' src='http://digg.com/tools/diggthis.js'></script>
]]></content:encoded>
			<wfw:commentRss>http://www.thefraggle.com/2007/06/14/virtual-domains-in-exim4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>the number of servers you run &#8230;</title>
		<link>http://www.thefraggle.com/2007/04/13/the-number-of-servers-you-run/</link>
		<comments>http://www.thefraggle.com/2007/04/13/the-number-of-servers-you-run/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 17:34:32 +0000</pubDate>
		<dc:creator>Chris Ganderton</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[General Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.thefraggle.com/2007/04/13/the-number-of-servers-you-run/</guid>
		<description><![CDATA[Well reading popeys blog entry on how many servers he has, and what he uses them for made me feel a bit better than I did previously, about running more than one server of my own for personal use. I only have three servers, and a workstation and a laptop; maybe I don&#8217;t waste as [...]]]></description>
			<content:encoded><![CDATA[<p>Well reading <a href="http://www.popey.com" title="www.popey.com" target="_blank">popeys</a> blog entry on <a href="http://popey.com/What_are_you_using_machines_for" title="http://popey.com/What_are_you_using_machines_for" target="_blank">how many servers he has, and what he uses them for</a> made me feel a bit better than I did previously, about running more than one server of my own for personal use. I only have three servers, and a workstation and a laptop; maybe I don&#8217;t waste as much electricity as I thought I did <img src='http://www.thefraggle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li>etch.thefraggle.com &#8211; Debian etch, xen vps from <a href="http://www.bitfolk.com">bitfolk</a>; general webserver for www.thefraggle.com, and master mail server.</li>
<li>sarge.thefraggle.com &#8211; Debian etch, xen vps from <a href="http://www.bitfolk.com">bitfolk</a>; run&#8217;s IRCd&#8217;s for <a href="http://www.blitzed.org/" title="Blitzed IRC Network">blitzed.org</a> and nixhelp.org and tertiary mail exchanger.</li>
<li>beastie.thefraggle.com &#8211; FreeBSD-6.2-stable on an old p2 400mhz 128mb ram; used to run an ircd for nixhelp, and thefraggle.com website, but now has been retired to being a development machine and tertiary mail exchanger.</li>
<li>laptop &#8211; centrino duo 1.7ghz 1gb ram; work laptop with winxp / debian etch for work stuff</li>
</ul>
<p>There&#8217;s actually another box there, my dads p4 3ghz, that I have pretty much nicked off him for day to day internetting <img src='http://www.thefraggle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I suppose the fact that I have three servers kind of means I am pretty geeky?</p>
<p>Would be interesting if anyone reading this also commented with what they use <img src='http://www.thefraggle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<script type='text/javascript'>
<!--
digg_url='http://www.thefraggle.com/2007/04/13/the-number-of-servers-you-run/';
digg_skin = 'compact';
digg_bgcolor = '#FFFFFF';
digg_title = 'the number of servers you run ...';
digg_bodytext = '';
digg_topic = '';
//-->
</script>
<script type='text/javascript' src='http://digg.com/tools/diggthis.js'></script>
]]></content:encoded>
			<wfw:commentRss>http://www.thefraggle.com/2007/04/13/the-number-of-servers-you-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>always check the disk free!</title>
		<link>http://www.thefraggle.com/2007/04/12/always-check-the-disk-free/</link>
		<comments>http://www.thefraggle.com/2007/04/12/always-check-the-disk-free/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 21:27:22 +0000</pubDate>
		<dc:creator>Chris Ganderton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://www.thefraggle.com/2007/04/12/always-check-the-disk-free/</guid>
		<description><![CDATA[Came up against the strangest problem the other day, which in the end made it blatantly clear that the most simple 1st checks should always be done; that is things like disk space etc.
A server I have access too uses LDAP for user info and Kerberos5 for realm authentication. It was reported that this server [...]]]></description>
			<content:encoded><![CDATA[<p>Came up against the strangest problem the other day, which in the end made it blatantly clear that the most simple 1st checks should <strong>always</strong> be done; that is things like disk space etc.</p>
<p>A server I have access too uses LDAP for user info and Kerberos5 for realm authentication. It was reported that this server wasn&#8217;t letting anyone login via ssh, and the only way that I was able to login, was via the console connection for the box (so essentially the only way to connect was locally).</p>
<p>I was able to prove that LDAP lookups were working, by simply id&#8217;ing on user accounts I knew to not exist locally which were stored in LDAP. I was also able to init a kerberos ticket when logged in, and login as ldap/krb5 users &#8220;locally&#8221;.</p>
<p>After a while of faffing about, enabling debug logging on sshd and so on, it dawned on me to check the disk space, thanks to an odd I/O moan in the sshd debug log. Low and behold! the partition where the kerberos key cache for ssh was completely full!</p>
<p>It goes to show that even simple checks like that which sometimes seem noddy, should always be done!</p>
<script type='text/javascript'>
<!--
digg_url='http://www.thefraggle.com/2007/04/12/always-check-the-disk-free/';
digg_skin = 'compact';
digg_bgcolor = '#FFFFFF';
digg_title = 'always check the disk free!';
digg_bodytext = '';
digg_topic = '';
//-->
</script>
<script type='text/javascript' src='http://digg.com/tools/diggthis.js'></script>
]]></content:encoded>
			<wfw:commentRss>http://www.thefraggle.com/2007/04/12/always-check-the-disk-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
