VMWare guest clock too slow

Posted on October 23rd, 2008 in Howtos, VMWare by Rodney

Ok, so earlier we discussed the VMWare guest clock being too fast. That one could be fixed by setting the CPU frequency in the VMWare.conf file.

However one thing that’s driving me nuts for ages is why my 2.6 kernel guests are losing time. Really badly – like 1 minute every 2, almost. Of course, it’s been one of those “I’ll fix it later” issues but tonight I decided the time had come and I was going to fix it now.

Unlike the clock running too fast, this one requires work on the guest OS, not the host. We have to modify the grub.conf file (in Redhat varients, you’ll find this in /boot/grub/grub.conf), so the kernel boots with the following switches:

clock=pit noapic

E.g.

title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet
initrd /initrd-2.6.18-92.1.13.el5.img

would become

title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet clock=pit noapic
initrd /initrd-2.6.18-92.1.13.el5.img

This is, frankly, kind of annoying. In my case the box was only using one CPU so I don’t mind the NOSMP switch. I honestly couldn’t tell you if it’s essential, so you may wish to play with it. Some people report success with just clock=pit but others report that doesn’t help.

Baby girl!

Posted on October 10th, 2008 in Ramblings by Rodney

Today I welcome home our new baby daughter, Miriam Elianna. She’s a beautiful little baby girl, born on Sunday the 5th of October (Tishrei 6th) at 5:51pm. She weighed 3.73kg and was 53cm long. The camera is still in the hospital with Mum & bub, so only a mobile phone photo to show, atm (which is her at about 1 hour old). She was named on Yom Kippur, during Shacharit at the 3rd aliyah.

Which Redhat Version am I using?

Posted on October 10th, 2008 in Howtos, Linux Admin by Rodney

Here’s something a little embarrassing. Today I was wondering which version of CentOS a computer at home was using, which I was connected to via SSH. It’s easy enough to tell the Kernel or Linux version (uname -a or cat /proc/version) but I realised I couldn’t remember how to tell the “named” version of the OS. A quick Google set me straight.

[root@selene ~]# tail /etc/redhat-release
CentOS release 5.2 (Final)

Yum installed ntop does not work as a service (daemon)

Posted on October 2nd, 2008 in Howtos, Linux Admin by Rodney

It turns out one more of the many things yum can break is ntop. A quick Google found me this answer as to how to repair it, so I am archiving it here, in the hope that the next time this happens, I find the answer more quickly and maybe I even help someone else.

When you update from ntop to 3.3.6 (or install it) you will find you can run it as an application but not a daemon (service). It gives an error message like:

[root@selene ~]# service ntop restart
Stopping ntop: [FAILED]
Starting ntop: Processing file /etc/ntop.conf for parameters...
Thu Oct 2 22:20:26 2008 NOTE: Interface merge enabled by default
Thu Oct 2 22:20:26 2008 Initializing gdbm databases
FATAL ERROR: Unrecognized/unprocessed ntop options...
, --user ntop, , --db-file-path /var/ntop, , , , --use-syslog, , , , , , ,

run ntop --help for usage information

Common problems:
-B "filter expressions" (quotes are required)
--use-syslog=facilty (the = is required)

It turns out that the way ntop accepts command parameters has changed in 3.3.6. So now, we need to parse the config file before parameters. To fix, simply locate the daemon file and change a single line. Specifically:

1. Edit /etc/init.d/ntop
2. Find the line that says: daemon $prog -d -L @/etc/ntop.conf
3. Change it to: daemon $prog @/etc/ntop.conf -d -L

You should now be able to run ntop as a daemon (service). Note that the config file is now read before the parameters in the start up line.

An odd change to make but there you have it!