Archive for the ‘How-Tos’ Category

A Flowchart To Live By

Whether you’re transferring pictures from your camera to your computer of the last family gathering or transferring hundreds of gigabytes of client data, data is very important. You can always reinstall and reconfigure your applications, but its those data files that are important. I always hate to lose data, but unfortunately, sometimes I lose track of what I’m doing and delete the wrong thing. Sure, there’s always last night’s backups (right?!), but things may have changed in between. Since every once in a while I get power hungry at the command line and let myself become an idiot, I thought I’d share the things I’ve learned in the form of a flowchart. This pretty much sums up everything I’ve learned in life so far:

Follow the flowchart very carefully.

Tags:
Filed under How-Tos : Comments (0) : Jan 6th, 2009

Uptime In Windows

One of the many things that has annoyed me about Windows is the lack of an “uptime” utility like UNIX or Linux machines. There are a lot of scenarios where I need to find out quickly the last time the system had been rebooting without having to grep through logs.. err.. scroll through the Event Viewer. One trick that I picked up recently was that the systeminfo utility will tell you the uptime and you can parse out all the extra junk. I know this tip works on Windows 2003 Server and Windows XP, but I don’t have access to a lot of other Windows platforms (and didn’t bother checking earlier ones). You can simply run from a command prompt: systeminfo | find “Up Time”.

Tags:
Filed under How-Tos : Comments (0) : Dec 11th, 2008

VMware Server 2 on Ubuntu 8.10

Apparently all the bugs with running VMware on Ubuntu 8.04 have either been worked out on the VMware side or the Ubuntu side with 8.10. I installed today using the Ubuntu 8.10 i386 desktop version with just a few prerequisites to install:

sudo apt-get install linux-headers-`uname -r` build-essential

You’ll of course have to register with VMware.com to get a license key for VMware server and download the tarball. Once downloaded I untarred and unzipped:

tar zxvf VMware-server-2.0.0-122956.i386.tar.gz

Then run the installer:

cd vmware-server-distrib
sudo ./vmware-install.pl

During the installer I just took all of the defaults except I didn’t allow NAT’ing for my machines and I changed the default store location for my VM’s.

Once the installer was finished, I launched Firefox and navigated to: http://localhost:8222 (If you’re going across a network (especially across the web) you can also use the SSL server at: https://:8223).

Once logged in I created a virtual machine. To get to the console, I had to install the Firefox plugin for VMware and all was well.

Tags: ,
Filed under How-Tos : Comments (1) : Nov 12th, 2008

Increasing Ext3 I/O Performance

In today’s computers, CPU throughput and amount of memory are no longer the bottleneck in performance. Ask any server administrator and they will tell you that one of the biggest concerns with responsiveness of server-side applications is the throughput to and from disk. If you’re using the ext3 filesystem, it turns out there’s a tip that you can use to gain up to a 40% performance boost.

With the default mount options in most distributions, the filesystem will log the last access time to a file. Hackosis recently wrote a quick tutorial on how to disable the access logging in the /etc/fstab file. A little research shows reveals a conversation in 2007 between kernel developers such as Linus Torvalds and Ingo Molnar in which Ingo states his experience with changing the setting:

yeah, it’s really ugly. But otherwise i’ve got no real complaint about
ext3 - with the obligatory qualification that “noatime,nodiratime” in
/etc/fstab is a must. This speeds up things very visibly - especially
when lots of files are accessed. It’s kind of weird that every Linux
desktop and server is hurt by a noticeable IO performance slowdown due
to the constant atime updates, while there’s just two real users of it:
tmpwatch [which can be configured to use ctime so it's not a big issue]
and some backup tools. (Ok, and mail-notify too i guess.) Out of tens of
thousands of applications. So for most file workloads we give Windows a
20%-30% performance edge, for almost nothing. (for RAM-starved kernel
builds the performance difference between atime and noatime+nodiratime
setups is more on the order of 40%)

Using the Hackosis’ tip on disabling the access logging could help boost performance on any systems you have using ext3. Of course, I’d recommend trying it out in a test system before deploying it in a production system, especially since changing the options means you have to re-mount your filesystems. I usually use ReiserFS, but if you are using something like Red Hat or CentOS, the kernel builds don’t support the xfs, jfs, or reiser filesystems unless you compile the options in yourself. Granted, you have to have a “RAM-starved” system first as Ingo states, but if you are experiencing performance issues on a server, there’s a good chance it’s a RAM-starved system or low I/O throughput.

Tags: ,
Filed under How-Tos : Comments (0) : Nov 4th, 2008

Migrating Mail from Zimbra Desktop to IMAP Server

The Zimbra Desktop mail client is a great mail client that gives the look and feel of the Zimbra Collabroation Suite, but the migration path out of the client has been less than easy. I wrote up a quick tutorial on steps that I took to help someone pull their email they had downloaded via POP into ZD and had gotten stuck there.

To do the export of the data, I used the built-in export utility inside of Zimbra Desktop. For the migration into an IMAP account (or a Zimbra Collaboration Server account) I used Thunderbird with the MboxImport enhanced add-on. I’m assuming you have already setup the account in Zimbra Desktop and pulled down the emails you want to export. I’m using Mac OS X to do the export, though it should work assuming you can get a file to extract the gzipped tarball from Zimbra Desktop.

First, I started with exporting from Zimbra Desktop. I went to the Account Setup page using the bottom on the top-right.

In the account setup screen, click on the account you want to migrate.

On the bottom-left, click on the Manage Data button.

Click on Export.

Type in the name you want to give the file, then click on Export.

Then you’ll be prompted to save the file. Save the file wherever you would like. Mine saved to my Downloads directory.

For some reason, it didn’t actually name the file the way it was supposed to when I downloaded it it, so I renamed the file to example.tar.gz and double-clicked it to extract. If you’re using Windows, 7-zip can extract the file.

When you extract the file, you can open the folder and find directories for each folder of the mail you had. Inside those folders, there will be .eml files for each email. If you have more than 500 messages in a folder, the export breaks them up into multiple folders and append a number to the end of the name.

Now we’re ready to import into Thunderbird. It’s useful at this point if you account is setup already, but not necessary. First, we’ll have to create a temporary local folder to import into. Right-click on the Local Folders in Thunderbird and click on New Folder. You can name it whatever you like, it will be cleared out eventually anyway.

Then, select the new folder we created. Then, in the Thunderbird menu, go to Tools -> Import/Export in mbox/eml format -> Import all eml files from a directory -> also from its sottodirectories.

When prompted, navigate to your extract Zimbra Desktop export directory and click Choose.

The utility will import your messages into the temporary directory.

Depending upon the server that you are using, you may have to be careful with drag-and-dropping your messages into your IMAP account. You can do it, but beware: it may mess up timestamps on messages. For Zimbra we have a little trick we can use. When setting up the account, simply append “/tb” to the end of your username. For my example, my email address was example@whatan00b.com, so my username that I used to authenticate was “example@whatan00b.com/tb”. Once you know how about the consequences of drag-and-drop inside your mail client, just drag all of your messages into their appropriate folders. Here’s my messages now in the Zimbra web client:

Tags: , , ,
Filed under How-Tos : Comments (2) : Nov 3rd, 2008