Archive for August, 2008

watch – a useful tool

Sunday, August 31st, 2008 | linux | No Comments

I’ve been doing a lot of testing on a newly commissioned Linux cluster recently. A lot of the work involves running various scripts and ensuring that the correct output is generated (or that some output is generated). All too often, I end up typing

ls -la

repeatedly to check the output of some test script or to see whether anything is getting output. I’ve come across watch before but it had slipped my mind. After rediscovering it the other day, I was again reminded how elegant and powerful the unix philosophy of having simple commands which do one thing well but can be chained together to do very complex things is. The task of monitoring a directory is much simplified with a single

watch ls -la /directory

Not to mention the reduced RSI! If you haven’t used watch before or have simply forgotten about it – you might want to revisit, especially if you’re doing a lot of repetitive commands to view the status of something on your system.

On a related note, we wanted to monitor the timestamps of various output files – and the ls command’s usual hour:minute timestamp information lacked the granularity we needed for our measurements. The man page came to the rescue with the following

ls -la –time-style=full-iso

which gives seconds and even milliseconds (for some files, I suspect it depends on the command creating the files) in the timestamp.

Kudos to Blacknight

Saturday, August 23rd, 2008 | business, linux, web | 2 Comments

I’ve been considering moving some of our hosted domains off of our office servers for some time. We’ve been hosting our own websites (http://www.aplpi.com, http://blog.aplpi.com, http://www.atlanticlinux.ie and a few others) and email since we first moved into our existing offices over 4 years ago. In those 4 years I think we’ve had maybe 3 or 4 days outage in total and most of that on weekends. Our email has been backed up by DynDns’s excellent MailHop Backup MX service which has kept any incoming email safe while our mail servers were down. Our office servers are, of course, Linux boxes (running Debian GNU/Linux 4.0, Postfix and SpamAssassin for email and Apache HTTP Server for our web sites) and have proved remarkably stable. To be honest, we don’t receive an earth-shattering volume of web traffic, but thanks to spammers, our mailserver gets plenty of exercise. On one day last week, we suffered a major spam attack which resulted in our mailservers processing over 20,000 mails in a 24-hour period. It did take SpamAssassin a while to process the spam backlog (it missed about 300 spams out of 18,000 or so – not bad going) but our mailserver happily chugged its way through the mail in about 8 hours. Not bad for a tiny Linux server sitting at the end of a plain old DSL line.

Despite all this, I’ve been considering moving to a hosted setup for a number of reasons,

  • Incoming spam, in particular, is a big consumer of the overall capacity of our office DSL line. It makes me wonder if it wouldn’t make more sense to let an ISP who is geared up to handle this kind of junk filter out most of it for us. This gives us more bandwidth to use productively.
  • We’re due to move offices in the next couple of months. Normally, I’d handle this over a weekend and have the infrastructure back up in the new location by the next business day, but it does involve working antisocial hours and you are dependent on all of your service providers having everything set up properly beforehand. I figure if we have the critical stuff hosted, we don’t need to worry about any upheaval during a move.
  • As a Linux consulting and support company, it’s important for us to eat our own dog food when it comes to our software and services – we’ve been doing that with these pieces of Linux infrastructure for quite a while now and have learned a lot. But the time we spend managing those can now be spent on newer services and software, if we offload these services to someone else.
  • Finally, I’m curious to see how well the big guys handle these services – it’s been a few years since I’ve used any hosting companies.

Never one to rush into anything, I figured we’d start by migrating one of our domains and see how it goes from there. I keep an eye on Blacknight Solutions – they’re an Irish ISP and give good support to various Linux and open source events around Ireland. Also, their MD writes a good blog and he seems to be a Stargate Atlantis fan so they have to be a good company to work with (I suspect I won’t be getting an honorary MBA from anyone for that kind of strategic reasoning – but I’m a firm believer in trusting your gut instincts on these things). Michele recently blogged about their new hosting plans and as it happened, the time is right for us to try one out. I purchased their Minimus hosting package during the week with a view to initially migrating our atlanticlinux.ie domain over to it. If that goes well, I’ll migrate the rest over the next few weeks.

My first impressions of Blacknight’s hosting platform is very impressive – they have a very intuitive web interface that lets you configure pretty much everything without resorting to their support. Not only can you configure the usual web and email – but they have included a lovely application installer which lets you install everything from blogging software to shopping cart software.

I did some testing earlier in the week and ironed out a few migration kinks (the main one being that our existing wordpress blogging system needed a PHP timeout to be extended before I could successfully export my existing blog postings from it) and bit the bullet this evening to do the migration. From start to finish, the entire process took about an hour – and most of that was time spent testing and tweaking one or 2 small problems. Granted, the atlanticlinux.ie website, email system and blog are pretty basic and don’t contain a lot of users – but my god, it really couldn’t have been much simpler. Well done Blacknight!

The icing on the cake for me was the wordpress migration – it took all of 10 minutes to

  • Install wordpress on the new site via the Blacknight control panel.
  • Export the wordpress blog data from our existing office wordpress installation.
  • Import the wordpress blog data to our new hosted wordpress installation.
  • And start posting new blog entries like this one.

I’ve done a few wordpress installs in the past and it is a pretty straightforward app to install, but the Blacknight system really does take any issues out.

I’m not generally one to endorse products or services on our blog – but I feel good services and products should be recognised and so far Blacknight have shone in their delivery – both in the product they have and the support they have offered. In my initial testing of their services, I must have logged about 20 support tickets – most of them were answered within minutes and all of the responses I received were intelligent and helpful.

I’ll be the first  to publicly complain if I receive a poor service in the future but so far I’ve been amazed with the quality of service I’ve received, especially considering the price, and no, I’m not receiving any favours to endorse the service. I’m just really impressed with it so far.

Thanks Blacknight.