<?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>Helm&#039;s Technology Blog &#187; servers</title>
	<atom:link href="http://www.ihelm.org.uk/tag/servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ihelm.org.uk</link>
	<description>Linux Servers, Cpanel and Mysql along with my own tech thoughts</description>
	<lastBuildDate>Sun, 11 Jul 2010 10:50:00 +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>Webmail not working in Cpanel</title>
		<link>http://www.ihelm.org.uk/2010/05/webmail-not-working-in-cpanel/</link>
		<comments>http://www.ihelm.org.uk/2010/05/webmail-not-working-in-cpanel/#comments</comments>
		<pubDate>Mon, 10 May 2010 20:59:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[CSF]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=130</guid>
		<description><![CDATA[Had a problem earlier this week, webmail couldn't always send e-mail.  It was coming back with the following error:

SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out.]]></description>
			<content:encoded><![CDATA[<p>Had a problem earlier this week, webmail couldn&#8217;t always send e-mail.  It was coming back with the following error:</p>
<p>SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out.</p>
<p>After reading a few things  I turned on the SMTP tweak..  things appeared to work for a few hours, then it started failing again.</p>
<p>Searching online said to trying telnet on the command line &#8211; so did that, connected to port 25 &#8211; all fine&#8230; hmm odd &#8211; tried webmail again &#8211; failed&#8230;..</p>
<p>After a more indepth search I found a forum which gave me a hint &#8211; apparently other people have had the same problem when using the firewall for cpanel &#8211; CSF.  CSF is definately one of the best firewalls around for linux and works really well with Cpanel &#8211; however every now and again the amount of options can cause you to miss out something obvious:</p>
<p># If SMTP_BLOCK is enabled but you want to allow local connections to port 25<br />
# on the server (e.g. for webmail or web scripts) then enable this option to<br />
# allow outgoing SMTP connections to 127.0.0.1<br />
SMTP_ALLOWLOCAL = 0</p>
<p>The SMTP_ALLOWLOCAL set to 0 stops webmail etc&#8230; not sure when this appeared (the server has been working fine for about 4 months) but change it to 1 &#8211; restart CSF and there we go it&#8217;s working fine <img src='http://www.ihelm.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2010/05/webmail-not-working-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t create or edit a file &#8211; Linux &#8211; but have diskspace?</title>
		<link>http://www.ihelm.org.uk/2010/05/cant-create-or-edit-a-file-linux-but-have-diskspace/</link>
		<comments>http://www.ihelm.org.uk/2010/05/cant-create-or-edit-a-file-linux-but-have-diskspace/#comments</comments>
		<pubDate>Tue, 04 May 2010 21:05:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[disks]]></category>
		<category><![CDATA[inode]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=127</guid>
		<description><![CDATA[Have you ever had a linux server or desktop which all of a sudden couldn't create a file - running "df -h" shows you your disk partitions aren't full?

You've logged in as root to check - and yup you still can't write any files - even a "touch test.txt" fails with a message saying can't write file - disk or partition full?]]></description>
			<content:encoded><![CDATA[<p>Have you ever had a linux server or desktop which all of a sudden couldn&#8217;t create a file &#8211; running &#8220;df -h&#8221; shows you your disk partitions aren&#8217;t full?</p>
<p>You&#8217;ve logged in as root to check &#8211; and yup you still can&#8217;t write any files &#8211; even a &#8220;touch test.txt&#8221; fails with a message saying can&#8217;t write file &#8211; disk or partition full?</p>
<p>You could be out of inodes! Linux stores file address information in inodes &#8211; and if you have a lot of very small files (or quite an oddly setup filesystem) you could be out of inodes&#8230;</p>
<p>How do you find out though?</p>
<p>just type in</p>
<p>&#8220;df -i&#8221; &#8211; same as the normal diskfree space command except it tells you inodes, if you have none left (or very few) you may not be able to create a new file (or edit it if your editor creates temporary lockfiles).</p>
<p>In a future blog I&#8217;ll go through how to resize the number of inodes available (primarily aimed at your temporary dev/shm space as this can suffer from the inode problem if you allocate more to it from a small size &#8211; the number of inodes is not increased so you can run out).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2010/05/cant-create-or-edit-a-file-linux-but-have-diskspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-mounting linux filesystems on the fly.</title>
		<link>http://www.ihelm.org.uk/2010/04/re-mounting-linux-filesystems-on-the-fly/</link>
		<comments>http://www.ihelm.org.uk/2010/04/re-mounting-linux-filesystems-on-the-fly/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 21:28:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[partitions]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[umount]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=121</guid>
		<description><![CDATA[You can remount a linux system on the fly like this:-

umount tmpfs]]></description>
			<content:encoded><![CDATA[<p>You can remount a linux system on the fly like this:-</p>
<p>umount tmpfs</p>
<p>The above command will ask the OS to unmount the filesystem identified by tmpfs in the fstab file.</p>
<p>This may return an error if you are actively using it &#8211; i.e. you have an ssh session open and are in the filesystem or open files exist. &#8211; Exit any of these and try again <img src='http://www.ihelm.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>mount tmpfs</p>
<p>The above command will attempt to re-mount the drive.</p>
<p>When would you use this?  Normally if you have done some dynamic re-sizing of a partition  - for example the tmpfs partition &#8211; see post:</p>
<p><a href="http://www.ihelm.org.uk/2010/04/resizing-ram-disk-in-linux-devshm/">http://www.ihelm.org.uk/2010/04/resizing-ram-disk-in-linux-devshm/</a></p>
<p>for more info on how to do that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2010/04/re-mounting-linux-filesystems-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating Cpanel accounts to  new Cpanel Server &#8211; by command line.</title>
		<link>http://www.ihelm.org.uk/2010/03/migrating-cpanel-accounts-to-new-cpanel-server-by-command-line/</link>
		<comments>http://www.ihelm.org.uk/2010/03/migrating-cpanel-accounts-to-new-cpanel-server-by-command-line/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 21:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=112</guid>
		<description><![CDATA[The Cpanel system has a feature to migrate accounts from another server - be it Cpanel or another webhosting panel - this often works, recently though I've had a problem with using it for Cpanel to Cpanel where it would connect but fail to transfer the backup file.]]></description>
			<content:encoded><![CDATA[<p>Cpanel is a good system for administrating a server with many sites on it, i&#8217;ve used ensim, webmin and a couple of others in years gone by (Plesk and parallels were disasters for me!).  However occasionally something that you think should work just doesn&#8217;t and for no obvious reason.</p>
<p>The Cpanel system has a feature to migrate accounts from another server &#8211; be it Cpanel or another webhosting panel &#8211; this often works, recently though I&#8217;ve had a problem with using it for Cpanel to Cpanel where it would connect but fail to transfer the backup file.</p>
<p>Fortunately it&#8217;s really easy to use the commandline with cpanel and you can do it manually (actually it&#8217;s easier than the wizard!)</p>
<p>On the server you are migrating from just type (while logged in as root!)</p>
<p><strong>/scripts/pkgacct <em><span style="text-decoration: underline;">username</span></em></strong></p>
<p>This will create a tar.gz in the /home directory on the server &#8211; just copy this to the new server (it could take a while &#8211; it has everything from the account you are copying).</p>
<p>On the destination server just type in</p>
<p><strong>/scripts/restorepkg </strong><em><span style="text-decoration: underline;"><strong>username</strong></span></em></p>
<p>This creates (or overwrites the account!) on the server &#8211; and your done!.  But what if you have a dedicated IP (due to SSL?)</p>
<p>Easy just use this instead</p>
<p><strong>/scripts/restorepkg &#8211;ip=y <em><span style="text-decoration: underline;">username</span></em></strong></p>
<p>This gives it the next free dedicated IP address (make sure you have one free!)</p>
<p>And that&#8217;s it &#8211; it is honestly easier than the wizard which requires you to add more info to establish the transfer link.</p>
<p>One thing to note is that you should ensure that the versions of cpanel are as near as you can get &#8211; otherwise it might fail or do things a little weird.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2010/03/migrating-cpanel-accounts-to-new-cpanel-server-by-command-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exim Mail Server Commands</title>
		<link>http://www.ihelm.org.uk/2009/07/exim-mail-server-commands/</link>
		<comments>http://www.ihelm.org.uk/2009/07/exim-mail-server-commands/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 20:18:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=84</guid>
		<description><![CDATA[Those of you with Exim will sometimes needs to do some work on it &#8211; here&#8217;s a list of the commands which I find most useful: If you want to see what exim is doing right now : &#8220;exiwhat&#8221; if you think you have queue problems then you can print a countof messages in the [...]]]></description>
			<content:encoded><![CDATA[<p>Those of you with Exim will sometimes needs to do some work on it &#8211; here&#8217;s a list of the commands which I find most useful:</p>
<p>If you want to see what exim is doing right now :</p>
<p>&#8220;exiwhat&#8221;</p>
<p>if you think you have queue problems then you can print a countof messages in the queue this will often be quite high &#8211; so it&#8217;s worth running it a few times over a couple of hours to see if you have a queue problem:</p>
<p>&#8220;exim -bpc&#8221;</p>
<p>If you want more information about what is in the queue then the following command will give you the count, the colume, oldest, newest, domain to be sent to and total summaries.  The oldest and volume parts are often the most informative in this to help you see problem domains.</p>
<p>&#8220;exim -bp | exiqsumm&#8221;</p>
<p>Below are some commands to help you manage the queue &#8211; especially useful if you want to try to purge it or take action.</p>
<p>To tell exim to try to deliver things in the queue according to the rules for a queue run</p>
<p>&#8220;exim -q -v&#8221;</p>
<p>If you are blocked up with external mail you can tell exim to run the queue to deliver local mail only &#8211; this may help you get things such as notifications etc.. if they are delayed by other mail in the queue</p>
<p>&#8220;exim -ql -v&#8221;</p>
<p>If you have some problems with older mail (maybe spam related) &#8211; you can use the following to delete mail that over 7 days old (the time given is in seconds so just take one day 86400 and multiply it by 7)</p>
<p>&#8220;exiqgrep -o 604800 -i | xargs exim -Mrm&#8221;</p>
<p>There are many many other commands and other examples &#8211; some sites have longer lists, but these are all the commands I have needed (or variations thereof) for administrating my servers over the last 9 years.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/07/exim-mail-server-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use crontab to schedule tasks in Linux</title>
		<link>http://www.ihelm.org.uk/2009/07/how-to-use-crontab-to-schedule-tasks-in-linux/</link>
		<comments>http://www.ihelm.org.uk/2009/07/how-to-use-crontab-to-schedule-tasks-in-linux/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 20:15:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=79</guid>
		<description><![CDATA[Another of the most useful tools in server administration is the Crontab &#8211; you use this to schedule jobs (programs) to run at regular intervals. These tasks can be  varied, from restarting servers, services &#8211; creating files, changing permissions, runing batch programs, deleting files etc&#8230; Of course sometimes crontab is not the best solution as [...]]]></description>
			<content:encoded><![CDATA[<p>Another of the most useful tools in server administration is the Crontab &#8211; you use this to schedule jobs (programs) to run at regular intervals.</p>
<p>These tasks can be  varied, from restarting servers, services &#8211; creating files, changing permissions, runing batch programs, deleting files etc&#8230;</p>
<p>Of course sometimes crontab is not the best solution as it can have several problems &#8211; in which case other choices are available &#8211; including writing your own &#8211; however we will cover that another time.</p>
<p>First a coouple of facts about cron:</p>
<ol>
<li>Cron has evolved a bit since inception but the basic principles are the same &#8211; old server admins are as good as new ones with this tool!</li>
<li>Cron will run new jobs at most once a minute &#8211; that&#8217;s the smallest resolution you can have.</li>
<li>Old systems used to wake up every minute and check for new work &#8211; the same as a simple replacement service might do &#8211; however this didn&#8217;t scale well when cpu power was low but users high on old mainframe systems &#8211; new systems still only execute once a minute.</li>
<li>the cron service loads up any relavent cron files (which exist in users home directories or in /etc/cron.d/) and saves the information so it only needs to run when there is really jobs to run &#8211; when you edit the crontab it reloads it&#8217;s list so it doesn&#8217;t need to keep checking for changes &#8211; it&#8217;s important to edit it right!</li>
<li>Even if a previous program hasn&#8217;t finished &#8211; cron can run it again or run more jobs &#8211; this can bring down badly configured systems! so be careful how you use it.</li>
</ol>
<p>Generally to edit the crontab &#8211; which is where you would add things to run type in &#8220;crontab -e&#8221; &#8211; this will open it in your system editor (vim is my choice, but others can be used).</p>
<p>you will probably see some content &#8211; similar to this:</p>
<pre>
</pre>
<pre style="color: black; background-color: #f9f9f9; line-height: 1.1em; padding: 1em; border: 1px dashed #2f6fab;">1 0 * * *  shutdown -r now</pre>
<p>This means that at one minute past midnight the server will reboot (execture the immediate shutdown and restart command with no delay) each day.  The * are wildcards saying that the instruction should run no matter the criteria of that column (if it&#8217;s all * then it will run each minute).</p>
<p>The fields are the following:   I recommend pasting this in the top of your crontab file &#8211; the # at the start mean it will ignore the entries.</p>
<pre>
</pre>
<pre style="color: black; background-color: #f9f9f9; line-height: 1.1em; padding: 1em; border: 1px dashed #2f6fab;"># .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)  OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  *</pre>
<p>Remember if the program has output you can store it in a file the same as you can on the command line &#8211; just type &#8221; &gt; /var/log/logfile&#8221;</p>
<p>in the entry after the command and it will log output to the file in question.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/07/how-to-use-crontab-to-schedule-tasks-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Grep to find a string inside a file (Linux)</title>
		<link>http://www.ihelm.org.uk/2009/07/using-grep-to-find-a-string-inside-a-file-linux/</link>
		<comments>http://www.ihelm.org.uk/2009/07/using-grep-to-find-a-string-inside-a-file-linux/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:00:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=76</guid>
		<description><![CDATA[Grep is a tool that is used often by system administrators &#8211; including myself, however I often have to double check the syntax online &#8211; as a result this post is to help me find out how and you of course. first I recommend to change to the directory that you think or know the [...]]]></description>
			<content:encoded><![CDATA[<p>Grep is a tool that is used often by system administrators &#8211; including myself, however I often have to double check the syntax online &#8211; as a result this post is to help me find out how and you of course.</p>
<p>first I recommend to change to the directory that you think or know the file containing the text is in:</p>
<ul>
<li>To find the string michael in any file type &#8220;grep michael *         #this will return a the files if any are found within the directory</li>
<li>To find the string michael in any file and search recusively in directories under where you are type  &#8221;grep -R michael *&#8221;</li>
</ul>
<p>Grep is one of the best tools available to an administrator especially for checking log files out and finding regular patterns.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/07/using-grep-to-find-a-string-inside-a-file-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a new swap partition &#8211; Linux</title>
		<link>http://www.ihelm.org.uk/2009/07/adding-a-new-swap-partition-linux/</link>
		<comments>http://www.ihelm.org.uk/2009/07/adding-a-new-swap-partition-linux/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 20:24:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=62</guid>
		<description><![CDATA[I realised after my previous post I realised that it would be worthwhile talking about adding a new partitition.

The first thing you need - or I assume - is that you have a separate hard-drive which is not active (mounted) or can be unmounts using the standard umount command.

We assume the device is sdc  (it could be sdb, sda, hda1 etc..).]]></description>
			<content:encoded><![CDATA[<p>I realised after my previous post I realised that it would be worthwhile talking about adding a new partitition.</p>
<p>The first thing you need &#8211; or I assume &#8211; is that you have a separate hard-drive which is not active (mounted) or can be unmounts using the standard umount command.</p>
<p>We assume the device is sdc  (it could be sdb, sda, hda1 etc..).</p>
<ol>
<li>Ensure the drive is unmounted &#8211; turn off any swap already on it with swapoff (or if it&#8217;s clean of swap partitions then you can ignore swapoff)</li>
<li>type in &#8220;parted /dev/sdc&#8221;  This loads the parted prompt which allows you to manage the disk.</li>
<li>enter &#8220;print&#8221; to view details of any existing partitions and free space.</li>
<li>once you have decided the size you need (at minimum I would recommend match your RAM) type &#8220;mkpartfs part-type linux-swap start end&#8221;  Where for the start and end match the start point available in the print command and ending a number x megabtes above i.e. if the start point is 1024 then the end point would be 5120 for a four gigabyte partition (4096)</li>
<li>once done type quit to exit parted.  The new partition will have been given a number e.g. sdc2 (or higher if others exist)</li>
<li>all that needs doing is to format the partition &#8220;mkswap /dev/sdc&#8221;</li>
<li>to enable it&#8217;s the same process as for the file &#8211; &#8220;swapon /dev/sdc&#8221;</li>
</ol>
<p>If you want to make it work each boot &#8211; then edit the fstab using</p>
<p>vi /etc/fstab</p>
<p>add to the bottom: (press insert to enter edit mode)</p>
<p>/dev/sdc2 swap swap defaults 0 0</p>
<p>then press escape and shift-Z shift-Z</p>
<p>as before you can check to see if it&#8217;s been added by using</p>
<p>/proc/swaps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/07/adding-a-new-swap-partition-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Swap Space without a partition &#8211; Linux</title>
		<link>http://www.ihelm.org.uk/2009/07/adding-swap-space-without-a-partition-linux/</link>
		<comments>http://www.ihelm.org.uk/2009/07/adding-swap-space-without-a-partition-linux/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 19:47:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=59</guid>
		<description><![CDATA[We had a problem on one of the servers which I help administer.  Every now and again RAM usage would max out and SWAP would then be used - this would sometimes max out and bye bye server, normally this happened for only a few seconds and all was fine - however if it lasted more then when SWAP ran out - the server ground to a halt and needed a manual restart.

The server in question is quite busy - but only had 512Meg of RAM (this has since been rectified) historically as it wasn't that busy at first several years ago has slowly grown as websites on it have grown in popularity and databases have grown.

So an immediate fix was required]]></description>
			<content:encoded><![CDATA[<p>We had a problem on one of the servers which I help administer.  Every now and again RAM usage would max out and SWAP would then be used &#8211; this would sometimes max out and bye bye server, normally this happened for only a few seconds and all was fine &#8211; however if it lasted more then when SWAP ran out &#8211; the server ground to a halt and needed a manual restart.</p>
<p>The server in question is quite busy &#8211; but only had 512Meg of RAM (this has since been rectified) historically as it wasn&#8217;t that busy at first several years ago has slowly grown as websites on it have grown in popularity and databases have grown.</p>
<p>So an immediate fix was required &#8211; it had a swap partition &#8211; couldn&#8217;t create a new one, it would mean downtime as we are using the hard-drives!</p>
<p>So added a swap file &#8211; here&#8217;s how to do it:</p>
<ol>
<li>Change to a directory (on a partition) where you have lots of space &#8211; e.g. /home  &#8221;cd /home&#8221;</li>
<li>Create a file swapfile using dev null &#8211; the following command will create a 4meg file:  &#8221;dd if=/dev/zero of=swapfile bs=1024 count=4194304&#8243;<br />
This creates an empty file called &#8220;swapfile&#8221; with a block size of 1024bytes and creates 419304 (to get the size do 4194304 / 1024 then divide by 1024 to get the size in gigabytes).</li>
<li>chmod it so it can be used &#8220;chmod 600 swapfile&#8221;</li>
<li>format the file to a swapfile type so the system can use it &#8220;mkswap swapfile&#8221;</li>
<li>In order to use it &#8211; turn it on &#8220;swapon swapfile&#8221;</li>
</ol>
<p>At the end of this if yo do the following &#8220;cat /proc/swaps&#8221; to see your swapspace.  It&#8217;s now larger by a lot and hey presto.  Of course a long-term fix has to be more ram if possible or tweak your setups! (or a new server!)</p>
<p>This doesn&#8217;t get setup to activate on boot &#8211; mainly because I didn&#8217;t need this &#8211; a temporary fix and therefore didn&#8217;t want todo this as the RAM would be upgraded soon, but if you need more memory &#8211; and don&#8217;t mind it being slow for stability then this is a possible solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/07/adding-swap-space-without-a-partition-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R-U-ON IPhone app &#8211; Server Monitoring</title>
		<link>http://www.ihelm.org.uk/2009/06/r-u-on-iphone-app-server-monitoring/</link>
		<comments>http://www.ihelm.org.uk/2009/06/r-u-on-iphone-app-server-monitoring/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 21:38:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[r-u-on]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.ihelm.org.uk/?p=46</guid>
		<description><![CDATA[Kick-starting an Iphone app review cycle, first up is one of the most useful app&#8217;s I have for server monitoring. R-U-ON http://www.r-u-on.com/ is a great service, which has a free level and a paid.  Personally I used the free service for several years, now I use the paid service. The Iphone app works with both [...]]]></description>
			<content:encoded><![CDATA[<p>Kick-starting an Iphone app review cycle, first up is one of the most useful app&#8217;s I have for server monitoring.</p>
<p>R-U-ON <a href="http://www.r-u-on.com/">http://www.r-u-on.com/</a> is a great service, which has a free level and a paid.  Personally I used the free service for several years, now I use the paid service.</p>
<p>The Iphone app works with both absolutely fine.  Basically you create an account and then download a small program called an &#8220;agent&#8221;, this is set running or installed on your computer or server &#8211; these agents then connect to the r-u-on servers and send information.</p>
<p>You can get information about several things, most useful to myself is disk space, virtual memory usage, ram usage, cpu and load stats.  If any of these exceed limits set (you can customise them).  Critical failures can be notified by text message (theres a fee involved for this) which is absolutely essential.</p>
<p>The IPhone app simply connects to the r-u-on account and shows a summary, of your alarms (server&#8217;s which have exceeded a notification threshold &#8211; see the graphic below for this), or general server status &#8211; which hopefully is all green and show&#8217;s that all your servers are running well.  You can also view your trouble tickets, personally I&#8217;ve never done this and have no real idea what it is.</p>
<div id="attachment_47" class="wp-caption aligncenter" style="width: 330px"><a rel="attachment wp-att-47" href="http://www.ihelm.org.uk/2009/06/r-u-on-iphone-app-server-monitoring/ruon/"><img class="size-full wp-image-47" title="R-U-On server monitoring app" src="http://www.ihelm.org.uk/wp-content/uploads/2009/06/ruon.png" alt="Screenshot of the alarm screen." width="320" height="480" /></a><p class="wp-caption-text">Screenshot of the alarm screen.</p></div>
<p>The only thing missing from the app is the ability for it to run in the background, though of course the Apple SDK does forbid this &#8211; bah! however it would be great if it could or some kind of background notification system used (which I believe may be available in OS 3.0 but not 100% sure).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihelm.org.uk/2009/06/r-u-on-iphone-app-server-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->