Skype 5.3.0.116 – a memory hog with memory leaks

Just take a look at the following screenshot I just took, showing two Skype 5.3.0.116 instances running on a current Windows 7 box with 4 GB of RAM:

That’s 330 MB of private memory for each instance at this very moment! Note that these numbers are steadily growing (at about 2 KB/s) for both processes – for no apparent reason. A hint, that there’s likely a memory leak somewhere in Skype.

Let’s hope Microsoft will rewrite Skype from scratch (The current code-base probably isn’t worth refactoring). I’m confident they don’t lack the human and financial resources to do it. It can only get better.

Zimbra Collaboration Server: Troubles after updating to ZCS 7.1.1 – here’s the solution.

Generally, Zimbra‘s update scripts for ZCS run smoothly. However, after updating ZCS from 7.0.1 to 7.1.1 on Ubuntu 10.04.2 LTS a couple of days ago, I noticed that most of the server’s services crashed within 1-2 hours after starting the (virtual) server.

To make a long debugging story short, here’s a summary of the problem:

The update script doesn’t properly remove old entries in /etc/rsyslog.conf when creating a new dedicated rsyslog configuration file for zimbra (/etc/rsyslog.d/60-zimbra.conf). This makes rsyslog log its own logging due to double rule entries – making /var/log/zimbra-stats.log grow at 2 MB/s. Like this, zimbra effectively DOSes itself as the server runs out of free disk space in no time (my above-average 12 GB of free space were filled within about 1 hour 40 minutes).

And here’s the solution:

1. Stop rsyslog to stop it from filling up your disk with nonsense: ‘/etc/init.d/rsyslog stop’ or ‘service rsyslog stop’
2. If necessary (i.e. if the updated server has been running for several minutes already), reclaim your free disk space by deleting/emptying big log files in /var/log, e.g. zimbra-stats.log, zimbra.log, mail.info, mail.log, mail.err, mail.warn etc.
3. Edit /etc/rsyslog.conf and remove the entries (likely at the end of the file) that look similar to these:
local0.* @mail.yourserver.com
local1.* @mail.yourserver.com
auth.* @mail.yourserver.com
local0.* -/var/log/zimbra.log
local1.* -/var/log/zimbra-stats.log
auth.* -/var/log/zimbra.log
mail.* @mail.yourserver.com
mail.* -/var/log/zimbra.log

(these are now in /etc/rsyslog.d/60-zimbra.conf)
4. Restart rsyslog: ‘service rsyslog restart’
5. Restart ZCS if it doesn’t run properly anymore: /etc/init.d/zimbra restart (you may even have to reboot the whole box if that doesn’t work)

Less is more: colordiff and more or less

In the Unix/Linux/Mac OS X world, less is more. Literally, in that ‘less‘ fully emulates ‘more‘, and figuratively, as it provides useful additional functionality like backwards scrolling. So, you really want to use ‘less’ instead of ‘more’ for paging another command’s output, e.g.

cat a_long_document.txt|less

When used to page the output of colordiff however, ‘less’ displays a mess instead of properly displaying colored output like ‘more’.
The trick is to use ‘less’ with either the -r or -R option (which both repaint the screen), i.e.

colordiff -u file_old.py file_new.py|less -r

or

colordiff -u file_old.py file_new.py|less -R

(try which one works better with your system and terminal)

Blog migration: Work in progress

This is just a quick note to let you know that the migration is currently work in progress. Now the whole blog content is available again and the features that were available on the old server, will be migrated as time allows.

Sorry for any inconveniences and thanks for your understanding.

Erase/wipe free space using Mac OS X

When deleting a file, most operating systems just delete the reference to this file, not its actual content. For illustration, that’s like removing a chapter from a book’s table of contents without actually removing (and shredding) the according pages in the book.

So, in order to really (securely) delete a file on a hard disk, there are basically two methods (simplified; from a technical point of view it’s both the same):

  • Overwrite the file content (i.e. its clusters) with random data
  • Delete the file as usual, empty the trash and overwrite the whole free space on the according hard disk with random data

For the second method, here’s how to do it using Mac OS X:

  1. Delete the file(s) and empty the trash
  2. Find out the device name of the according hard disk by opening a new ‘Terminal’ window and executing the “df” command. For example, for a RAID 1 disk, the path of the disk might be something like “/dev/disk2″
  3. In the opened ‘Terminal’ window, execute:
    diskutil secureErase freespace 1 /dev/disk2
    where “1″ stands for “single-pass random-fill erase” and “/dev/disk2″ is the disk device  (adjust this to match your disk). When prompted, enter the admin’s credentials.

Note that overwriting free space like this takes quite some time depending on the amount of free space there is and how many passes you need (e.g. use “2″ for a US DoD 7-pass secure erase or “3″ for a Gutmann 35-pass secure erase). For more information about diskutil and its options, see “man diskutils”.

Windows: Move a window that is off the screen

  1. Make sure, the invisible (off-screen) window has the focus: Hold down ALT + Tab to select the (invisible) window you want to move
  2. Hold down Alt + Spacebar
  3. Press the M key
  4. Use the arrow keys to relocate the window until it becomes visible again
  5. Press the Enter key when you have the Window in the desired location.

via Move a window when its title bar is off the screen (Tips, Tricks, Tweaks, and Setting) – TACKtech Corp..

Animated Driving Directions using Google Maps Street View

A simple and yet fascinating and useful example app by Keir Clarke (@keirclarke) for all those many people who don’t have a Google Nexus One mobile phone yet (or any other similarly powerful turn-by-turn navigation device):

Google Maps Street View API Driving Directions Example

E.g. for driving directions on how to get from Zurich Airport to Printscreen GmbH‘s homebase by car(*), enter

From: Zurich-Airport

To: Heinrichstr. 223, Zurich

Speed: Choose Medium or Fast

And hit the “Route” button to display a map and list with driving directions.

Then click on “Drive” to see an animated simulation of your drive on Google Maps Street View.

Great, isn’t it? Now imagine this would be a seamless video..

P.S. If you’re looking for ideas for a road trip, consider taking this Grand Tour in Italy (and Switzerland and France). (Even better: Go by train and other public transport and you won’t even need a car or driving directions ;)

(*) Note: I’d strongly suggest using public transport instead. It’s almost as fast (during rush hour even faster), cheaper and tends to be more relaxing.

WPtouch: Mobile Plugin + Theme for WordPress

I’ve just installed WPtouch 1.9.8.1 (ZIP) which was released  on Feb 9 and I really like it:

More than just a plugin, WPtouchTM is a mobile theme for your WordPress website. Modelled after Apple’s app store design specs, WPtouch loads lightning fast and shows your content beautifully, without interfering with your regular site theme.

WPtouch automatically transforms your WordPress blog into a web-application experience when viewed from an iPhoneTM, iPod touchTM, AndroidTM, or BlackBerry StormTM touch mobile device.

via WPtouch: Mobile Plugin + Theme for WordPress » BraveNewCode Inc..