9

Is there a way to see the CPU temperature in htop. I am using windows10 wsl, so I'm not sure if WSL1 has access to CPU temperature reading.

5
  • I am not familiar with WSL, but what about the sensors command?
    – FedKad
    Dec 19, 2019 at 17:07
  • its WSL1 @K7AAY Dec 19, 2019 at 17:28
  • 2
    The Linux kernel tools for interfacing with hardware don't currently work in WSL, since WSL does not use a Linux kernel. Since Windows is the OS in control of the hardware, you will have best luck using Windows tools to control and monitor that hardware. Obviously, Linux hardware tools work very well when you boot into Linux.
    – user535733
    Dec 19, 2019 at 17:40
  • it looks like the new WSL 2 has a linux kernal. @user535733 Dec 19, 2019 at 20:36
  • 1
    @Patoshiパトシ docs.microsoft.com/en-us/windows/wsl/wsl2-install seems quite clear that WSL is virtualized. The virtualized kernel, Linux (WSL2) or not (WSL1), has no access to the real hardware. It can only see the virtual platform that Windows provides. Whether or not Windows provides an API to simulate hardware access seems more like a Windows support question.
    – user535733
    Dec 19, 2019 at 20:40

2 Answers 2

6

htop provides temperature data via libsensors. This feature is a build-time option. https://github.com/htop-dev/htop#linux

1
  • Suprised to learn this. Installed lm-sensors and libsensors-dev through apt, then went into the htop setup menu (press F2) > Display options > also show CPU temperature. Seems the htop from apt is already compiled with this Dec 4, 2021 at 13:50
2

A review of the man page for htop does not show it has that ability. It is a process viewer, not designed to read sensors.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .