On Thu, Feb 11, 2010 at 02:53:45PM +0100, Petr Salinger wrote:
> The kernel supplies them. Each note is a pair of name and value.
> The GNU/kFreeBSD kernel does not supply note with name AT_CLKTCK.
So that rules out ELF notes.

The old_Hertz_hack appears to be giving widely differing (and wrong)
numbers. To get this value add up the 4 (7 in Linux) numbers on the cpu
line in /proc/stat and divide by the first line in /proc/uptime.
On Linux (now with the 4 to 7 cpu number patch) it's pretty solid across
all arches. On kFreeBSD its wildely out and fluctuates.
So that rules out Hertz hack.

I've also got the sysconf (getconf on the command line) function.
I have heard it is inaccurate at times, I'm not sure how bad it is on
kFreeBSD.

What I'm really trying to find is
 How do you convert between ticks and time on kFreeBSD accurately?

> In general it might correspond to one of the following values
>   $ sysctl kern.clockrate
>   kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 }
asdfasdf.debian.net has that same result, getconf says 60 and my
calculation says 99. Which one is correct?

> In case of /proc file system under GNU/kFreeBSD it seems as constant
> 100. See definition of T2J in
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/linprocfs/linprocfs.c
100 jiffies = 1 second, that seems quite clear.
stathz ticks = 1 second.

But looking at poor field.debian.org
188847.15 673325.21
cpu 119994 4473784 3539322 2746621

The second number first line is idle seconds, the 4th number is idle
ticks. See linprocfs_dostat() and linprocfs_douptime().
If its relationship is 100 then one is 100 times the other.
It's not, it's about 4 times.

Adding all 4 cpu numbers and dividing by the first number first row
should be 100, I get 57.

So, in short none of these numbers make any sense at all.
I'll retitle this bug because it's now a kFreeBSD specific problem.

 - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/                             csmall at : enc.com.au
http://www.debian.org/          Debian GNU/Linux, software should be Free 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to