认识
官网:https://hwmon.wiki.kernel.org/ | http://www.lm-sensors.org/
文档:https://github.com/lm-sensors/lm-sensors/tree/master/doc
仓库:https://github.com/lm-sensors/lm-sensors.git
lm-sensors 是 Linux 下一款必不可少的命令行硬件监控工具集,它如同系统的“硬件仪表盘”。通过自动检测并驱动主板上的传感器芯片,它能让你在终端里直接查看 CPU 温度、主板电压、风扇转速等关键硬件数据,是诊断散热问题、调试超频和保障系统稳定性的利器。
- Project Status #526 https://github.com/lm-sensors/lm-sensors/issues/526
- 42f240d · 4 years ago # 2025-10-09
组成
命令程序 and 配置文件
# apt-file list lm-sensors # Ubuntu 25.04
/etc/init.d/lm-sensors
/usr/bin/sensors
/usr/bin/sensors-conf-convert
/usr/lib/systemd/system/lm-sensors.service
/usr/sbin/isadump
/usr/sbin/isaset
/usr/sbin/sensors-detect
/usr/share/doc/lm-sensors/**
/usr/share/man/**
核心组件 and 工作原理
Kernel Module:lm-sensors 依赖于 Linux 内核中相应的硬件监控芯片驱动。这些芯片(如 ITE IT87xx, Winbond NCT67xx 等)通常内嵌在主板上,负责收集来自温度探头、电压调节器和风扇的传感器数据。
sensors-detect:这是个非常关键的命令。它通过扫描您的系统,自动识别哪些硬件监控芯片存在,并加载相应的内核驱动模块。它会询问您一些问题,以确定要加载哪些模块。
sensors:这是最常用的命令。一旦驱动加载成功,运行 sensors 就能从内核驱动中读取并格式化显示所有检测到的传感器数据。
其工作流程可以概括为:sensors-detect ->(加载正确的内核驱动)-> sensors ->(读取并显示数据)
构建
https://github.com/hramrach/lm-sensors/blob/master/INSTALL
应用
Psensor
官网:http://wpitchoune.net/psensor/
文档:https://github.com/chinf/psensor/tree/master/doc
仓库:https://github.com/chinf/psensor
Psensor is a graphical hardware monitoring application for Linux.
Project Status | 4270c90 · 9 years ago | 2025-10-09
Compilation Prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~
The compilation of +psensor+ requires:
* make
* gcc (or llvm)
* lm-sensors
* library sensors4
* library gtk3 >=3.4
* help2man (optional, required to produce the manpage)
* asciidoc (optional, required to produce the html version of the
faq)
* cppcheck (optional, static source checker)
* library libnotify (optional)
* library libappindicator >= 3.0 (optional)
* library libXNVCtrl (optional)
* library json-c >= 0.11.99 and curl (optional, required for remote monitoring)
* library unity (>=v3.4.2, optional)
* library gtop2 (optional, required for CPU usage)
* library atasmart (optional, for disk monitoring)
* library udisk2 (optional, for disk monitoring)
The specific requirements for +psensor-server+:
* library libmicrohttpd
* library json-c >= 0.11.99
参考
DeepSeek / 介绍 lm-sensors 工具
ArchWiki / lm_sensors / https://wiki.archlinux.org/title/Lm_sensors
DeepSeek / Ubuntu 获取处理器温度的命令行工具