Enable sensors-detect support for AMD Zen3 (Family 19h) CPUs. This PCI ID
is derived from Linux kernel PCI_DEVICE_ID_AMD_19H_DF_F3.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Move the detection entry for the Winbond WPCD377I to the
@non_hwmon_chip_ids table, where it belongs. This saves one line, and
more importantly prevents "not-a-sensor" from being accidentally
added to the list of kernel drivers.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Originally, support for the Nuvoton W83677HG-I and derivatives was
first added to the w83627ehf driver, so that's the driver recommended
by sensors-detect. Later, support for the same device was added to
the nct6775 driver. In kernel v5.6, support was removed from the
w83627ehf driver to get rid of the duplicate code.
So sensors-detect should now point users of this device to the
nct6775 driver. We can't do that for very old kernels though, as this
driver did not exist back then. I chose v3.10 for the cut-over, as
this is when support for the Nuvoton W83677HG-I was finalized in the
nct6775 driver, at least according to git log.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
The keywords Revision, Date and Id were being expanded by Subversion
way back when the project was being maintained in Subversion. Now when
the project is maintained in git, the keywords are no longer expanded
and appear e.g. in the output of sensors-detect literally.
Drop the keywords, or replace them with LM_SENSORS_VER where
applicable.
The value of the constant will have to be updated manually every time
a new release is made.
Inspired by a similar change in i2c-tools (commit daa430031ffd;
thanks, Jean).
The format of /proc/cpuinfo on other arches is different from the
format on x86. Modify the print_cpu_info function to handle arm and
ppc.
This change also eliminates Perl warnings caused by non-existent
elements in the %cpu hash:
Use of uninitialized value in concatenation (.) or string at
./prog/detect/sensors-detect line 3124.
Based on a patch from Changqing Li <changqing.li@windriver.com>,
GitHub PR: https://github.com/lm-sensors/lm-sensors/pull/168
Reorder Nuvoton chips in the superio_ids_winbond array to match the
order in the kernel to make lookup easier. No functional change.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Since mainline commit 0599682b826ff7bbf, the nct6775 driver uses a
0xfff8 mask when scanning for devices. Update our detection to match
the kernel.
Fixes#188
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
scale_value is generic function for scaling values. There is a lower
resolution then json format provides for voltage and current.
The patch is calling scale_value() and showing values with higher
resolution.
For example on Xilinx ZynqMP platform:
ina226-i2c-3-41
Adapter: i2c-0-mux (chan_id 0)
in0: 2.00 mV
in1: 848.00 mV
power1: 287.50 mW
curr1: 330.00 mA
Signed-off-by: Michal Simek <monstr@monstr.eu>
Previously, if an error happened when reading the value of a subfeature,
subCnt would get incremented and a stray comma would get printed in the
following iteration, even though nothing was printed in the previous
iteration. This would produce a syntactically incorrect JSON.
This is based on a patch from the su8 user on GitHub.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Don't print a newline if no features were printed.
This is based on a patch from the su8 user on GitHub.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The script is meant to identify the driver and kernel module responsible
for exporting a given hardware monitoring chip.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Add an option `-1`/`--oneline` that logs the updates sensor value with
the chip and adapter on the same line.
This makes it easier to parse and uniquely identify sensors without
labels, such as `temp1` in the example below.
Without `--oneline`:
```
Chip: iwlwifi-virtual-0
Adapter: Virtual device
temp1: 35.0 C
Chip: coretemp-isa-0000
Adapter: ISA adapter
Package id 0: 46.0 C
Core 0: 43.0 C
Core 1: 43.0 C
Core 2: 39.0 C
Core 3: 41.0 C
Chip: acpitz-virtual-0
Adapter: Virtual device
temp1: 25.0 C
Chip: dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 2512 RPM
Video Fan: 2498 RPM
CPU: 46.0 C
Ambient: 54.0 C
Ambient: 47.0 C
Other: 40.0 C
Chip: pch_skylake-virtual-0
Adapter: Virtual device
temp1: 66.0 C
```
With `--oneline`:
```
Chip: iwlwifi-virtual-0 Adapter: Virtual device temp1: 34.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Package id 0: 47.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 0: 42.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 1: 43.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 2: 39.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 3: 41.0 C
Chip: acpitz-virtual-0 Adapter: Virtual device temp1: 25.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Processor Fan: 2512 RPM
Chip: dell_smm-virtual-0 Adapter: Virtual device Video Fan: 2501 RPM
Chip: dell_smm-virtual-0 Adapter: Virtual device CPU: 46.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Ambient: 54.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Ambient: 48.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Other: 40.0 C
Chip: pch_skylake-virtual-0 Adapter: Virtual device temp1: 66.0 C
```
Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
SFP modules measure the transmit power of the lazer. The sensor has
expected minimum values, and alarms when these minimams are reached.
Add support to sensors to print these.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Do command substitution in double quotes to prevent word splitting.
The issue was reported by Coverity Scan.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>