Archive

Archive for the ‘Other’ Category

Using a secondary IP with cPanel’s exim

December 17th, 2009

Some of our servers have multiple IP addresses configured – in most cases we want to use eth0:1 rather than eth0, but it wasn’t immediately clear how to do this on cPanel’s exim mail server.

The original solution was to modify /etc/exim.conf, but today I discovered that there is a specific file (/etc/mailips) where IPs can be specified per-domain or globally.

To get this working, just setup /etc/mailips as follows:


[domain]: [ip]
[domain2]: [ip]

Obviously, you need to replace [domain] and [ip] with the appropriate entries. In my case, this wasn’t ideal as I wanted to use a single IP globally. Luckily, that’s easily done by using an asterisk (*) for [domain]. I believe it even works alongside specific domain entries, so you could have certain domains sending mail out on unique IPs, and then globally route everything else through another.

Once that file has been edited, you need to modify the cPanel exim configuration by going to Exim Configuration Editor within WHM. If you search for mailips on that page, you’ll see which box you need to check (don’t forget to save afterwards).

Nick Other

WebFaction Memory Usage Script

May 25th, 2009

I have knocked up a simple Ruby script (my first – please be gentle) to parse the output of ps -u -o pid,rss,command and convert the KB values to MB for easier reading.

The script recurses through each process and displays the process ID, memory usage (in megabytes) and the command that it’s executing. It then displays the total memory usage at the end.

Download
memusage.rb (1.21 KB — RB file)

Nick Other ,

SSH Keep-Alive for Mac OS X

May 7th, 2009

I discovered a while back that my SSH sessions weren’t staying active despite having the appropriate settings in /etc/ssh/ssh_config.

The other day, I found an article on Google with another way to get keep-alives working – luckily this seems to have worked.

Read more…

Nick Other ,

WebFaction Bits

May 6th, 2009

A list of some useful bits and pieces gathered from the WebFaction forum, support system and so on.

Find a process and kill it

ps -u <username> -o pid,command
kill <process_id>

Memory usage (outputs in Kilobytes)

ps -u <username> -o rss,command

Cron Setup
If you’re not familiar with vi, you can change the default editor to something easier such as nano by typing: export VISUAL='nano'.

You can add/modify/remove your cron-jobs by typing: crontab -e

Software

Nick Other

Chillax, d00d

April 5th, 2009

Mike from ClickableBliss (which incidentally makes a really nice invoicing application for Mac) has pointed out something that really irks me with modern web companies – they are too informal!

Whenever I see informal communication between the company and user (i.e. a message displayed on their website), it conjures up images of long-haired hippies, sitting around an office full of children’s toys, shrugging their shoulders, saying “meh” a lot, and generally pretending that they are 10 years younger (on the basis that they’re likely to be in their twenties).

Why do these companies think it’s all cool and new-age (or whatever) to communicate in such a juvenile manner? It all seems to emanate from this abundance of start-ups (including more established start-ups). It’s all down to this web 2.0 nonsense. I predict another dot-com bubble is soon to burst.

I understand that companies should want to appear more “open” with their customers, but does that mean that professionalism should be forgotten or disregarded?

Don’t get me wrong, I admire what most of these companies are trying to achieve, but if they’re in a position where they’re trying to make money or a (positive) reputation, it doesn’t particularly give a good impression to the customer if the communication they receive is informal, vague or suchlike.

Then again, maybe nobody else cares :-)

Nick Other

Privacy Policy Template

March 26th, 2009

I’ve just created a privacy policy as Google now requires this for their new interest-based advertising, due to launch in April.

I spent a while Googling for a suitable template aimed at UK-based websites, and managed to stumble upon this, which I have modified for use on this website.

Hopefully this will save somebody the effort of finding a suitable template for their own site!

Nick Other