banshee/linux-collection/linux/ssh/
temperatures
Temperatures of a Linux by SSH, from hwmon or thermal zones, with the sensors' own thresholds.
by banshee1 installation2 versions
Temperatures of a Linux, by SSH
Returns the temperature of each sensor the kernel exposes, and raises when a sensor crosses the thresholds it announces itself. A virtual machine has no sensor: the collector says so.
How it works
The collector reads with grep -s -H the files of /sys/class/hwmon: for each chip its name, and for each sensor its reading (temp*_input), its label, its high (max) and critical (crit) thresholds, in thousandths of a degree. Failing any sensor there, it reads the thermal zones of /sys/class/thermal (type and temperature), the only ones on some ARM boards.
- A sensor is named after its chip and its label (
coretemp Package id 0), or its number when the driver gives no label (nvme temp1); two sensors of the same name each keep their own, the second carrying its chip. - Thermal zones are not read beside hwmon: they often repeat its sensors.
- Portable: both trees are written by the kernel the same way on Alpine, Debian and Fedora;
-sand-Hare options of BusyBox as of GNU grep. Nothing is written on the target.
Prerequisites
- an SSH account for monitoring, without write rights;
- the fingerprint of the server's host key, set in
protocol:ssh:fingerprint(not needed when the Security settings trust the first SSH fingerprint presented); - the drivers of the sensors loaded (
coretemp,k10temp,nct6775…): lm-sensors is not needed.
Outputs
| Output | Unit | Per | Meaning |
|---|---|---|---|
temperature | °C | sensor | its temperature |
Watches
| Watch | Kind | Defaults | Checked |
|---|---|---|---|
hot High temperature | above, on temperature | warning 80, critical 95, for 3 runs | yes |
sensor-limit Sensor threshold crossed | custom | warning at the sensor's max, critical at its crit | yes |
Limits
- A machine without any sensor (a virtual machine, a container) stops the collector
misconfigured. - What is hot depends on the part: a laptop CPU at 90 °C is normal, a disk at 60 °C is not. The defaults of
hotsuit a server CPU;sensor-limituses the part's own thresholds. - A driver may announce no threshold, or a wrong one:
sensor-limitthen judges nothing, or too late.