Pimp out your Putty SSH Client

It seems like everybody uses the free PuTTY client for accessing SSH from Windows, but the lack of a tabbed interface has always baffled me.

With the PuTTY Connection Manager you can not only use tabs, but also wrap PuTTY in a slick interface. The underlying client is still the same putty.exe that you are used to… in fact the application doesn’t even come bundled with it.

The first time you launch the application you’ll be asked to enter the location to your copy of PuTTY.

Download PuTTY Connection Manager from puttycm.free.fr


And finally, a tabbed version of PuTTY!


The connection manager can be docked to the side by using the little pushpin button.


Right-clicking on a tab or using the Tools menu will allow you to get to the PuTTY menu


In the configuration dialog you can specify a bunch of options including an automatic login macro or passing command line parameters to putty.


You can either click the configuration button above, or choose PuTTY Configuration from the tools menu.


Which brings up the PuTTY Configuration dialog for the actual putty.exe underlying application.


There’s a lot more features to this application that I haven’t gotten to yet… you can even change the theme.

Download PuTTY Connection Manager from puttycm.free.fr

The sendmail that just wouldn’t

Today, I came across the strangest problem I’d ever seen in years of administering sendmail. Normally, sendmail is very much set-and-forget, taking care of emails without any problems. Obviously, today wasn’t normal.

No, not at all. The server had sendmail installed, and properly configured, but wouldn’t send any emails. It’s as if it wasn’t even running.

ps -fea | grep sendmail

Nope, no sendmail. So, let’s start sendmail and check again.

/sbin/service sendmail start

Uh oh. The usual start up messages didn’t appear. Checking if sendmail was running again showed 0 sendmail instances.

After looking through /var/log/message and finding nothing about sendmail anywhere, as well as a stubbornly empty /var/log/maillog, I decided the sendmail binary must be corrupt so issued

yum reinstall sendmail

After yum downloaded and installed the new RPM, I was sure that sendmail would start right up without any problems. I start the service and… nothing happens.

Out of frustration, I decided to run sendmail on the terminal and see where it was failing.

[root@server ~]$ /usr/sbin/sendmail
bash: /usr/sbin/sendmail: No such file or directory

Well, that couldn’t be right. bash had even auto-completed that for me. sendmail had to be installed, as all the other files where there. Wait a minute….

[root@server ~]$ ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 May 30 11:51 /usr/sbin/sendmail -> /etc/alternatives/mta

Most modern servers include alternatives to help manage different programs that provide the same feature. This is accomplished through the /etc/alternatives directory that has symlinks to the actual binaries, as well as /var/lib/alternatives to configure the entire system, which is managed by /usr/sbin/alternatives.

The only problem on the server turned out to be a broken link, /etc/alternatives/mta, which was pointing to a nonexistant qmail installation. The entire problem was fixed by issuing

/usr/sbin/alternatives --set mta /usr/sbin/sendmail.sendmail

I wasn’t happy with this, as it wasn’t “autoconfigured” by alternatives automatically, so I copied /var/lib/alternatives/mta from an identical server that only has sendmail running and ran

/usr/sbin/alternatives --auto mta

alternatives properly detected sendmail, fixed the symlinks in /etc/alternatives and sendmail successfully launched.

Dell really impressed me today

I gotta say that over the years I feel that Dell has burned a hole into my heart producing cheapo equipment just to make the sale.   Well in the past 2-3 years it seems that Dell has really kicked the quality of their product line up a few notches.   Today I was working with a client on our Managed Colocation service, we needed to order his servers so we went ahead assembled them on the website then called dell.

To my surprise the business sales rep was quick to load up the saved cart and begin to check it over with us.   After we made sure everything was listed correctly the rep instantly told us that he could save $600 on the R710 and $400 on the R610, We didn’t even begin to haggle him.   After we agreed on that pricing we then made the one and only request to get more for our money, we asked for idrac enterprise on both servers for free, our wish was granted instantly.

Typically we buy all of our servers through a reseller but for this particular client I felt ordering direct would be a much better experience for them and it paid off.  I have to give my congrats to Dell on earning back my trust in there sales team, I’m absolutely happy to work with them and to use there new servers.

On a side note for any one looking at buying a new OEM server the R610/R710 are absolutely phenomenal buys, and they come with the newest intel E5600 series CPUs.
Update: June 17th 2010.

