<?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>Kirrus' Blog &#187; sysadmin</title>
	<atom:link href="http://kirrus.co.uk/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://kirrus.co.uk</link>
	<description>MindDump. Photos. And random ramblings.</description>
	<lastBuildDate>Sat, 21 Apr 2012 14:22:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>MySQL Linux CLI command execution</title>
		<link>http://kirrus.co.uk/2012/03/mysql-linux-cli-command-execution/</link>
		<comments>http://kirrus.co.uk/2012/03/mysql-linux-cli-command-execution/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 18:08:42 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remember This]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=706</guid>
		<description><![CDATA[As another aid to my memory, you can run mysql commands on the command line like this: mysql -u user -p[password] database -e "SELECT * FROM orders;". &#160; You can also send the mysql client commands on stdin: echo "SELECT * FROM orders" &#124; mysql -u user -p[password] database &#160; Or read them in with [...]]]></description>
			<content:encoded><![CDATA[<p>As another aid to my memory, you can run mysql commands on the command line like this:</p>
<pre>mysql -u user -p[password] database -e "SELECT * FROM orders;".</pre>
<p>&nbsp;</p>
<p>You can also send the mysql client commands on stdin:</p>
<pre>echo "SELECT * FROM orders" | mysql -u user -p[password] database</pre>
<p>&nbsp;</p>
<p>Or read them in with a file redirection</p>
<pre>mysql -u user -p[password] database &lt; /home/kirrus/orders.sql</pre>
<p>That last one is really handy for reading MySQL dumps back into MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2012/03/mysql-linux-cli-command-execution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting lots of tiny files really really quickly</title>
		<link>http://kirrus.co.uk/2012/02/deleting-lots-of-tiny-files-really-really-quickly/</link>
		<comments>http://kirrus.co.uk/2012/02/deleting-lots-of-tiny-files-really-really-quickly/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 16:19:06 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remember This]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=691</guid>
		<description><![CDATA[This is the second half of that magento issue. Mainly, after having got a directory with millions of files in it, you can do one of two things. mv sessions sessions_full &#38;&#38; mkdir sessions &#38;&#38; chown www-data:www-data sessions rm -rfv sessions_full Or find /loc/of/sessions -ctime +1 -type f -exec rm -v {} \;]]></description>
			<content:encoded><![CDATA[<p>This is the second half of that magento issue. Mainly, after having got a directory with millions of files in it, you can do one of two things.</p>
<pre>mv sessions sessions_full &amp;&amp; mkdir sessions &amp;&amp; chown www-data:www-data sessions</pre>
<pre>rm -rfv sessions_full</pre>
<p>Or</p>
<pre>find /loc/of/sessions -ctime +1 -type f -exec rm -v {} \;</pre>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2012/02/deleting-lots-of-tiny-files-really-really-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bind refuses to restart, debian squeeze</title>
		<link>http://kirrus.co.uk/2012/02/bind-refuses-to-restart-debian-squeeze/</link>
		<comments>http://kirrus.co.uk/2012/02/bind-refuses-to-restart-debian-squeeze/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 13:34:13 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remember This]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[squeeze]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=681</guid>
		<description><![CDATA[After an upgrade, I&#8217;ve noticed a few times that bind has refused to restart or reload, saying: Stopping domain name service: namedrndc: connect failed: connection refused This seems to be a permissions bug in debian, quite a long lasting one. In order to cheat-fix it quickly, I do the following: chown bind:root /etc/bind/rndc.key chmod 660 [...]]]></description>
			<content:encoded><![CDATA[<p>After an upgrade, I&#8217;ve noticed a few times that bind has refused to restart or reload, saying:</p>
<pre>Stopping domain name service: namedrndc: connect failed: connection refused</pre>
<p>This seems to be a permissions bug in debian, quite a long lasting one. In order to cheat-fix it quickly, I do the following:</p>
<pre>chown bind:root /etc/bind/rndc.key</pre>
<pre>chmod 660</pre>
<pre>/etc/init.d/bind9 restart</pre>
<p>That seems to fix it well enough. I think it&#8217;s a problem in that bind starts as one user, but runs as another. It may be that 440 are all the perms that are necessary. The debian bug report is here: <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=169577">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=169577</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2012/02/bind-refuses-to-restart-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Session Files</title>
		<link>http://kirrus.co.uk/2012/02/magento-session-files/</link>
		<comments>http://kirrus.co.uk/2012/02/magento-session-files/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 12:40:19 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remember This]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=679</guid>
		<description><![CDATA[Magento (the popular open-source online shop system) likes to store its PHP session files in ~/public_html/var/session/ Most debian servers don&#8217;t have that in their cron job that deletes old session files. So, you probably want to set it to store it&#8217;s session files in the default location (/var/lib/php5) or alter your cron job (/etc/cron.d/php5) Fun!]]></description>
			<content:encoded><![CDATA[<p>Magento (the popular open-source online shop system) likes to store its PHP session files in ~/public_html/var/session/</p>
<p>Most debian servers don&#8217;t have that in their cron job that deletes old session files.</p>
<p>So, you probably want to set it to store it&#8217;s session files in the default location (/var/lib/php5) or alter your cron job (/etc/cron.d/php5)</p>
<p>Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2012/02/magento-session-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quick useful sysadmin stuff</title>
		<link>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/</link>
		<comments>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 13:10:01 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Remember This]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-UK Planet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=320</guid>
		<description><![CDATA[Two useful things I have found or use Firefox Awesomebar search trick A wonderful tip, that someone sent into the ubuntu-uk podcast. (I can&#8217;t remember who, or the episode. Comment if you know and I&#8217;ll credit them here! ) You can search, in any website&#8217;s search function, using firefox&#8217;s address bar. Now, at first glance [...]]]></description>
			<content:encoded><![CDATA[<p>Two useful things I have found or use <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Firefox Awesomebar search trick</h2>
<p>A wonderful tip, that someone sent into the ubuntu-uk podcast. (I can&#8217;t remember who, or the episode. Comment if you know and I&#8217;ll credit them here! <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>You can search, in any website&#8217;s search function, using firefox&#8217;s address bar. Now, at first glance this sounds really boring and useless, but it really isn&#8217;t, at all.</p>
<p>First, we need to find a website to search. Let&#8217;s use launchpad&#8217;s bugs search, for Ubuntu. So, we go here:</p>
<p>https://bugs.launchpad.net/ubuntu/</p>
<p><a href="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-add-keyword-bookmark.png"><img class="alignright size-medium wp-image-321" title="Screenshot Firefox add search bookmark" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-add-keyword-bookmark-300x124.png" alt="Screenshot Firefox add search bookmark" width="300" height="124" /></a>Then, right click on the search box, and click &#8220;Add a keyword for this search&#8221;. This brings up the standard bookmark &#8211; your search keywords are stored as a bookmark. Give it a useful name, something to help you next time you go sorting through your book marks. Now, the keyword is how we use this trick. I&#8217;m going to use &#8220;bugs&#8221;, but you can use anything you want, just remember, this is the word you put before your search string in the address bar. Click Add.</p>
<p><img class="alignright size-full wp-image-322" title="Screenshot Firefox address bar search for bugs" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-search-for-lp-bugs.png" alt="Screenshot Firefox address bar search for bugs" width="368" height="29" />Now, all we have to do, is to search for a bug. Let&#8217;s use the classic bug 1.</p>
<p>Open a new tab (CTRL + T), then in the address bar type [your keyword] microsoft market share, and hit enter.</p>
<p>Lo and behold:</p>
<p><a href="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-bugs-in-ubuntu-ms-marketshare.png"><img class="aligncenter size-full wp-image-324" title="Screenshot Firefox launchpad bug 1" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-bugs-in-ubuntu-ms-marketshare.png" alt="Screenshot Firefox launchpad bug 1" width="663" height="382" /></a></p>
<h2>Testing SMTP-AUTH the fast way</h2>
<p>Found a really handy little command line program called &#8220;swaks&#8221;. Great if you&#8217;ve ever needed to test SMTP-AUTH, and didn&#8217;t want to have to base64 the username and password yourself. Here&#8217;s a quick rundown on the command and flags I use with them. (Should be fairly obvious, comment if not!)</p>
<blockquote><p>swaks -s [smtp-server-name-or-ip] -au [smtp-auth-user] -ap [smtp-auth-password] -f [from-address-of-testing-email]</p></blockquote>
<p>Hit enter, and it&#8217;ll ask you the &#8220;to&#8221; email address. Type it in, and it gives you the full connection readout, just as if you were doing it with telnet (or netcat) on the command line:</p>
<blockquote><p>&lt;-  220 smtp.our-domain.com ESMTP<br />
-&gt; EHLO gemini<br />
&lt;-  250-smtp.our-domain.com<br />
&lt;-  250-AUTH LOGIN<br />
&lt;-  250-AUTH=LOGIN<br />
&lt;-  250-PIPELINING<br />
&lt;-  250 8BITMIME<br />
-&gt; AUTH LOGIN<br />
&lt;-  334 Z29vZCB0cnkgOikK</p></blockquote>
<p>And so on. <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Meme &#8211; popey isn&#8217;t the only one with a dry book on his desk</title>
		<link>http://kirrus.co.uk/2008/11/book-meme-popey-isnt-the-only-one-with-a-dry-book-on-his-desk/</link>
		<comments>http://kirrus.co.uk/2008/11/book-meme-popey-isnt-the-only-one-with-a-dry-book-on-his-desk/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 14:04:07 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu-UK Planet]]></category>
		<category><![CDATA[meme]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=154</guid>
		<description><![CDATA[I noticed this meme last night, but I was just about hit the sack. Haven&#8217;t had a chance to put it up till now &#8220;Update systems can no longer assume that hosts are alive but must either chase after them until they reappear or be initiated by the host itself on a schedule, as well [...]]]></description>
			<content:encoded><![CDATA[<div class="entry-body">
<div>
<div class="item-body">
<div>I noticed this meme last night, but I was just about hit the sack. Haven&#8217;t had a chance to put it up till now <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>&#8220;Update systems can no longer assume that hosts are alive but must either chase after them until they reappear or be initiated by the host itself on a schedule, as well as any time it discovers that it has rejoined its home network.&#8221;</p></blockquote>
<p>-The Practice of System and Network Administration (second edition) by Thomas Limoncelli, Christina Hogan and Strata Chalup.</p>
<p>To join in just follow the instructions below:</p>
<blockquote><p>1. Grab the nearest book.<br />
2. Open it to page 56.<br />
3. Find the fifth sentence.<br />
4. Post the text of the sentence in your journal along with these instructions.<br />
5. Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.</p></blockquote>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2008/11/book-meme-popey-isnt-the-only-one-with-a-dry-book-on-his-desk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

