NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Accessing the battery-backed clock via userland?



Is it possible?

On Linux, for example, there's hwclock.

A friend's machine is gaining hundreds of seconds on a regular basis and 
I'm trying to track down what's going on. My hypothesis is that the 
motherboard's rtc battery is dying, but what I'd really like to do is 
examine it over time and see for sure.

What I've found so far:

Lots of Kernel Interfaces:
microtime(9)
todr_attach/todr_gettime(9) (todr(9))
inittodr(9)

Lots of non-specific userland interfaces:
ntp_adjtime(2) (perhaps a culprit? is my clock still busy slewing?)
gettimeofday(2)
clock_gettime(2)
time(3)

ntpd refuses to correct my time because there are so many seconds lost 
it errs on the side of caution and simply does nothing instead.

So..  suggestions? :-)


Home | Main Index | Thread Index | Old Index