Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2005 23:35:32 -0800 (PST)
From:      Doug White <dwhite@gumbysoft.com>
To:        Pete French <petefrench@ticketswitch.com>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Just a sanity check before I sumbit a buig report
Message-ID:  <20050309233127.E53915@carver.gumbysoft.com>
In-Reply-To: <E1D8fsS-000KoN-Gj@dilbert.firstcallgroup.co.uk>
References:  <E1D8fsS-000KoN-Gj@dilbert.firstcallgroup.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 8 Mar 2005, Pete French wrote:

> The man page for getrusage says that the frequency of the statistics
> clock is given by sysconf(_SC_CLK_TCK).
>
> The source code to /usr/bin/time uses a function 'getstathz' to get
> the frequency of the statistics clock which is does using sysctl
> and KERN_CLOCKRATE

'sysctl kern.clockrate' will return this information if you don't want to
write a program to do it for you :)

> On my system the first returns 100Hz and the second 128Hz!!!

What are the two machines?  stathz is 128 on i386, 100 on sparc64, and 130
on amd64. Or thats the defaults at least.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050309233127.E53915>