Time issues with netbsd 4.0

View: New views
4 Messages — Rating Filter:   Alert me  

Time issues with netbsd 4.0

by Derrick Lobo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am having a weird issue with time on 4 of my netbsd 4.0 i386 servers the
clock seems to be racing ahead about 2 minutes per hour, I googled a
solution to use sysctl parameter,(as it was being used in freebsd)..

kern.timecounter.hardware = TSC

Is there a way I can build it into the kernel so that it reduces management
overheads...


Regards

Derrick Lobo




Re: Time issues with netbsd 4.0

by Simon Burge-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Derrick Lobo" wrote:

> I am having a weird issue with time on 4 of my netbsd 4.0 i386 servers the
> clock seems to be racing ahead about 2 minutes per hour, I googled a
> solution to use sysctl parameter,(as it was being used in freebsd)..
>
> kern.timecounter.hardware = TSC
>
> Is there a way I can build it into the kernel so that it reduces management
> overheads...

If that works for you (not sure what the underlying problem is), you
can stick any sysctl command in your /etc/sysctl.conf so it will happen
automatically when your system starts.  In your case, just add:

        kern.timecounter.hardware=TSC

Simon.

RE: Time issues with netbsd 4.0

by Derrick Lobo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Simon

I have already using the sysctl parameter however I would prefer to add it
to the kernel so that I do not have to worry about managing the sysctl file.

How do I add this option to the kernel while building one is the question..


Derrick

-----Original Message-----
From: simonb@... [mailto:simonb@...] On Behalf
Of Simon Burge
Sent: Monday, August 18, 2008 9:21 PM
To: Derrick Lobo
Cc: netbsd-users@...; 'Port-I386@Netbsd. Org'
Subject: Re: Time issues with netbsd 4.0

"Derrick Lobo" wrote:

> I am having a weird issue with time on 4 of my netbsd 4.0 i386 servers the
> clock seems to be racing ahead about 2 minutes per hour, I googled a
> solution to use sysctl parameter,(as it was being used in freebsd)..
>
> kern.timecounter.hardware = TSC
>
> Is there a way I can build it into the kernel so that it reduces
management
> overheads...

If that works for you (not sure what the underlying problem is), you
can stick any sysctl command in your /etc/sysctl.conf so it will happen
automatically when your system starts.  In your case, just add:

        kern.timecounter.hardware=TSC

Simon.



Re: Time issues with netbsd 4.0

by Simon Burge-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Derrick Lobo" wrote:

> Thanks Simon
>
> I have already using the sysctl parameter however I would prefer to add it
> to the kernel so that I do not have to worry about managing the sysctl file.
>
> How do I add this option to the kernel while building one is the question..

It comes down to personal preference I guess.  To me, having a single
relatively non-changing file in /etc that gives the same behavour
regardless of what kernel I'm booting seems like less maintenance :-)

That said, I don't think there's a kernel option to do what you want -
you'd probably need to play with tc_quality value in arch/x86/x86/tsc.c
to bump it higher than than whatever is the default timecounter.  And
that's even more maintenance again...

It would also be nice to work out what the underlying problem is.  What
is the output of "sysctl kern.timecounter" on your system (before you
override kern.timecounter.hardware)?

Simon.
LightInTheBox - Buy quality products at wholesale price!