<?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>R.I.Pienaar &#187; sysadmin</title>
	<atom:link href="http://www.devco.net/archives/tag/sysadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.devco.net</link>
	<description>www.devco.net</description>
	<lastBuildDate>Thu, 29 Jul 2010 09:08:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>What does puppet manage on a node?</title>
		<link>http://www.devco.net/archives/2009/07/30/what_does_puppet_manage_on_a_node.php</link>
		<comments>http://www.devco.net/archives/2009/07/30/what_does_puppet_manage_on_a_node.php#comments</comments>
		<pubDate>Thu, 30 Jul 2009 16:51:47 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=457</guid>
		<description><![CDATA[Sometimes it&#8217;s nice to try and figure out what resources of a machine are being managed by puppet.&#160; Puppet keeps a state file in either YAML or Marshall format called localconfig.yaml it&#8217;s full of useful information, I wrote a quick script to parse it and show you what&#8217;s being managed. Typical output is: Classes included [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s nice to try and figure out what resources of a machine are being managed by puppet.&nbsp; Puppet keeps a state file in either YAML or Marshall format called <i>localconfig.yaml</i> it&#8217;s full of useful information, I wrote a quick script to parse it and show you what&#8217;s being managed.</p>
<p>Typical output is:</p>
<blockquote><p>Classes included on this node:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nephilim.ml.org<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; common::linux<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;snip&gt;</p>
<p>Resources managed by puppet on this node:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service{smokeping: }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defined in common/modules/smokeping/manifests/service.pp:6</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file{/etc/cron.d/mrtg: }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defined in common/modules/puppet/manifests/init.pp:201<br />&lt;snip&gt;</p></blockquote>
<p>It will show all classes and all resources including where in your manifests the resource comes from.&nbsp; Unfortunately for resources created by defines it shows the define as the source but I guess you can&#8217;t have it all.</p>
<p>You can get the code <a href="http://www.devco.net/code/parselocalconfig.rb">here</a> it&#8217;s pretty simple, just pass it a path to your localconfig.yaml file, it supports both YAML and Marshal formats.</p>
<p>The file also has every property of the resources in it etc, so you can easily extend this to print a lot of other information, just use something like <i>pp</i> to dump out the contents of <i>Puppet::TransObject</i> objects to see what&#8217;s possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2009/07/30/what_does_puppet_manage_on_a_node.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL Defaults and Load time</title>
		<link>http://www.devco.net/archives/2009/03/23/mysql_defaults_and_load_time.php</link>
		<comments>http://www.devco.net/archives/2009/03/23/mysql_defaults_and_load_time.php#comments</comments>
		<pubDate>Mon, 23 Mar 2009 08:03:57 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=443</guid>
		<description><![CDATA[We all know not to use the default mysql config, right? Well I accidentally left a machine to defaults, then tried to load a massive dump file into it, a month later I finally killed the process loading the data.&#160; I gave up on it ages ago but it got to the point where it [...]]]></description>
			<content:encoded><![CDATA[<p>We all know not to use the default mysql config, right?</p>
<p>Well I accidentally left a machine to defaults, then tried to load a massive dump file into it, a month later I finally killed the process loading the data.&nbsp; I gave up on it ages ago but it got to the point where it was some curiosity to see just how long it will take.</p>
<p><center><img src="http://www.devco.net/images/mysql-load-std.png" /></center>As you can see from above, it was pretty dismal, slowly creeping up over time &#8211; the big jump in the beginning is when I scp&#8217;d the data onto the machine.&nbsp; So after killing it I had another look at the config and noticed it was the default distributed one, tuned it to better use the memory for innodb buffers and got the result below.</p>
<p><center><img src="http://www.devco.net/images/mysql-load-tuned.png" /></center>That&#8217;s just short of 2 days to load the data, still pretty crap, but so much better at the same time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2009/03/23/mysql_defaults_and_load_time.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iptables chains</title>
		<link>http://www.devco.net/archives/2009/03/21/iptables_chains.php</link>
		<comments>http://www.devco.net/archives/2009/03/21/iptables_chains.php#comments</comments>
		<pubDate>Sat, 21 Mar 2009 13:02:07 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=442</guid>
		<description><![CDATA[A lifetime ago when I still gave a damn for FreeBSD I wrote about ipfw tables, I still really love ipfw&#8217;s simple syntax and really wish there was something similar for Linux rather than Human Error Guaranteed convoluted syntax mess that&#8217;s iptables. Anyway, so in my case I have machines all over, one off VPS [...]]]></description>
			<content:encoded><![CDATA[<p>A lifetime ago when I still gave a damn for FreeBSD I wrote about <a href="http://www.devco.net/archives/2005/02/28/ipfw_tables.php">ipfw tables</a>, I still really love ipfw&#8217;s simple syntax and really wish there was something similar for Linux rather than Human Error Guaranteed convoluted syntax mess that&#8217;s iptables.</p>
<p>Anyway, so in my case I have machines all over, one off VPS machines, dom0&#8242;s with a subnet routed to them and so forth.&nbsp; I often have rules that need to match on all my ips, things like allow data into my backup server, allow config retrieval from my puppetmaster etc.&nbsp; I do not want to maintain my total list of ips 10 times over so how to deal with it? </p>
<p>This is a good fit for ipfw tables, you create a table &#8211; essentially an object group like in a Cisco PIX or ASA &#8211; and then use it to match source IPs.</p>
<p>In the last week I&#8217;ve asked quite a few people how they&#8217;d do something similar with iptables but no-one seemed to know, I had people who were happy to maintain the same list many times.&nbsp; People who would use tools like sed to insert it into their rules and everything in between.&nbsp; I think I know a better way so I figured I&#8217;ll blog about it because it&#8217;s obviously something people do not just understand.</p>
<p>Iptables ofcourse use chains, and you can jump to and from chains all you want, this is very simple, so lets create a chain with all my IPs</p>
<blockquote><p>-A my_ips -s 192.168.1.1 -m comment &#8211;comment &#8220;box1.com&#8221; -j ACCEPT<br />-A my_ips -s 192.168.2.1 -m comment &#8211;comment &#8220;box2.com&#8221; -j ACCEPT<br />-A my_ips -s 192.168.3.1 -m comment &#8211;comment &#8220;box3.com&#8221; -j ACCEPT</p></blockquote>
<p>This creates a chain <i>my_ips</i> that just accepts all traffic from my IP addresses, now lets see how we&#8217;d allow all my ip addresses into my webserver?</p>
<blockquote><p>-A INPUT -p tcp &#8211;dport 80 -m tcp -j my_ips</p></blockquote>
<p>So this is something almost as good as a ipfw table, I can reuse it many times on many machines and my overall configuration is much more simple.&nbsp; It&#8217;s not quite as powerful as a table but for my needs it&#8217;s fine.</p>
<p>Combined with a tool like <a href="http://reductivelabs.com/products/puppet/">Puppet</a> that manages your configurations you can ensure that this chain is installed on any machine that uses iptables, ready to be used and also trivial to update whenever you need too without having to worry about human error incurred from having to maintain many copies of essentially the same data.&nbsp; </p>
<p>In my environment when I update this table, I check it into SVN and within 30 minutes every machine in my control has the new table and they&#8217;ve all reloaded their iptables rules to activate it.&nbsp; Testing is very easy since puppet allows you to use environments similar to Rails has and so if I really need to I can easily test firewall changes on a small contained set of machines, distributed object group management with version control and everything rolled into one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2009/03/21/iptables_chains.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting only certain lines from a file</title>
		<link>http://www.devco.net/archives/2008/01/09/extracting_only_certain_lines_from_a_file.php</link>
		<comments>http://www.devco.net/archives/2008/01/09/extracting_only_certain_lines_from_a_file.php#comments</comments>
		<pubDate>Wed, 09 Jan 2008 21:36:09 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=413</guid>
		<description><![CDATA[This is probably old news to most people but I need to remember this so I figured I may as well blog it. I made a mysqldump that just takes all databases into a single file, already I want to kick myself because I know if I ever need to import it there will be [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably old news to most people but I need to remember this so I figured I may as well blog it.</p>
<p>I made a mysqldump that just takes all databases into a single file, already I want to kick myself because I know if I ever need to import it there will be troubles because the target database will already have the mysql database etc.</p>
<p>Really I should have used <a href="http://www.fr3nd.net/projects/mysqlpdump/">MySQL Parallel Dump</a> that makes files per tables etc and is much faster but it didn&#8217;t exist at the time.</p>
<p>So how to pull lines 8596 to 9613 from this big file?&nbsp; It&#8217;s trivial with sed:</p>
<p>here is a sample file:</p>
<blockquote><pre>$ cat &gt; file.txt
line 1
line 2
line 3
line 4
line 5
^D
$ sed -n '2,4p;4q' file.txt
line 2
line 3
line 4
</pre>
</blockquote>
<p>The sed command just tells it the start to end line and also to quit processing when it hits the end line, really kewl.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2008/01/09/extracting_only_certain_lines_from_a_file.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QNAP TS-209 pro NAS</title>
		<link>http://www.devco.net/archives/2007/12/14/qnap_ts-209_pro_nas.php</link>
		<comments>http://www.devco.net/archives/2007/12/14/qnap_ts-209_pro_nas.php#comments</comments>
		<pubDate>Fri, 14 Dec 2007 10:05:27 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=407</guid>
		<description><![CDATA[I have been looking for a good solid SOHO Network Attached Storage device for a while.&#160; I was all set on the Lacie 2big 1.5TB Network device, it is attractive does what I needed &#8211; not much more than share files &#8211; and supports multiple drives. Problem is I have since discovered that Lacie UK [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking for a good solid SOHO Network Attached Storage device for a while.&nbsp; I was all set on the Lacie 2big 1.5TB Network device, it is attractive does what I needed &#8211; not much more than share files &#8211; and supports multiple drives.</p>
<p>Problem is I have since discovered that Lacie UK are the most incompetent people on the planet.&nbsp; I placed the order with them after their site showed they had the unit in-stock on a 3 days delivery time, after placing my order site said the same so I was confident it was all in order.&nbsp; Needless to say the device never came.&nbsp; I emailed their sales lines, no response, I emailed their supports lines, no response.&nbsp; I called them (after spending about a hour tracking down phone numbers) they didn&#8217;t reply to voice mails.</p>
<p>After about 10 calls I eventually spoke to someone who was unhelpful to say the least, I was told next-week, next-week etc a few times, next week came and went and no drive unit so I eventually just canceled my order.&nbsp; No more Lacie devices in my future ever that is a certainty.</p>
<p>Some searching later I found a few excellent reviews over at <a href="http://www.smallnetbuilder.com/">SmallNetBuilder</a> for this and other devices, they even have a very awesome tool for comparing different NAS devices for speed etc, I decided based on <a href="http://www.smallnetbuilder.com/content/view/30181/75/">their review</a> to get the <a href="http://www.qnap.com/pro_detail_feature.asp?p_id=82">QNAP TS-209 pro</a>.</p>
<p>The TS-209 pro is an attractive yet very well built little system, all the screws and connectors are proper solid bits of kit like you&#8217;d expect on real hardware.&nbsp; It is a Linux box and you can ssh to it:</p>
<p></p>
<blockquote><pre># uname -a
Linux vault 2.6.12.6-arm1 #2 Thu Nov 1 03:31:14 CST 2007 armv5tejl unknown
# cat /proc/cpuinfo
Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 332.59
Features        : swp half thumb fastmult
# cat /proc/mdstat
&lt;snip&gt;md0 : active raid1 sdb3[2] sda3[0]
731423296 blocks [2/1] [U_]
[==&gt;..................]  recovery = 10.6% (78181504/731423296) finish=144.0min speed=75574K/sec
</pre>
</blockquote>
<p>So a proper little box then, I put 2 x Seagate 750GB drives into it for the same amount of storage as I would have had in the Lacie, the total price ended being about GBP50 more or so.</p>
<p>That GBP50 is money really well spent in this case.&nbsp; The device has hot swap drives &#8211; I tested it by yanking one out live without any problems, a few beeps, a few emailed alerts and log entries:</p>
<p><center><img src="http://www.devco.net/images/qnap-209pro-hotswap.jpg" /></center><br />The device has a ton of features, the usual SMB shares are there but also NFS, Appletalk, FTP, Web access.&nbsp; It has a MySQL server built in, a webserver with php so you can deploy whatever you want on it.&nbsp; An iTunes server for your MP3s and a typical UPNP media server that will work with your PS3 etc.&nbsp; </p>
<p>This is a really capable device built on solid technology, so far I am very happy with it and will recommend to anyone.&nbsp; If anything significant change on my experiences I&#8217;ll post more later but I suggest you read the review linked above and seriously consider this for your SOHO NAS needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2007/12/14/qnap_ts-209_pro_nas.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exim on CentOS 4</title>
		<link>http://www.devco.net/archives/2007/08/03/exim_on_centos_4.php</link>
		<comments>http://www.devco.net/archives/2007/08/03/exim_on_centos_4.php#comments</comments>
		<pubDate>Fri, 03 Aug 2007 07:47:32 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Front Page]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=387</guid>
		<description><![CDATA[I recently bought a new machine from Layeredtech for my commercial mail anti spam system and am having endless troubles with it. I have a similar machine at Hetzner also running CentOS 5 and it too is having problems, though less frequently. The short of it is that the drives disconnect, file systems go read [...]]]></description>
			<content:encoded><![CDATA[<p>I recently bought a new machine from <a href="http://www.layeredtech.com/">Layeredtech</a> for my commercial mail anti spam system and am having endless troubles with it.  I have a similar machine at <a href="http://www.hetzner.de/">Hetzner</a> also running CentOS 5 and it too is having problems, though less frequently.</p>
<p>The short of it is that the drives disconnect, file systems go read only and the box needs a reboot:</p>
<blockquote><pre>
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata1.00: (BMDMA stat 0x4)
ata1.00: tag 0 cmd 0xca Emask 0x4 stat 0x40 err 0x0 (timeout)
ata1: soft resetting port
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
ata1.00: revalidation failed (errno=-5)
sd 0:0:0:0: SCSI error: return code = 0x00040000
end_request: I/O error, dev sda, sector 226813249
Buffer I/O error on device sda3, logical block 27835568
lost page write due to I/O error on sda3
sd 0:0:0:0: SCSI error: return code = 0x00040000
end_request: I/O error, dev sda, sector 227360961
Buffer I/O error on device sda3, logical block 27904032
lost page write due to I/O error on sda3
</pre>
</blockquote>
<p>So in an effort to figure out if this is a CentOS 5 problem &#8211; both ISPs certify CentOS 4 on their hardware &#8211; I needed to get my application going on CentOS 4.  This turned out to be quite a mission involving getting Exim with MySQL and the recently integrate exiscan rather than the patched version.</p>
<p>I looked at the various options and decided to just backport CentOS 5&#8242;s Exim package to CentOS 4.</p>
<p>As it turns out I haven&#8217;t yet had a machine re-installed with CentOS 4 as I found some posts suggesting some kernel parameters that might fix things, I&#8217;ve applied these now to the machines and wait.</p>
<p>My Exim RPMs can be found below:</p>
<p><a href="http://www.devco.net/code/centos-4-exim/exim-4.63-3.src.rpm">exim-4.63-3.src.rpm</a><br />
<a href="http://www.devco.net/code/centos-4-exim/exim-4.63-3.i386.rpm">exim-4.63-3.i386.rpm</a><br />
<a href="http://www.devco.net/code/centos-4-exim/exim-mon-4.63-3.i386.rpm">exim-mon-4.63-3.i386.rpm</a><br />
<a href="http://www.devco.net/code/centos-4-exim/exim-sa-4.63-3.i386.rpm">exim-sa-4.63-3.i386.rpm</a></p>
<p>As with the CentOS 5 ones you&#8217;ll need various DB client libraries installed as this supports speaking to Postgres, MySQL, SQLite etc.</p>
<p>This should be useful to anyone who just wants a more recent version of Exim on their CentOS/RedHat 4 machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2007/08/03/exim_on_centos_4.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physical Memory Info under Linux</title>
		<link>http://www.devco.net/archives/2007/01/22/physical_memory_info_under_linux.php</link>
		<comments>http://www.devco.net/archives/2007/01/22/physical_memory_info_under_linux.php#comments</comments>
		<pubDate>Mon, 22 Jan 2007 10:14:31 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=393</guid>
		<description><![CDATA[I&#8217;ve a number of machines that needs memory upgrades, I didn&#8217;t want to turn them off to see what is inside in order to plan this. Under windows it&#8217;s pretty easy, just download and run CPU-Z and you&#8217;ll know all there is to know. I did a lot of searching etc and eventually came across [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve a number of machines that needs memory upgrades, I didn&#8217;t want to turn them off to see what is inside in order to plan this.  Under windows it&#8217;s pretty easy, just download and run <a href="http://www.cpuid.com/cpuz.php">CPU-Z</a> and you&#8217;ll know all there is to know.<br />
I did a lot of searching etc and eventually came across <i>dmidecode</i>, you just run it as root and it parses through /dev/mem and loads the DMI tables, parses them and prints them in human readable form.<br />
It shows a lot of useful information, on my IBM HS20 Blade it shows model, serial, hardware numbers etc.  Here is a sample of the memory section:</p>
<blockquote><pre>
Handle 0x0017
DMI type 16, 15 bytes.
Physical Memory Array
Location: Proprietary Add-on Card
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 16 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x0018
DMI type 17, 21 bytes.
Memory Device
Array Handle: 0x0017
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: 1
Locator: DIMM1
Bank Locator: Slot 1
Type: DDR
Type Detail: Synchronous
Handle 0x0019
DMI type 17, 21 bytes.
Memory Device
Array Handle: 0x0017
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: 1
Locator: DIMM2
Bank Locator: Slot 2
Type: DDR
Type Detail: Synchronous
Handle 0x001A
DMI type 17, 21 bytes.
Memory Device
Array Handle: 0x0017
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: 2
Locator: DIMM3
Bank Locator: Slot 3
Type: DDR
Type Detail: Synchronous
Handle 0x001B
DMI type 17, 21 bytes.
Memory Device
Array Handle: 0x0017
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: 2
Locator: DIMM4
Bank Locator: Slot 4
Type: DDR
Type Detail: Synchronous
</pre>
</blockquote>
<p>So I have 4 total memory slots, each slot has a 512MB DDR module in it, this means I&#8217;ll be throwing it all away and buying new RAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2007/01/22/physical_memory_info_under_linux.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Further lighttpd details</title>
		<link>http://www.devco.net/archives/2006/12/06/further_lighttpd_details.php</link>
		<comments>http://www.devco.net/archives/2006/12/06/further_lighttpd_details.php#comments</comments>
		<pubDate>Wed, 06 Dec 2006 13:25:54 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=338</guid>
		<description><![CDATA[I&#8217;ve previously written that I am trying out lighttpd for serving up my static files, I&#8217;ve now been running lighttpd and apache in parallel for a while and must say the results are very good in favour of lighttpd. First a graphic to show the change: This is a capture out of cacti showing the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://www.devco.net/archives/2006/10/31/webserver_performance.php">previously</a> written that I am trying out <a href="http://www.lighttpd.net/">lighttpd</a> for serving up my static files, I&#8217;ve now been running lighttpd and apache in parallel for a while and must say the results are very good in favour of lighttpd.<br />
First a graphic to show the change:<br />
<center><img src="http://www.devco.net/images/lighttpd.png"></center><br />
This is a capture out of <a href="http://www.cacti.net/">cacti</a> showing the requests per second for some servers.  Look at the yellow line, till about 12 it was running Apache 1.x, then I took that server out, around 12:30 I put in a lighttpd server on the same box and enabled stats from it around 13:00.  This is on the same hardware, same files etc same IP address and you can clearly see in terms of requests per second lighttpd totally flies compared to Apache on the same box.<br />
The Apache is a stock Debian Apache 1.3.33, I could probably have sped it up by some tuning, but installing lighttpd is much less work and much less painstaking monitoring, tuning, monitoring, tuning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2006/12/06/further_lighttpd_details.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webserver Performance</title>
		<link>http://www.devco.net/archives/2006/10/31/webserver_performance.php</link>
		<comments>http://www.devco.net/archives/2006/10/31/webserver_performance.php#comments</comments>
		<pubDate>Tue, 31 Oct 2006 13:23:35 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Usefull Things]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=342</guid>
		<description><![CDATA[I look after a site that serves up a lot of static content, early on already I ran into issues with Apache coping on one machine, also my bandwidth at my main site is pretty expensive so I started farming off my static content to a number of machines hosted at other ISPs, typically paying [...]]]></description>
			<content:encoded><![CDATA[<p>I look after a site that serves up a lot of static content, early on already I ran into issues with Apache coping on one machine, also my bandwidth at my main site is pretty expensive so I started farming off my static content to a number of machines hosted at other ISPs, typically paying around 100 pounds per machine per month, as long as I push out less than around 100Gb/month it&#8217;s a pretty good deal.<br />
The only problem I have is I get tons of SYN_RECV connections on each of my machines, around 300 of them at any given time.  Typically these indicate a lot of connections waiting to be served but the servers handle new requests immediately, there are no time spent waiting for IO on the servers, in fact the CPU&#8217;s are 98% idle always.<br />
In an effort to try and resolve this (after much tuning of server sysctl&#8217;s) I asked <a href="http://www.serendipity.org.za/">Jaco</a> if he&#8217;s seen it before and he suggested giving <a href="http://www.lighttpd.net/">Lighttpd</a> a try.<br />
I installed it on one of my 3 static servers and ran it for a few days now and the results are encouraging.  I still have 300 SYN_RECV&#8217;s but the machine is performing much faster than its siblings.  On average before Lighttpd I was getting 30 requests/sec out of each of my machines now this one is doing around 50/sec, it is also pushing out about 30Kb/sec more than the other two.  Comparing the Lighttpd machine to 2 apache machines on a graph shows it consistently out performs the others by about 20%.<br />
<center><br />
<table>
<tr>
<td>Uptime</td>
<td>4 days 21 hours 19 min 20 s</td>
</tr>
<tr>
<td>Requests</td>
<td>18 Mreq</td>
</tr>
<tr>
<td>Traffic</td>
<td>20.77 Gbyte</td>
</tr>
<tr>
<td>Requests</td>
<td>105 req/s</td>
</tr>
<tr>
<td>Traffic</td>
<td>89.99 kbyte/s</td>
</tr>
</table>
<p></center><br />
There has been some discussion about Lighttpd and Apache benchmarks, <a href="http://journal.paul.querna.org/articles/2005/06/24/debunking-lighttpd?postid=82">one Apache user has written a debunk of the benchmarks</a>.  This is linked too from the Lighttpd home page so might be worth investigating some more, I&#8217;ve done a lot of the typical things that Apache people recommend but they didn&#8217;t help much.  I think I&#8217;ll try and tune my one Apache server to hit the same performance as the Lighttpd and see if it&#8217;s possible, for now though I&#8217;m quite happy with the results of a quick 30 minutes spent upgrading to Lighttpd.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2006/10/31/webserver_performance.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring PIX Failover using SNMP and Nagios</title>
		<link>http://www.devco.net/archives/2006/08/10/monitoring_pix_failover_using_snmp_and_nagios.php</link>
		<comments>http://www.devco.net/archives/2006/08/10/monitoring_pix_failover_using_snmp_and_nagios.php#comments</comments>
		<pubDate>Wed, 09 Aug 2006 23:09:08 +0000</pubDate>
		<dc:creator>R.I. Pienaar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://wp.devco.net/?p=332</guid>
		<description><![CDATA[I&#8217;ve several pairs of Cisco PIX failover clusters, till now I&#8217;ve never really monitored their status because I do not have snmp-trap servers but today I discovered one pair did a failover due to a cable problem a while ago so I figured it&#8217;s time I do something about it. I&#8217;ve written a quick guide [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve several pairs of Cisco PIX failover clusters, till now I&#8217;ve never really monitored their status because I do not have snmp-trap servers but today I discovered one pair did a failover due to a cable problem a while ago so I figured it&#8217;s time I do something about it.<br />
<center><img src="http://www.devco.net/images/pix-failover-nagios.jpg"></center><br />
I&#8217;ve written a quick guide on using Nagios, Net-SNMP and a few MIBs from Cisco to monitor it and to alert you if any change in the status of your failover clusters happen.<br />
You can get the full document on my Wiki at <a href="http://www.devco.net/pubwiki/PIX/MonitorFailoverWithNagios">http://www.devco.net/pubwiki/PIX/MonitorFailoverWithNagios</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devco.net/archives/2006/08/10/monitoring_pix_failover_using_snmp_and_nagios.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
