> getrusage(2) says that ru_ixrss is based on "statistics clock ticks"
> with a frequency of sysconf(_SC_CLK_TCK). This cannot be right.
H... it was trying to interpret the results from getrusage which lead
me to finding the bug. I notice that /usr/bin/time does a sysctl to get
the clock rate
On Fri, Mar 11, 2005 at 02:13:54PM -0600, Jon Noack wrote:
> Pete French wrote:
> >>Why does sysconf(_SC_CLK_TCK) always returns 128? Check out sysconf()
> >>in src/lib/libc/gen/sysconf.c (lines 83-84 of rev. 1.10):
> >[follow through of code showing it is defined as a constant snipped]
> sysco
Pete French wrote:
Why does sysconf(_SC_CLK_TCK) always returns 128? Check out sysconf()
in src/lib/libc/gen/sysconf.c (lines 83-84 of rev. 1.10):
[follow through of code showing it is defined as a constant snipped]
To determine how stathz can vary, we'll have to dig deeper. Check out
initclock
> Why does sysconf(_SC_CLK_TCK) always returns 128? Check out sysconf()
> in src/lib/libc/gen/sysconf.c (lines 83-84 of rev. 1.10):
[follow through of code showing it is defined as a constant snipped]
> To determine how stathz can vary, we'll have to dig deeper. Check out
> initclocks() in sr
Pete French wrote:
'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 = 1, tickadj = 5, profhz = 100, stathz =
100 }
So that
> '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 = 1, tickadj = 5, profhz = 100, stathz =
100 }
So that thinks stat
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 K