我有一台带 2 个 CPU 的笔记本电脑(thinkpad)。目前,我可以使用 cat(1) 从以下文件中读取 CPU 温度:
cat /sys/class/thermal/thermal_zone0/temp
cat /sys/class/thermal/thermal_zone1/temp
cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
cat /sys/devices/LNXSYSTM:00/LNXCPU:00/thermal_cooling/subsystem/thermal_zone1/temp
cat /sys/devices/LNXSYSTM:00/LNXCPU:01/thermal_cooling/subsystem/thermal_zone0/temp
Run Code Online (Sandbox Code Playgroud)
我的问题是为什么内核将这些信息存储在这么多不同的地方,哪个是读取 CPU 温度的“标准”文件?
这是因为 systemd(我使用的是 Arch Linux)还是像 Slackware 这样的非系统 Linux 发行版有不同的方法?
linux-kernel ×1