NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 11 beta testing



On Sun, 12 Oct 2025, Van Ly wrote:

At the moment btop reads 46degC and the following script reads 42.000, 43.000


Both envstat and btop read the same data, but, some variation is normal
because these on-die thermocouples are a) pretty accurate and b) can instantly
sample the current core temp. So you might see diff. values each time--even
with envstat(1) alone. Try this cmd. a few times to see this:

```
envstat -ns coretemp0:'cpu0 temperature',coretemp1:'cpu1 temperature'
```

The first thing I asked of the code assistant was for at tool to
flowchart the logic in envstat and btop but the friction and hoops to
jump thru lead to a timebomb.  I think it should be possible to infer
what's going with the kernel and the cpu temperature reading using an
initial schematic like the citric acid cycle

  https://sdf.org/~van.ly/img/citric_acid_cycle.jpg


I can't figure out how the Krebs cycle relates to CPU temp. variance :), but,
the way NetBSD gets this data is pretty simple:

https://github.com/NetBSD/src/blob/trunk/sys/arch/x86/x86/coretemp.c#L359

It just reads some MSRs on x86. The same values are passed to _all_ programs.

-RVP


Home | Main Index | Thread Index | Old Index