<?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>AnyHosting &#187; sysadmin</title>
	<atom:link href="http://anyhosting.com/blog/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://anyhosting.com/blog</link>
	<description>It&#039;s all about the web</description>
	<lastBuildDate>Sat, 10 Apr 2010 03:35:23 +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>limiting I/O and CPU on Linux with nice and ionice</title>
		<link>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/</link>
		<comments>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:03:47 +0000</pubDate>
		<dc:creator>rhelmer</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://anyhosting.com/blog/?p=119</guid>
		<description><![CDATA[In one of my earlier posts about web hosting with Ubuntu Server, I left the startup script for the user-owned Apache instances as an exercise for the reader; the gist of it is to create a script in /etc/init.d/ (based on the &#8220;skeleton&#8221; file in that directory). The meat of it is something like: for [...]]]></description>
			<content:encoded><![CDATA[<p>In one of my <a href="http://anyhosting.com/blog/2009/10/03/secure-shared-web-hosting-on-ubuntu-server-part-2/">earlier posts</a> about web hosting with Ubuntu Server, I left the startup script for the user-owned Apache instances as an exercise for the reader; the gist of it is to create a script in /etc/init.d/ (based on the &#8220;skeleton&#8221; file in that directory). The meat of it is something like:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> d <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/*</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; apache2 <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>apache2.conf <span style="color: #660033;">-k</span> start<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>This iterates over the directories in /var/www and runs Apache for each one, each with it&#8217;s own config file.</p>
<p>One interesting thing you can do here is make the user&#8217;s Apache process &#8220;nice&#8221; to fellow processes:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> d <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/*</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-10</span> ionice <span style="color: #660033;">-c3</span> apache2 <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>apache2.conf <span style="color: #660033;">-k</span> start<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>&#8220;<a href="http://en.wikipedia.org/wiki/Nice_%28Unix%29">nice</a>&#8221; changes priority for tasks waiting on CPU, while &#8220;<a href="http://linux.die.net/man/1/ionice">ionice</a>&#8221; changes the priority for tasks waiting on IO (for example disk reads and writes).</p>
<p>This can keep one busy or misbehaving server from interrupting other sites or important background tasks; alternatively, you could set one site to be highest-priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centralized logging with syslog-ng</title>
		<link>http://anyhosting.com/blog/2009/10/06/centralized-logging-with-syslog-ng/</link>
		<comments>http://anyhosting.com/blog/2009/10/06/centralized-logging-with-syslog-ng/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 22:29:14 +0000</pubDate>
		<dc:creator>rhelmer</dc:creator>
				<category><![CDATA[monitoring]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://anyhosting.com/blog/?p=100</guid>
		<description><![CDATA[Just wanted to point out another excellent post from the Blog O&#8217; Matty on centralized logging with syslog-ng. I actually helped to set up real-time web analysis with syslog-ng (using TCP) and a slightly hacked webalizer (it was ignoring multiple hits happening on the same second) from a FreeBSD/Apache web farm ~10 years ago, and [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to point out another excellent post from the <a href="http://prefetch.net/blog">Blog O&#8217; Matty</a> on <a href="http://prefetch.net/blog/index.php/2009/10/05/slides-from-syslog-ng-presentation/">centralized logging with syslog-ng</a>.</p>
<p>I actually helped to set up real-time web analysis with syslog-ng (using TCP) and a slightly hacked webalizer (it was ignoring multiple hits happening on the same second) from a FreeBSD/Apache web farm ~10 years ago, and have been looking into it again for my current logging needs.</p>
<p>His blog has <a href="http://prefetch.net/blog/index.php/2009/09/30/how-the-linux-oom-killer-works/">consistently</a> <a href="http://prefetch.net/blog/index.php/2009/08/25/securing-linux-file-systems-that-dont-contain-executables/">awesome</a> <a href="http://prefetch.net/blog/index.php/2009/06/15/migrating-kvm-hosts-with-virsh/">posts</a> (if you&#8217;re interested in systems administration), and as your doctor I highly suggest that you <a href="http://prefetch.net/blog/index.php/feed/">subscribe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anyhosting.com/blog/2009/10/06/centralized-logging-with-syslog-ng/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
