Clone the repository of the project. And move inside it:
$ git clone https://github.com/H1alus/lsensors.git
$ cd lsensors
make sure you have make, gcc and python3 installed.
Download the lm_sensors-devel ad lm_sensors packages:
Fedora or any RHEL based distro:
$ sudo dnf install lm_sensors-devel lm_sensors
Debian/Ubuntu based distro:
$ sudo apt install libsensors-dev lm-sensors
Arch based distro:
$ sudo pacman -S lm_sensors
Now do in the root dir of the project:
$ make
Make sure "lsensors" file has exec permission:
$ sudo chmod +x lsensors
Run this to let lsensors configure the settings.json file:
$ ./lsensors
If you wish add the program to PATH.
For example copy the project directory in /opt and add to your .bashrc:
export PATH=$PATH:/opt/lsensors
lsensors by default runs as logger to a file
created in your working dir as "thermals.log".
Note that you need to first set the "settings.json" in the "etc" folder of the project as you like. Set to "true" the sensors you want to log; usually the names are enough explicit by their own.
Other arguments are:
Show help message:
$ lsensors --help
Log on a file in the working dir, called "thermals.log":
$ lsensors -l
Print to stdout:
$ lsensors -p
Generate settings.json file and show help message:
$ lsensors
This code is distributed under the GNU General Public License V3, for further more information, check the LICENSE file.
You can run lsensors as a daemon.
This was made by myself in a short period of time. There's some stuff I'd like to change in the future but for the mean time it's working with no much cpu or memory usage and that's what matters for me.
- Recognize measurement unit for each type of subfeature