voipmeister.com voip stuff matters and more

Mac OS X Snow Leopard Spotlight indexing forever

This is not really a voip related post, but I’d like to share it anyway.

Last friday, I picked up my brand new MacBook Pro (with Max OS X Snow Leopard 10.6) from the local Apple reseller. Excited with my purchase, I started using the MacBook right away (of course). I configured Mail, surfed the web and started using iChat. The MacBook was getting slower and slower and the spinning coloured wheel started to appear more and more.

The Spotlight menu revealed that the volumes on my MacBook were about to be indexed with an accompanying ‘estimating indexing time’ message. This went on and on, with no improvement whatsoever (there was never any real estimate in hours or minutes given).

A look at the ‘top’ output revealed that the mdworker processes were consuming a lot of resources, the idle percentage would typically be around 40 to 60%.

I googled and found a lot of tips, hints and what not. Reinstalling Mac OS did not solve the problem (as was indicated by postings from other people experiencing the same problem).

Stopping the indexing, deleting the Spotlight indexes and restarting Spotlight also did not solve the problem (I did find a nice shareware program to control Spotlight though, have a look at Spotless by Fix a Mac. However, just using Spotless did not fix my problem either (although I read postings from users that had success using it).

In the end, it turned out that Spotlight was probably choking on some files. I used ‘Disk Utility’ to repair the file permissions, after which Spotlight immediately started indexing.

Personally, I was a bit disappointed in Apple. Why would I need to fix file permissions on a freshly installed MacBook? I reinstalled the MacBook, installed the Applications from the accompanying DVD, installed iLife ’11 and updated it all. I really fail to see why I would need to fix any file permissions.

By the way, Spotlight indexed 100GB of data in 30 minutes and it works rather nice :-)

For those who’d like to know how Spotlight can be stopped and started from the command line (please note that you need to authenticate yourself again to gain admin privileges):

To turn Spotlight OFF for all current volumes:

sudo mdsutil -a -i off

To turn Spotlight indexing ON for all current volumes:

sudo mdsutil -a -i on

To delete the current Spotlight indexes for the master drive and start rebuilding the index for that drive:

rm -rf /.Spotlight*
sudo mdsutil -E /

As mentioned, you could use Spotless if you don’t feel comfortable at the command line interface.

MGCP config download debugging

How to debug a MGCP config download:

debug ccm-manager config-download all
term mon

When resetting the MGCP gateway, the debug of the config download will show up on the cli when ssh’d into the gateway.

%SYS-4-CONFIG_RESOLVE_FAILURE

Ever had recurring messages appearing on the console that look like this?

*Mar  1 03:27:27.119: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse from (tftp://255.255.255.255/network-confg) failed
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)

It means that service config is enabled for the router; it is trying to download the config for the router via tftp. To resolve this issue and to stop the error messages from appearing, you need to issue the following command in global configuration mode:

no service config

Ubuntu 10.04 with ‘old’ theme

I just installed Ubuntu 10.04 on my laptop. Works a treat, but that new theme… I don’t like it much and preferred the old theme (call me crazy but I do). So I headed for ‘Appearance’ and was about to select the old theme.. except… it is no longer part of the default installation.

If you have a machine with, say, Ubuntu 9.10 around, fixing this is fairly simple. Just plugin a USB stick on the old Ubuntu machine and go ahead:

cd /usr/share/themes
cp -R Human* /media/USBSTICK

Then remove the USB stick and insert into the 10.04 machine and continue:

sudo cp -R /media/USBSTICK/Human* /usr/share/themes
sudo chmod -R 755 /usr/share/themes/Human*

Then, go to System > Preferences > Appearance and select the Human-Clearlooks theme.

Specifying screen resolution for VMware machines

Today, I was installing ubuntu 9.10 as a VM in VMware ESX. Unfortunately, the resolution available on my Vsphere client (1280×800) was unknown to the VM, I could not choose the same resolution. The solution is to power off the VM and open the vmx file for the VM. The following 2 lines should be added:

svga.maxWidth = "1280"
svga.maxHeight = "800"

When the VM is powered up again, the resolution is known to the system and can be configured.