Commit Graph
5451 Commits
Author SHA1 Message Date
Michal Suchanek 06bd510ef7 Install troubleshooting tools 2024-01-17 19:39:46 +01:00
Michal Suchanek 9aa83ee190 sensors-save: New debug tool for saving sensor data from sysfs 2024-01-17 19:39:46 +01:00
Michal Suchanek 905634f182 sensors-find-driver: Convert README to man page 2024-01-17 19:39:46 +01:00
Michal Suchanek 3a5737fe7b Rename find-driver -> sensors-find-driver 2024-01-17 19:39:46 +01:00
Michal Suchanek 0b771017be Append the "+git" post-release marker to LM_VERSION 2024-01-13 17:05:48 +01:00
Michal Suchanek 5c3ba50f80 Release version 3.6.2 V3-6-2 2024-01-13 17:03:31 +01:00
Michal Suchanek 4bf8e37e0f Update API description
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2024-01-08 22:21:05 +01:00
Michal Suchanek 89548dab2a Add SENSORS_SYSFS_ROOT environment support
With this the hardcoded /sys location for reading sensor data can be
changed. In particular it makes it possible to tar up the /sys directory
when a problem is encountered, and then reproduce it on another system.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2024-01-07 21:20:39 +01:00
Michal Suchanek 25108fe4a4 More robust reading of labels
When the sysfs file is copied to a plain file it may contain trailing
zeroes which is not handled well by the label reading code.
2024-01-07 21:20:39 +01:00
Michal Suchanek 3bbd975860 quantity: Add enumeration type
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2024-01-06 23:05:07 +01:00
Michal Suchanek 502ce051fe sensors_temperature_type_name: New library function
Decode temperature sensor type to a string.

Add enum for temperature types.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2024-01-06 23:04:46 +01:00
Michal Suchanek 0c097bfca4 parser: Strip trailing whitespace 2024-01-06 20:26:05 +01:00
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 10c6068b3e sensors_parse_chip_name: Initialize path
sensors_parse_chip_name claims to overwrite all of result but path is
not set. This is generally not a problem when using statically allocated
data that is pre-zeroed but the parser uses dynamic allocation and the
chip name may contain garbage depending on the specific code flow
resulting from compiling the parser.
Setting the path was dropped when it was renamed from busname.

Fixes: 8896ba3b ("Rename sensors_chip_name.busname to path, as this is
		  what we are using it for by now.")
2023-12-30 19:05:13 +01:00
Michal Suchanek e0efe7dc76 Use output filename in flex invocation
With stdout output file name in debuginfo is specified as <stdout>.
2023-12-30 18:58:32 +01:00
Michal Suchanek 39d3145da9 test: Generate dependency files 2023-12-30 18:58:32 +01:00
Michal Suchanek 7a4b9b98c0 Correct dependencies for generated parser
The parser needs to be regenerated when makefile changes
2023-12-30 18:58:32 +01:00
Michal Suchanek c829b4c7fb Add LDFLAGS handling similar to CFLAGS 2023-12-29 15:37:00 +01:00
Michal Suchanek d60d6beebf Correct parser file dependencies
The dependencies for the parser files are not correct.

There is baroque irule adding header prerequisites to the parser but the
parser may still fail to build.

The real dependency is on conf-parse.h

There is no way to tell make that a rule produces two targets, such as
parse.c and parse.h. However, the dependency files are generated by a
separate rule, and not as a byproduct of building the source so they can
themselves have dependencies.

And dependencies they do have: when the header is generated it's in lib
but when the header is missing while generating dependency file it's
searched in top directory, and then the file that depends on it cannot
be built because the header neveer appears there.

When the generated .c file is addded as prerequisite to the dependency
file that should reference the header generated together with the .c
file the dependency file is generated correctly with the header present.

This is not easily reproducible with the current source but adding
conf-lex.h generated with conf-lex.c and including it in conf-parse.c
now makes both conf-lex.ad depend on conf-parse.h and conf-lex.ad on
conf-lex.h making the build 100% fail.
2023-12-29 15:11:49 +01:00
Michal Suchanek 9c66c7b59e Remove special build rules for parser
The parser can be generated warning-free, no need to suppress warnings.
2023-12-29 15:11:49 +01:00
Michal Suchanek f1af9ceae2 Add test makefile target 2023-12-28 20:58:39 +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 297b050d3d sysfs: Add function for determining feature quantity 2023-12-28 13:02:33 +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 fceeee0543 sysfs: Multiplier 1 is the default, no need to list it.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-12-27 13:40:53 +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 b76cd8a5f6 sysfs: Specific match has to go before generic match
This is not really a problem when the specific scaling factors happen to
be for factors not matched by a generic match but this may not hold in
general over time.

Fixes: 1bd92120 ("Fill the magnitude field of dynamically generated device entries.")
2023-12-27 13:17:16 +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
Michal Suchanek 43b6101bb0 sysfs: Expand filename buffer to quiet warning
The GCC heurisitc says that the buffer can overflow by 2 bytes, expand
it.
2023-12-26 16:35:46 +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 82ca61b38a sysfs: remove unused variable
Fixes: e5e053bb ("libsensors: Avoid non-symlink sysfs device entries")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-12-25 19:34:29 +01:00
Michal Suchanek 54efada033 Release version 3.6.1
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
V3-6-1
2023-12-24 23:38:23 +01:00
Michal Suchanek dbe3686933 Zotac IONITX-U: add conf extension. 2023-12-24 14:23:22 +01:00
hramrach e48f8a41c8 Merge pull request 'Create GA-MA770-UD3.conf' (#208) from clipo1979/patch-3 into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/208
2023-12-24 13:15:09 +01:00
hramrach d268aca651 Merge pull request 'Add config for MSI X570-A Pro' (#265) from depau-forks/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/265
2023-12-24 13:10:51 +01:00
hramrach 1b5678e09a Merge pull request 'Add MS-7C91 configuraation' (#306) from Tinigriffy/MS-7C91 into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/306
2023-12-24 13:09:58 +01:00
hramrach b36d388bbd Merge pull request 'Add Gigabyte GA-990FXA-UD7 config' (#326) from SakiiCode/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/326
2023-12-24 13:09:33 +01:00
hramrach 36cf57f0bf Merge pull request 'Add config for MSI B550-A Pro' (#330) from soerengrunewald/master into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/330
2023-12-24 13:08:52 +01:00
hramrach 928125e598 Merge pull request 'Create GA-Z68AP-D3.conf' (#338) from clipo1979/patch-4 into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/338
2023-12-24 13:08:19 +01:00
hramrach 39f1f39d9f Merge pull request 'Config file Zotac IONITX-U Series mainboard' (#413) from reibuehl/patch-1 into master
Reviewed-on: http://localhost:8888/hramrach/lm-sensors/pulls/413
2023-12-24 13:05:35 +01:00