<?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>ten.ynottony.net &#187; sys-admin</title>
	<atom:link href="http://ten.ynottony.net/category/sys-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://ten.ynottony.net</link>
	<description>He's at it again...</description>
	<lastBuildDate>Sat, 05 Feb 2011 11:21:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Moving from Slicehost to Linode</title>
		<link>http://ten.ynottony.net/2010/11/moving-from-slicehost-to-linode/</link>
		<comments>http://ten.ynottony.net/2010/11/moving-from-slicehost-to-linode/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 13:05:04 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[sys-admin]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/?p=160</guid>
		<description><![CDATA[Spent the weekend moving HairCrazy from Slicehost to Linode. A few times over the past year and a bit, we&#8217;ve had issues with high steal times on Slicehost, with the only cure being to move to another host server (and &#8230; <a href="http://ten.ynottony.net/2010/11/moving-from-slicehost-to-linode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Spent the weekend moving <a href="http://haircrazy.com">HairCrazy</a> from <a href="https://manage.slicehost.com/customers/new?referrer=889a3bf378b0a300cb99c6bbfb91c940">Slicehost</a> to <a href="http://www.linode.com/?r=5c8d525b3cefd8823f0fc86a7fc15f58247a2617">Linode</a>.</p>
<p>A few times over the past year and a bit, we&#8217;ve had issues with high steal times on <a href="https://manage.slicehost.com/customers/new?referrer=889a3bf378b0a300cb99c6bbfb91c940">Slicehost</a>, with the only cure being to move to another host server (and about an hour of downtime).  The disk latency also had got worse, and we kept bumping up against the memory limits.</p>
<p>After a while discussing it, we finally decided to move to <a href="http://www.linode.com/?r=5c8d525b3cefd8823f0fc86a7fc15f58247a2617">Linode</a> for the following reasons:</p>
<ul>
<li>London based data center. Which is handy, as most of our customers are this side of the Atlantic.  And we like giving our customers a snappy response</li>
<li>Twice the memory for the same price.</li>
<li>So far, the steal time has been at 0% and iowait time has been low too.</li>
<li>The admin console is a bit more comprehensive too, but that wasn&#8217;t a reason for picking <a href="http://www.linode.com/?r=5c8d525b3cefd8823f0fc86a7fc15f58247a2617">Linode</a></li>
</ul>
<p>So far, things seems fine but I&#8217;ll keep an eye on it and report back if I have any issues. </p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2010/11/moving-from-slicehost-to-linode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy Hints: Emptying log files</title>
		<link>http://ten.ynottony.net/2009/04/handy-hints-emptying-log-files/</link>
		<comments>http://ten.ynottony.net/2009/04/handy-hints-emptying-log-files/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 12:59:46 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[sys-admin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[log]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/?p=80</guid>
		<description><![CDATA[When emptying log files, don&#8217;t just rm log_file.log as the disk space won&#8217;t be freed until the application that is logging is restarted. It is better to use &#62; log_file.log as that will allow the file system to free the &#8230; <a href="http://ten.ynottony.net/2009/04/handy-hints-emptying-log-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When emptying log files, don&#8217;t just <code>rm log_file.log</code> as the disk space won&#8217;t be freed until the application that is logging is restarted.</p>
<p>It is better to use <code>&gt; log_file.log</code> as that will allow the file system to free the space that is used by the open file.</p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2009/04/handy-hints-emptying-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy Hints: What is using up my disk space?</title>
		<link>http://ten.ynottony.net/2009/04/handy-hints-what-is-using-up-my-disk-space/</link>
		<comments>http://ten.ynottony.net/2009/04/handy-hints-what-is-using-up-my-disk-space/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:59:36 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[sys-admin]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/?p=74</guid>
		<description><![CDATA[Here are some commands I use to find out what is eating all of my disk space on a remote server: df -h Shows how much disk space is available. The -h means that you get G for gigabytes, M &#8230; <a href="http://ten.ynottony.net/2009/04/handy-hints-what-is-using-up-my-disk-space/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some commands I use to find out what is eating all of my disk space on a remote server:</p>
<p><code> df -h </code> Shows how much disk space is available. The -h means that you get G for gigabytes, M for megabytes etc.</p>
<p><code> sudo du -k / | sort -n </code> Shows which directories are biggest (starting at the root directory /).  The biggest ones will be printed at the bottom of the list.  The sudo allows du to check directories that your user doesn&#8217;t have permission for.  To check your home directory only use <code> du -k ~ | sort -n </code></p>
<p><code> du -ka | sort -n </code> Shows the size of all the files and sub-directories of the current directory.  The biggest ones at the bottom of the list.</p>
<p><code> watch 'du -ka | sort -nr' </code> Shows the size of all the files and sub-directories of the current directory.  The biggest ones at the top of the list.  The list is updated every 2 seconds.  This is useful for watching disk usage in a particular directory, such as an upload directory on a  web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2009/04/handy-hints-what-is-using-up-my-disk-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress upgrade</title>
		<link>http://ten.ynottony.net/2009/02/wordpress-upgrade/</link>
		<comments>http://ten.ynottony.net/2009/02/wordpress-upgrade/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:57:29 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[sys-admin]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/2009/02/11/wordpress-upgrade/</guid>
		<description><![CDATA[I&#8217;m loving the new &#8220;Upgrade&#8221; button in wordpress. Making upgrading of web apps as simple as possible is one way to make sure the users/admins keep the software up to date. Now I just wish that I set up a &#8230; <a href="http://ten.ynottony.net/2009/02/wordpress-upgrade/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m loving the new &#8220;Upgrade&#8221; button in wordpress.</p>
<p>Making upgrading of web apps as simple as possible is one way to make sure the users/admins keep the software up to date.</p>
<p>Now I just wish that I set up a different theme for this site so it didn&#8217;t wipe my adverts out every upgrade&#8230; Oh well.</p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2009/02/wordpress-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy Hints: tail &#124; grep</title>
		<link>http://ten.ynottony.net/2008/12/handy-hints-tail-grep/</link>
		<comments>http://ten.ynottony.net/2008/12/handy-hints-tail-grep/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 11:54:16 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[sys-admin]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/?p=11</guid>
		<description><![CDATA[When trying to track an issue in log files on a live system, I find it handy to tail the logs. If the logs are being populated to quickly too find what I am looking for, I would pipe tail &#8230; <a href="http://ten.ynottony.net/2008/12/handy-hints-tail-grep/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When trying to track an issue in log files on a live system, I find it handy to <code>tail</code> the logs.   If the logs are being populated to quickly too find what I am looking for, I would <code>pipe</code> <code>tail</code> to <code>grep</code> and match on a pattern.</p>
<p><code> tail -f query.log | grep "thing I'm interested in" --color </code></p>
<p>Now you will see any new lines added to query.log that contain &#8220;thing I&#8217;m interested in&#8221; highlighted.  Any other lines will be ignored.</p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2008/12/handy-hints-tail-grep/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSH tricks: Forward and Reverse Tunneling for Fun and Profit</title>
		<link>http://ten.ynottony.net/2008/11/ssh-tricks-forward-and-reverse-tunneling-for-fun-and-profit/</link>
		<comments>http://ten.ynottony.net/2008/11/ssh-tricks-forward-and-reverse-tunneling-for-fun-and-profit/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 20:21:56 +0000</pubDate>
		<dc:creator>Anthony Batchelor</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[sys-admin]]></category>

		<guid isPermaLink="false">http://ten.ynottony.net/2008/11/11/ssh-tricks-forward-and-reverse-tunneling-for-fun-and-profit/</guid>
		<description><![CDATA[SSH or Secure SHell is a protocol for connecting to a remote computer&#8217;s shell securely.Â  Many people use it for just this purpose, but there are several less used, yet extremely useful tricks you can use to get more out &#8230; <a href="http://ten.ynottony.net/2008/11/ssh-tricks-forward-and-reverse-tunneling-for-fun-and-profit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>SSH</strong> or <strong>S</strong>ecure <strong>SH</strong>ell is a protocol for connecting to a remote computer&#8217;s shell securely.Â  Many people use it for just this purpose, but there are several less used, yet extremely useful tricks you can use to get more out of SSH.</p>
<p>In this post, I will cover what forward and reverse tunneling of ports through SSH is.Â  Why you would want to do it, and how to do it.Â  <a href="http://en.wikipedia.org/wiki/Computer_port_(software)" title="Wikipedia page on the term Port">Port</a> tunneling is also known as port forwarding.</p>
<p><span id="more-9"></span></p>
<h2>Forward Tunneling</h2>
<p>Port forwarding allows a specific port to be mapped between one computer and another.Â  A forward tunnel allows you to have a remote port appear as a local one.</p>
<p>This can be useful if you need to connect your MySQL query browser to a remote database, but the database only listens to localhost.Â  Although this section only talks about MySQL, it is applicable to almost any other piece of client/server software that uses specific ports.</p>
<p>To forward port 3306 (MySQL&#8217;s default port) to your local systems port 3306 use the following command:<br />
<code>ssh user@remote-hostname -L 3306:remote-hostname:3306</code></p>
<p>If you are running MySQL locally on port 3306, or want to use a different local port to the remote port, change the port before the first colon:<br />
<code>ssh user@remote-hostname -L <strong>3305</strong>:remote-hostname:3306</code></p>
<p>Then you can connect to your remote MySQL server as if it was a local one.Â  Use the usual username, password and database name as you would to connect to the database, but change the host to 127.0.0.1 and the port to 3305.Â  You should now be able to access the remote database as if it was a local one.</p>
<h2>Reverse Tunneling</h2>
<p>Reverse tunneling allows you to have a port on a remote machine work as if it is a port on your local machine.  It&#8217;s the exact opposite of a forward tunnel.<br />
You could use this when working on code that needed to be accessed by a service that is outside of your firewall, but not ready to be deployed on a server.  For example, developing a payment gateway for a shop, when the payment gateway needs to talk to the code that is on your development machine and you don&#8217;t want to (or can&#8217;t) make modifications to your firewall.</p>
<p>To reverse tunnel port 8080 on a remote server to port 80 on the local machine use the following command:<br />
<code>ssh username@remote-hostname -R 8080:127.0.0.1:80</code><br />
This will let you, <em>or anyone else</em>, visit http://remote-hostname:8080 and see what is visible on http://127.0.0.1:80.  In this case, your local web server is available to anyone who can see remote-hostname.  If remote-hostname is a server available to the whole internet, the whole internet can see into your local machine that is usually hidden behind your firewall.</p>
<h2>Some notes</h2>
<ul>
<li> This guide is for <a href="http://www.openssh.com/" title="The OpenSSH homepage" target="_blank">OpenSSH</a>, other implementations may vary.</li>
<li> You will need to set GatewayPorts to yes in /etc/ssh/sshd_config (Don&#8217;t forget to restart sshd after the change).</li>
<li>When you close your ssh session,Â  the port forwarding stops.</li>
</ul>
<p>For more information, read the OpenSSH <a href="http://www.openssh.com/manual.html" title="OpenSSH documentation" target="_blank">documentation</a> and <a href="http://www.openssh.com/faq.html" title="OpenSSH FAQ" target="_blank">Frequently Asked Questions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ten.ynottony.net/2008/11/ssh-tricks-forward-and-reverse-tunneling-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

