Official cross-platform collection
temperature
CPU and GPU temperatures on Linux, macOS, and Windows.
Install#
Install just this package:
lesysbot tools install lesysbot/lesysbot-packages-official/tools/temperatureOr take the whole Official packages collection at once:
lesysbot install lesysbot/lesysbot-packages-officialTools#
This package exposes 1 tool.
temperature()#
Report every CPU and GPU temperature this machine exposes, choosing the right reader per OS at call time.
Parameters
Takes no parameters.
Notes#
- Dispatches per OS: kernel hwmon on Linux, the SMC via osx-cpu-temp on macOS (brew install osx-cpu-temp, Intel Macs), ACPI thermal zones via WMI on Windows; nvidia-smi is queried wherever it is on PATH.
- Apple Silicon exposes no die temperature to unprivileged userspace, and nothing in this collection uses sudo — on M-series Macs the tool says so instead of inventing a number.
Source#
Every package is a folder holding a README.md and a tool.py. Read this one on GitHub: lesysbot/lesysbot-packages-official/tools/temperature.
To write your own, see Writing tools.