Operating System - HP-UX
1825771 Members
2017 Online
109687 Solutions
New Discussion

rp2450 clock runs fast. Kernel rebuild had picked up wrong model / clock speed

 
Mike Cresswell
Occasional Advisor

rp2450 clock runs fast. Kernel rebuild had picked up wrong model / clock speed

Hi All

Having gained a lot of help from this forum on various occassions, I thought I'd post one that might help someone else. Apologies if it's too wordy but wanted to explain all the things I saw.

The initial problem statement was that the Real Time Clock ("date" etc) on an rp2450 running HPUX 11 was gaining time constantly. Approximately 15 to 20 minutes per hour! It was supposed to use ntp to synchronise to either a GPS time source or the system's central server but couldn't synchronise to either one.

The problem seemed to have started after installation of various patches which had required a kernel rebuild and a reboot. However this was one of 14 identical processors patched at the same time and was the only one showing the problem.

Investigation showed that the processor gained time regardless of whether ntp was on or off. I also found that:

The clock was gaining exactly 1 minute every 4 minutes ie exactly 25% fast.

Running "model" on this processor gave 9000/800/A500-44 whereas all the others gave 9000/800/A500-5X. Checking on these models indicated that the "44" has a 440 MHz CPU clock frequency where the "5X" has a 550 MHz CPU Clock.

Began to think "If this CPU thinks it has a 440 MHz CPU clock but really has 550 MHz then it would get 550/440 = 1.25 times as many clocks per second as it's expecting. That would fit with the real time clock running 25% fast"

Running the following command to check the processor frequency gave "440" on this CPU versus "550" on all the others.

echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem

But realised that the output from the above command and from model both come from interrogating the kernel, not from directly checking the hardware.

As the processor was on a remote site, I couldn't do a physical check to see what was actually in the processor. But based on all the above, I began to suspect that the kernel had somehow been built against the wrong model / CPU clock speed.

So I did a kernel rebuild and reboot. Problem solved. The "model" command now returns 9000/800/A500-5X, the clock is keeping correct time, ntp synchronised successfully with the GPS and Central Server and the application software is working correctly.

I guess the morals of the story are.

Don't always believe what the kernel is telling you.

Remember that many / most commands are actually reading what the kernel says, not communicating directly with the hardware.

If anyone has any idea how / why it had picked up the wrong model / clock speed in the original kernel rebuild, I'd like to hear from you.

Otherwise, I just hope this helps someone else.

Cheers

Mike
1 REPLY 1
Mike Cresswell
Occasional Advisor

Re: rp2450 clock runs fast. Kernel rebuild had picked up wrong model / clock speed

Oops! Couldn't find this so thought I'd made a mistake and it hadn't gone in.

So submitted it again. If you want to reply, please reply to the new one.

Cheers

Mike