Dell shipped the servers 2 days ago (Wednesday) they some how got the incorrect address and sent them to the entirely wrong state, thankfully we caught it and had them redirected to the correct destination.   I think this is terrible on dells part, not to mention they confirmed the address multiple times.

Update: June 21st 2010.

The servers in fact arrived at the WRONG address.  After several calls to dell with no resolution I contacted one of my Business reps at dell and within an hour received a call with an “upgraded” server being shipped overnight to the CORRECT address.  They added a 2nd CPU and 15k SAS disk vs 7200 SATA Disk.
We will see when it gets here if it was worth the wait, the other server is scheduled to arrive tomorrow without issue.

Basic MySQL backups

Backing data up in MySQL is super important. The site content is often replaceable, however your board posts, ecommerce orders, etc. are far far harder to replace, if at all possible. The other nice thing is that with a lot of database driven web sites you retain most content even if you only back up the databases. You can still lose things like images, but by and large your posts will still be there even in event of a crash. Since bad code, etc. happens there are a few reasons I would recommend doing backups of the databases.

  • Making server side changes, including configuration tweaks that can influence system stability.
  • Making software changes, even adding plugins etc. to your site. I have seen odd things in the past caused by plugins and they can interact together with not always predictable results.
  • Periodical backups as part of a data protection plan. I would do more than less, by and large most databases are not huge for the data they contain. I have seen forums with about 100,000 posts have about 2GB of database; not really that much if you think about it.

There are a few ways to do backups, but the most common for people who don’t use command line interface is probably going to be PHPMyAdmin. Quite frankly, I do not like using it for database backup and restorations. There are two reasons for this pertaining to reliability

  • If the session timeout of PHP or Apache is too low, you will get an incomplete dump. This means that backup you may have of your databases is all of a sudden found to be truncated at a few megabytes. This is not a big deal for a lot of people with small DBs however if you’re rocking out with 50+ megabyte DBs this can be a huge issue.
  • Restoration can be dependent on if the person has large uploads and large timeouts enabled. Since most people have slower upload than down, it can be a real nuisance to get the DB back up to the server and restored. Not only that but If you have a server with low upload size limits and timeouts, it may be impossible to get that DB back up and restored to the system before you hit one of these limits.

The way I honestly prefer to back my databases up is mysqldump; this allows one to have a lot of control over what gets dumped, do a full backup without worrying about doing it individually etc. It also allows us to make a nice easy cron job to do these backups too if we want.

The way we back a particular DB is up is:

mysqldump dbname > backup.sql

This will put the database named dbname into backup.sql. I believe you can separate multiple DBs with a space as well, however I don’t normally use that functionality. Another thing you can do is you can back up everything with:

mysqldump --all-databases > backup.sql

and this will do everything on the server. Handy for migrations, etc. Definitely way easier than trying to do this via a web interface and having 1,000 DBs.

How we restore these is fairly simple as well, we just run the command as follows:

mysql dbname < backup.sql

If you have a full DB dump you wouldn’t specify anything for the name when restoring. Notice how the carrat points in the opposing direction though. Don’t screw this up otherwise you will likely end up with a blank file and have to re-dump or re-move the file. I usually make 2 copies on the destination server especially when it’s not easy to get a second copy. There are other ways of moving the DBs over, such as copying the raw MYI files but that will be another blog.

$10 512MB VPS are a joke.

We’ve been offering VPS for a few months now and have been paying close attention to our competitors. After doing the math several times I’m still baffled as to how people can offer 512mb ram on a VPS and sell it for $10 and make a profit.

Say the each host node has 24GB of ram, this allows for roughly 44 VPS giving the node some free ram for cache. Now 44*10 = 440, $440 is what it cost to maintain a server with 24gb ram + bandwidth, power and high performance disk. Where do you make profit at this price?

And it seems like the cheap host always say “we don’t oversell”, well how do you not oversell something like that, whats the point of running a business if you don’t make any money? A lot of the providers are offering 512MB under xen, As far as I know its a LOT harder to oversell a Xen node than it is OpenVZ.

Regardless, even if you do somehow run this server for less than 300/mo I wouldn’t consider the profit made effective once you factor in paying people to handle support tickets ect.

Keep that in mind when your shopping for a VPS, paying the least you can does not mean your getting a good deal.