ytop displays negative temperature value
mouse07410 opened this issue · 0 comments
Environment
$ ytop -V
ytop 0.6.2
$ uname -a
Darwin 549725-mitll 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
- Software: Mac OS X 10.15.6 (build 19G73), Xcode-11.6, rustc 1.47.0-nightly (cfc572cae 2020-07-30)
- Any relevenat hardware info: iMac Pro 2019
~/.local/state/ytop/errors.log
exists, but is empty.
Problem
On iMac (but not on older MacBooks) sysinfo
provides - and ytop
displays - wrong temperature.
Note: I cloned sysinfo
, and added some sensors (PECI CPU
, and a couple more of such) to see what sensors report correctly on both Mac platforms). I found that all of those sensors give correct values on MacBook, but some fail on iMac Pro.
Proposed Workaround
While we're discussing with @GuillaumeGomez the possibility of fixing sysinfo
library - it would be nice if ytop
could validate (sanity-check) inputs it receives from it. In this particular case, I'd love if ytop
would check the received CPU temperature
either against zero, or against CPU Proximity
, and if it is lower (i.e., lower than zero, or lower than CPU Proximity
) - ignore/drop that value and don't display it.
Could you do that, please?