Commit Graph
2015 Commits
Author SHA1 Message Date
Michal Suchanek 6b5a19b708 rrd: drop useless cast
Cast of (const char **) to (char **) avoids one warning to introduce
another. Drop it. rrd upstream should not need the cast anymore.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2024-01-06 20:25:40 +01:00
Michal Suchanek c6c5dfcffd sensors: New json format option
Using -J rather than -j gives JSON with new, hopefully more usable
structure.
2023-12-28 13:04:22 +01:00
Michal Suchanek 3764b44396 json: Drop whitespace
The json can be reformatted with jq or similar tool into desired layout.
2023-12-28 13:04:10 +01:00
Michal Suchanek 0d9ea7f031 Move temperature sensor type translation to library 2023-12-28 13:03:50 +01:00
Michal Suchanek fcf478016d sensors: Use quantity unit to determine when to translate to fahrenheit 2023-12-28 13:02:52 +01:00
Michal Suchanek b4ab3652af sensors: json: Fix print of sensors without values
When the sensor does not provide a value something bogus is printed,
print a NaN instead.

Also update the output counting to also print a comman for NaNs.
2023-12-28 13:00:49 +01:00
Michal Suchanek 6fa5cba2e3 sysfs: Do not prescale frequency to MHz
Add autoscaling in the output instead.

Fixes: 54363271 ("libsensors + sensors: Add freq_input support")
2023-12-27 14:57:05 +01:00
Michal Suchanek c1a1f4ff20 pwm: Move scaling factor from sensors prog to library
Fixes: a6ec549e ("sensors: Add support for pwm sensors")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-12-27 13:17:28 +01:00
Michal Suchanek aa87b54d43 sensors: Also avoid conversion from double to float for Fahrenheit
Fixes: 868fd8d0 ("Avoid the conversions from double to float.")
2023-12-26 20:56:36 +01:00
Johannes Segitz f9ccac7d71 harden_sensord.service 2023-12-26 13:51:51 +01:00
Johannes Segitz 6c21643ed0 harden_lm_sensors.service 2023-12-26 13:51:51 +01:00
Johannes Segitz 209aab03ee harden_fancontrol.service 2023-12-26 13:51:51 +01:00
jdelvare@suse.de db241f6c6d lm_sensors-3.4.0-sensord-service-extra-args
Allow passing arbitrary extra arguments to sensord.
2023-12-26 13:51:51 +01:00
Jean Delvare ee5a542b20 pwmconfig: Further raise the fan threshold
Modern 4-pin fans can have a minimum speed (PWM=0) which is still
relatively high. I've seen 4500 RPM fans lower their speed to only
3500 RPM, which is 77% of the maximum speed, above our current
detection threshold (3/4 or 75%). Increase the threshold to 5/6
(roughly 83%) to make sure such fans are handled properly.

References: boo#1181890
Signed-off-by: Jean Delvare <jdelvare@suse.de>
2023-12-26 13:50:24 +01:00
Jean Delvare 36d976cba6 /var/run is deprecated
Systemd now wants PID files in /run, not /var/run. Service files have
been updated upstream already, but not the path used by the actual
programs. Change them too so that things don't break when the
/var/run symlink is eventually dropped.

