admin on August 12th, 2009

So, a friend of mine needed to test an email (SMTP) mail server and was writing something to do this in java when I mentioned that it could be tested via telnet.
Here are some of the commands that I’ve used previously:

Telnet to the mail server on the correct port (by default port 25) e.g. telnet [...]

Continue reading about Testing SMTP from the command line

admin on August 7th, 2009

Recently, I had to go through this process to work out what to do when my friend’s Macbook wouldn’t start.
Here’s a reminder of the things I tried:

Start in Safe Mode. Do this by holding down the Shift key while starting. Release Shift when you see the Apple logo and this spinning thing.
Start in Single User [...]

Continue reading about Troubleshooting a Mac that won’t start

admin on June 12th, 2009

I came across this problem when we were doing a big merge between branches in CVS. Although it doesn’t look like it, the client is making LOTS of connections - they can be seen in /var/log/syslog (on linux) - and there is a limit on the number of connections that can be made in one [...]

Continue reading about CVS server failing (looping)

admin on March 31st, 2009

If you want to edit a bunch of files – for dns updates on bind for example, do this:
sed –i s/<text to replace>/<text to replace with>/g filename_to_change

If you’re concerned about backups, then you can do this:
sed –i’<orginal backup file extension>’ s/<text to replace>/<replacement text>/g filename_to_change
e.g. if we want to edit a file and keep the [...]

Continue reading about Editing files in place with sed

admin on March 25th, 2009

Rsync beats using SCP if you’re trying to copy files from one directory/machine to another. Definitely use rsync if you already have a partial copy and want to copy only new/changed files. This will save you having to copy any files that already exist and are the same.
E.g.
rsync -avz user1@machine1.fqdn:/source/directory/with/all/the/files/* /target/directory/
The -avz options are [...]

Continue reading about Rsync usage and ‘Argument list too long’ error

This is a simple way to get an email from a *nix command line that will test that emails can be sent. I’ve also set it up so that it tells you the name of the user who sent the email and the machine from which it was sent. The time and date is so [...]

Continue reading about How to test email from the command line on a *nix machine

admin on March 13th, 2009

If you’re using NAT on your virtual machines, you can make the guest O/S services accessible from the host O/S by doing port forwarding. Obviously, this means that the guest O/S can be accessed by anything on the network which may be good or bad depending on your environment.
Anyway, here’s the excerpt from the VirtualBox [...]

Continue reading about Adding port forwarding in VirtualBox

admin on March 13th, 2009

There are, apparently, two ways to create a clone of the Virtualbox drives. The ‘right’ way and the ‘wrong’ way.
The right way is to use the following:
VBoxManage clonehd <filename> <outputfile>
You can optionally use the UUID as the input filename.
Anyway, the ‘wrong’ way to do it is to make a copy of the .vdi file in [...]

Continue reading about VirtualBox clone Hard drive

admin on March 10th, 2009

A couple of gotcha’s here…
If you get an error saying that OC4J configuration issue <blah blah instance> not found (often TSH1),  check the ORACLE_SID variable to make sure it’s correct. The ‘$ORACLE_HOME/bin/emctl start dbconsole’ command should now work. Check this by looking at http://servername/1158/em (by default)
The other one is that when you start the Enterprise [...]

Continue reading about Oracle Enterprise manager

admin on January 23rd, 2009

Here’s an interesting slide deck from Jay at MySQL, which shows some very simple concepts to take into account when looking at MySQL performance.
http://www.slideshare.net/techdude/how-to-kill-mysql-performance?src=related_normal&rel=366335

Continue reading about MySQL performance - concepts