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>
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>
attributes. These are defined in the standard sysfs interface for quite
some time, and at least three drivers (max6650, lm63 and applesmc)
implement them so we should support them.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6029 7894878c-1315-0410-8ee3-d5d059ff63e0
Some sensor chips report both instantaneous and average power.
Add support to display both.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6008 7894878c-1315-0410-8ee3-d5d059ff63e0
Use defines for array sizes. For alarm attributes, take into account that both
the generic alarm flag as well as individual alarm attributes may be provided
by a driver (even though that should not be the case).
Remove overflow checks from get_sensor_limit_data(), as overflows should
no longer happen.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6006 7894878c-1315-0410-8ee3-d5d059ff63e0
This will make it easier for us to help users find out correct scaling
factors when needed. Instead of telling them to go read the raw sysfs
attributes, they can just report the output of "sensors -u -c /dev/null".
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5877 7894878c-1315-0410-8ee3-d5d059ff63e0
representation of chip names.
sensord, sensors: Fix a memory leak when one or more chip names are
provided on the command line.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5740 7894878c-1315-0410-8ee3-d5d059ff63e0
Automatically scale energy and power values when printing them in cooked
mode. Fixed all the warnings and warts that were brought up by Jean in
the previous thread.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5185 7894878c-1315-0410-8ee3-d5d059ff63e0
be found, fallback to /etc/sensors.conf. This allows for an old
libsensors and a new libsensors to be installed in parallel, and each
one has its own configuration file.
One important change here is that the default configuration file will
be installed as /etc/sensors3.conf by "make install".
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4990 7894878c-1315-0410-8ee3-d5d059ff63e0