References: bsc#1185183
2023-12-26 13:50:24 +01:00
Michal Suchanek 79d7803c41 Append the "+git" post-release marker to LM_VERSION 2023-12-26 13:45:29 +01:00
Michal Suchanek 54efada033 Release version 3.6.1
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-12-24 23:38:23 +01:00
hramrach 7602fa5ff7 Merge pull request 'Add support for static only build' (#254) from ffontaine/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/254
2023-12-24 12:43:47 +01:00
hramrach 380b953638 Merge pull request 'sensord: Add support of emergency alarm' (#280) from amitcohen1/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/280
2023-12-24 12:40:49 +01:00
hramrach 3ca5feb1fa Merge pull request 'Update pwmconfig' (#304) from SirYaro/patch-1 into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/304
2023-12-24 12:38:28 +01:00
hramrach da5ff639fb Merge pull request 'sensors: Handle json trailing ',' when no features are listed' (#305) from nathanrossi/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/305
2023-12-24 12:37:30 +01:00
Michal Suchanek c91425c121 Merge branch 'thomab/freq' of ~/gitea/data/gitea-repositories/hramrach/lm-sensors 2023-12-24 12:28:52 +01:00
hramrach fbdf135806 Merge pull request 'sensors: Add support for rated values' (#358) from cpackham-atlnz/rated-values into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/358
2023-12-24 12:24:56 +01:00
hramrach fb35c5b4fa Merge pull request 'fancontrol, pwmconfig: Allow read-only pwm*_enable' (#344) from amezin/master into master
Note: strip superfluous parentheses
2023-12-24 12:20:04 +01:00
hramrach d13de9c532 Merge pull request 'prog/sensors: Only do conversion to Fahrenheit on temperatures' (#359) from cpackham-atlnz/fahrenheit into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/359
2023-12-24 12:07:22 +01:00
hramrach e7ecb0b92f Merge pull request 'Pwm' (#363) from Wer-Wolf/pwm into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/363
2023-12-24 12:06:18 +01:00
hramrach d2c15ac572 Merge pull request 'pwmconfig: Deal with relative paths for the config file.' (#386) from misieck/RelPath into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/386
2023-12-24 12:00:46 +01:00
hramrach 67898d9d9b Merge pull request 'ZSH completion for sensors and sensors-detect' (#404) from VorpalBlade/feature/zsh-completion into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/404
2023-12-24 11:58:03 +01:00
hramrach f6a3acb18a Merge pull request 'Add support for "inverted mode" PWM to fancontrol' (#435) from enkiusz/inverted-pwm-drive into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/435
2023-12-24 11:55:45 +01:00
hramrach f9be5331c8 Merge pull request 'fix spelling error' (#420) from uniontech-lilinjie/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/420
2023-12-24 11:54:24 +01:00
hramrach c5ae3fec1e Merge pull request 'fancontrol: Executable commands as temp sensors.' (#443) from xloem/tempexec into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/443
2023-12-24 11:53:24 +01:00
Miigon 88eeffcb50 pwmconfig: change usage of 'egrep' to 'grep -E'
GNU grep warns 'egrep' as obsolescent since grep-3.8
2023-06-14 08:36:21 +08:00
xloem d6dced0503 fancontrol: Executable commands as temp sensors. 2023-04-29 17:25:21 -04:00
Maciej Grela 2568fc1073 Allow configurations with MINPWM > MAXPWM
These configurations would drive the PWM outputs in an "inverted mode"
where the 0 value is full fan speed and 255 stops the fan. The PWM
output adjustment algorithm works correctly in this situation.
2023-03-26 17:02:22 +02:00
lilinjie f24ed9de23 fix spelling error
Signed-off-by: lilinjie <lilinjie@uniontech.com>
2022-12-12 11:01:54 +08:00
Arvid Norlander 3e82636733 ZSH completion for sensors and sensors-detect 2022-07-18 18:00:45 +02:00
Michal Pomorski 9943682a80 Add quotes over path variables. 2022-02-10 02:39:26 +01:00
Michal Pomorski 5e2e1fff53 Deal with relative paths for the config file. 2022-02-10 02:20:03 +01:00
Armin Wolf a6ec549ed6 sensors: Add support for pwm sensors
Add print_chip_pwm for displaying SENSORS_FEATURE_PWM.
2021-08-28 08:02:01 +02:00
Chris Packham 488d20b783 prog/sensors: Only do conversion to Fahrenheit on temperatures
Only apply conversion from Celsius to Fahrenheit on temperature values.
Leave other sensor readings as they were returned.

Fixes #357

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
2021-08-13 17:05:28 +12:00
Chris Packham 88f6c5ec9b sensors: Add support for rated values
Sysfs attributes for rated values were recently added to the kernel[1].
This adds support for displaying them in lm-sensors.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8e61235

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
2021-08-12 15:07:38 +12:00
thomb 543632712e libsensors + sensors: Add freq_input support 2021-06-21 20:54:18 +02:00
Aleksandr Mezin 49b6ae283d pwmconfig, fancontrol: Allow read-only pwm*_enable
Don't fail if pwm*_enable is read-only, but already set to 1.
2021-06-18 12:12:12 +06:00
sibeream a0ef84f658 Flag allow-no-sensors added. 2021-02-24 15:50:14 +01:00
Nathan Rossi c567724339 sensors: Handle json trailing ',' when no features are listed
The json format requires that the last entry of a dictionary does not
have a trailing ','. To avoid generating invalid json output, check that
there are features to list before emitting the trailing ','.

This issue is present when a chip exists but all its sensors are
ignored:
{
    "example-device" : {
      "Adapter": "example adapter",
    }
}

The corrected output is:
{
    "example-device" : {
      "Adapter": "example adapter"
    }
}

Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
2021-01-12 01:56:25 +00:00
Sir_Yaro a8d4d1eaef Update pwmconfig
If sensor doesn't return any value (in my case it happen when fan got broken - look below) whole script gets messed up. "cut" latter in the script assume there are more values in $GOODFAN then there are really and "cut -d' ' -f$count" doesn't return proper value.

root@yaro-desktop2:/sys/class/hwmon# cat hwmon0/fan1_input 
cat: hwmon0/fan1_input: Bad argument
root@yaro-desktop2:/sys/class/hwmon#
2020-12-30 20:33:26 +01:00
Artem Egorenkov 58da103714 Merge pull request #290 from pzahemszky/2020-11-14-fancontrol
Improve some error messages of fancontrol
2020-12-02 15:50:49 +01:00
David Bartley ac03cccaf9 sensors-detect: Add support for NCT6687D.
Signed-off-by: David Bartley <andareed@gmail.com>
2020-12-01 02:44:32 -08:00
Peter Zahemszky af6bb037ef Improve some more error messages 2020-11-14 13:16:08 +00:00
Peter Zahemszky 1d8f9f18f9 Fix an error message 2020-11-14 13:12:35 +00:00