Helm’s Technology Blog

Adding Swap Space without a partition – Linux

by admin on Jul.01, 2009, under Server

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 – it had a swap partition – couldn’t create a new one, it would mean downtime as we are using the hard-drives!

So added a swap file – here’s how to do it:

  1. Change to a directory (on a partition) where you have lots of space – e.g. /home  ”cd /home”
  2. Create a file swapfile using dev null – the following command will create a 4meg file:  ”dd if=/dev/zero of=swapfile bs=1024 count=4194304″
    This creates an empty file called “swapfile” 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).
  3. chmod it so it can be used “chmod 600 swapfile”
  4. format the file to a swapfile type so the system can use it “mkswap swapfile”
  5. In order to use it – turn it on “swapon swapfile”

At the end of this if yo do the following “cat /proc/swaps” to see your swapspace.  It’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!)

This doesn’t get setup to activate on boot – mainly because I didn’t need this – a temporary fix and therefore didn’t want todo this as the RAM would be upgraded soon, but if you need more memory – and don’t mind it being slow for stability then this is a possible solution.

Leave a Comment :, , more...


Super Dad – get’s daughter to sleep!

by admin on Jun.25, 2009, under Eithne

This week we have stopped eithne’s feed at night – this has meant for the first time she wa born 20 months ago I started to put her to bed.

Previously due to having a feed Arianna has been putting her to bed.  Night time on Monday was not fun took over an hour with both of us going in.

On Tuesday I rocked her and she went to sleep after about 30 minutes – nearly putting me to sleep to!

On Wednesday it took about 20 minutes – with a small cry when put down, but all was good.

And tonight it took less than 5 minutes!!  This is pretty much as good as it has been in the past!

So at the end of the day I’m one happy dad!!

Leave a Comment :, more...

R-U-ON IPhone app – Server Monitoring

by admin on Jun.24, 2009, under Iphone, Server

Kick-starting an Iphone app review cycle, first up is one of the most useful app’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 absolutely fine.  Basically you create an account and then download a small program called an “agent”, this is set running or installed on your computer or server – these agents then connect to the r-u-on servers and send information.

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.

The IPhone app simply connects to the r-u-on account and shows a summary, of your alarms (server’s which have exceeded a notification threshold – see the graphic below for this), or general server status – which hopefully is all green and show’s that all your servers are running well.  You can also view your trouble tickets, personally I’ve never done this and have no real idea what it is.

Screenshot of the alarm screen.

Screenshot of the alarm screen.

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 – 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).

Leave a Comment :, , more...

Twitter Weekly Updates for 2009-06-21

by admin on Jun.21, 2009, under Tweets

Leave a Comment : more...

Iphone 3.0 OS update – initial thoughts

by admin on Jun.17, 2009, under Iphone

After waiting and hitting the Check for Updates button over and over again – at 7pm BST it finally arrived.. queue the 200+ MB download and the wait…

Once downloaded the update I had to wait for it to transfer the files – then it rebooted – great stuff… until the emergency call slider appeared – hmm – nothing happened – left for 20 mins – nothing happened.  Odd..

Undock, redock – restart – still the same how odd. Time for the old fav – Turn off….. wait 5 mins….and turn on… and hey presto it worked.. So not the most smooth of updates – but nothing I am not used to.

Right first impressions.

It’s fast… Wayyyy fast, my Iphone is overloaded with apps – I mean really overloaded – we are talking 9 pages or so full of apps… and now it’s fast.

Switching between native things such as SMS , phone and dock is great – the hidden page to the left (spotlight) for searching is great… though maybe not too useful for me – I don’t store documents on the phone afterall.

MMS works with O2 and is brill :) about time – not got anyone to send me one yet – but me sending works – so that’s a big plus – suspect it costs me though, need to find out from O2.

Audio recording – brilliant, had an app to do it before – but this actually is higher quality – and the app tended to get confused if interrupted – this works in the background! so you can do things and it’s still recording – excellent!

Bluetooth pairing with headset – AT LAST – my old old phone could do this – and now my iphone can too – no more cables to listen to things I can wear my nice headphones and get the sound – the quality is good too – better than most pairings!

All in all brilliant – now all I need is the new apps (tom tom??) and video recording – which we know the phone can do if jailbroken – so come on – I don’t need high quality – I just need to be able to record my daughter playing sometimes!!

Oh and on itunes it looks like I can buy movies an series.. seems pretty good, what if my space is limited and the download time seems a bit excessive.. we will see.

Leave a Comment :, more...

rm Argument list too long.. Linux Huh? moment.

by admin on Jun.17, 2009, under Server

I recently had a little problem when deleting a store of spam e-mails off one of my personal servers.

Basically entering the standard death defying command of “rm -Rfv *” while in a directory (this will delete everything recursively – have fun), the system responded “Argument list too long” – cue the first “huh?” moment – I’ve used the command for years and years, never had a problem.

I did “man rm” to check I hadn’t had a “moment” and forgotten how to use it – nope.. . A little trawling came up with several people with the same problem but no really practical solutions.  The problem occurs when you have too many files for the built in systems used by the rm command in the kernel – these are pretty old so have some limits that you don’t expect! – you can do this:

rm -Rfv a* then rm -Rfv A* –  these deletes all files starting with a or A etc.. – very long and rather silly – so after thinking and thinking and muttering an old command came to mind :)  using a combination of find and xargs you can pipe a file on at a time so here we go – my favoured solution:

find . -name * | xargs rm -fv

This works fine – I suspect it will have a limit somewhere, but my server hasn’t hit it yet!

Leave a Comment :, , , more...

Twitter Weekly Updates for 2009-06-14

by admin on Jun.14, 2009, under Tweets

  • RT @iknow_uk: Natural History #Museum, South Kensington, #London http://bit.ly/11QP1a and the original pre-ironed! http://is.gd/ZbG0 #
  • Daily Buzz:: london is having a tube train strike and the dutch exam failure is causing some sunny talks… isn't twitter weird! #
  • RT @iknow_uk: Picture of the day: Nymans Gardens, National Trust Mid Sussex http://bit.ly/wxeS5 and my take! http://tinyurl.com/lyclud #
  • Wants a new iphone! #
  • Wondering why things that are meant to be clever aren't #
  • What's happened to the weather ? Tornado looms over Bude, #Cornwall, as wild weather hits the Southwest http://bit.ly/xoX1y via @iknow_Uk #
  • Looking forward to the apprentice .. and making tea :P #
Leave a Comment : more...

Natural History Museum Picture unfurled

by admin on Jun.11, 2009, under Photo Mods

Iknow Uk seem to have found an ancient picture of the Natural History Museum in London.  Located at http://www.flickr.com/photos/iknow-uk/3600512285/in/set-72157619251872997/

The flickr account appears to have a revamped picture – however exclusively here is the original – before it got ironed flat!

Ancient scroll before being iron'd flat

Ancient scroll before being iron'd flat

Leave a Comment :, , , more...

A little play with some picture work :)

by admin on Jun.09, 2009, under Photo Mods

Saw this on iknow-uk’s flickr account today :  http://www.flickr.com/photos/iknow-uk/3573803284/in/set-72157618835887949/

Nymans Gardens

Nymans Gardens

And since it’s a nice picture I thought I would touch it up a little bit with a couple of programs – so after tweaking I applied a filter to make it look like a watercolour :)  And here it is :)  Nyman Gardens almost as if I painted it myself!

Nymans Gardens - iknow original modified

Nymans Gardens - iknow original modified

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...