The ability to monitor the temperatures of key components is important, whether you’re gaming, overclocking, or doing something more businesslike and running a critical server. Linux includes modules in the kernel that allow it to access onboard sensors within components. Though, that alone is not enough.
There is a program that does work in conjunction with those modules to display the readings of those sensors in the userspace. That program is lm_sensors. Lm_sensors allows users to get a readout of sensor readings in the command line and interfaces with several graphical front ends that make displaying temperatures in real time automatic and easy.
Lm_sensors is in nearly every distro’s repositories. In most cases, installation is as simple as a single command. Since it lm_sensors is a daemon, it will need to be started in all distributions, but the Debian based ones, which start it automatically.
With the package installed and the daemon running, it is possible to run a command that will allow lm_sensors to detect all the sensors available in both the hardware and the kernel.
The program will pose a number of questions about which sensors to use. It will suggest a best option for each one. If you don’t know which sensors to pick, go with the recommendations until the end where it asks if you want to save the configuration. Always save it. Of course, you can use your best judgment regarding which sensors to use.
Open up a terminal, and as a regular use, run sensors.
That will give you a text readout of the sensors being monitored, and their current temperature or voltage readings.
Okay, so there are a ton of GUI options to display the output of lm_sensors. Two of the most popular options are Gkrellm and Conky. Both are widely available in distribution repositories and interface very well with lm_sensors.
To enable support for your sensors in Gkrellm, open up the Configuration by pressing F1 or right clicking on the border of the window. On the side of the window that opens, click on Builtins, then Sensors. In that menu, you can check off the sensors that you want Gkrellm to display.
Conky is a lot more customizable than Gkrellm, so it’s not easy to give an explicit set of instruction. Since Conky can take input in the form of variables from the execution of command line programs, that’s how you pass sensor information to it. Running exec sensors in the Conky configuration will give the output of the sensors. However, that give the whole output, so you may want to use other command line tools like grep and cut to get the exact output that you want.
Lm_sensors is a valuable tool for keeping an eye on your system’s hardware. Obviously, this guide didn’t go into every detail, but it does give a basis that is sure to get some minds turning. The GUIs also offer a ton of customization options for real time monitoring on your desktop. Enjoy keeping your computer cool and your desktop looking good.