Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lm_sensors
05-03-2018, 11:15 PM (This post was last modified: 05-04-2018 01:37 PM by zheny.)
Post: #1
lm_sensors
definition:
Quote:lm_sensors (Linux monitoring sensors) is a free and open-source application that provides tools and drivers for monitoring temperatures, voltage, and fans.

basic information can be gotten from 'sensors -h'
besides:
1.default values contained in config-file, '/etc/sensors3.conf' or '/etc/sensors.conf'. we can create files in '/etc/sensors.d' to override the default values, such as temp lable, value of reference temperature, compute raw value
for example:
Quote:/etc/sensors.d/XXXXXXXXXX
-------------------------------------------------------------------------------------------
chip "coretemp-isa-0000"
label temp2 "Core 0"
compute temp2 @-20,@-20

label temp3 "Core 1"
compute temp3 @-20,@-20
can change
Quote:coretemp-isa-0000
Adapter: ISA adapter
Core 0: +57.0°C (crit = +125.0°C)
Core 1: +55.0°C (crit = +125.0°C)
to
Quote:coretemp-isa-0000
Adapter: ISA adapter
Core 0: +37.0°C (crit = +105.0°C)
Core 1: +35.0°C (crit = +105.0°C)

2.lm_sensors has some scripts to realize advanced features,
for example:
1)fancontrol: is a shell script for use with lm_sensors. It reads its configuration from a file, then calculates fan speeds from temperatures and sets the corresponding PWM outputs to the computed values.
2)pwmconfig: tests the pulse width modulation (PWM) outputs of sensors and configures fancontrol.
3)sensors-conf-convert: is a Perl script to convert lm-sensors version 2 configuration files to work with version 3.
4)sensors-detect: is a Perl script that will walk you through the process of scanning your system for various hardware monitoring chips (sensors) supported by libsensors, or more generally by the lm_sensors tool suite.

use 'fancontrol' as an example:
a sample configuration file can be:
Quote:INTERVAL=10
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm1=20
MAXTEMP=hwmon0/device/pwm1=55
MINSTART=hwmon0/device/pwm1=150
MINSTOP=hwmon0/device/pwm1=105
...
explanation:
Quote:INTERVAL: how often the daemon should poll CPU temps and adjust fan speeds. INTERVAL is in seconds.
FCTEMPS: The temperature input device to read for CPU temperature. The above example corresponds to /sys/class/hwmon/hwmon0/device/temp1_input.
FCFANS: The current fan speed, which can be read (like the temperature) in /sys/class/hwmon/hwmon0/device/fan1_input
MINTEMP: The temperature (°C) at which to SHUT OFF the CPU fan. Efficient CPUs often will not need a fan while idling.
MAXTEMP: The temperature (°C) at which to spin the fan at its MAXIMUM speed. Setting it closer to MINTEMP will result in higher fan speeds overall.
MINSTOP: The PWM value at which your fan stops spinning. Each fan is a little different.
MINSTART: The PWM value at which your fan starts to spin again. This is often a higher value than MINSTOP as more voltage is required to overcome inertia.

for more details and examples, please refer to here
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: