Date: Thu, 10 Mar 2005 11:13:05 +0000 From: Pete French <petefrench@ticketswitch.com> To: dwhite@gumbysoft.com, petefrench@ticketswitch.com Cc: stable@FreeBSD.ORG Subject: Re: Just a sanity check before I sumbit a buig report Message-ID: <E1D9LbF-000D1N-Jn@dilbert.firstcallgroup.co.uk> In-Reply-To: <20050309233127.E53915@carver.gumbysoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 'sysctl kern.clockrate' will return this information if you don't want to > write a program to do it for you :) I was just using the code from time(1). Inteesring though - heres the output: kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 100, stathz = 100 } So that thinks stathz is 100, but sysconf(_SC_CLK_TCK) is returning 128! > What are the two machines? stathz is 128 on i386, 100 on sparc64, and 130 > on amd64. Or thats the defaults at least. These are all i386 machines - I have a number of them, all running 4.11. I can take the same a.out and run it on all of them - on some both numbers are 128, on other the numbers are 100 and 128. If I go to one where both the calls return 128 though, the output of 'sysctl kern.clockrate' is this: kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 1024, stathz = 128 } So, it looks like theres a bug in sysconf(_SC_CLK_TCK) possibly ? because it seems to be always returning 128, regardless of the value of stathz as returned by 'sysctl kern.clockrate' I can reproduce this on a number of machines BTW - the only things they have in common is that I wrote their kernel config files at various points in time... -pete.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1D9LbF-000D1N-Jn>