Another big one, with a long time to-do item done! /sys based sensors data is

now used as a fallback, with fully revised error messages to handle this new
sensor data variant. Due to potential bugs this might create, this was left off
of the 3.3.21 release, which needed to go out on a schedule, but there is plenty
of time for 3.3.22 to be debugged.

--------------------------------------------------------------------------------
KNOWN ISSUES:

1. inxi can't currently handle raw in[0-9] voltage sensor data from
/sys/class/hwmon, that may get corrected, but I've honestly never seen a system
that shows raw in[0-9] values as field names, so it's probably not very
pressing, but it can happen. Similar that is to how default fanx and tempx field
names are processed.

2. Currently only checking -Gx, -Nx device temp for bus IDs ending in .0, which
is the primary PCI device. I think that's the only one that will have a temp,
.1, which is a second device on the same hardware, doesn't have that data in
tests. Saves some requests since it's a big glob of /sys.

3. Spiral Linux has no obvious way to determine that it is Spiral and not Debian
11 as base distro. No /etc/ files for distro ID contain anything for spiral, so
leaving that one alone.

4. Can't get 100% reliable cpu level > v2 due to it not being a pure cpu flag
based test, which is kind of sadly typical for the originators of this idea, but
since the choice was dump the feature, or just use the note: check for > v2,
opted for note: check. One wants to ask questions here, but honestly I already
know the answer so why bother asking the question... The docs for this are
awful, inadequate, incomplete.

My strong suspicion is that this is NOT intended to be a distro-wide feature
beyond v2 support minimum, but rather is for specific compile options for a
package or daemon or server or whatever that can benefit from this type of
fine-tuning. One thinks of Gentoo for example back when such fine-tunings could
actually deliver noticeable differences in performance. A per system type
feature that is, not a distro-wide feature. At least that's my initial feeling,
but this is probably about all the  time I will spend on it since inxi can't get
it more accurate anyway.

--------------------------------------------------------------------------------
BUGS:

1. Bug in monitor position logic, the horizontal/vertical sorts were being done
alphanumerically, leading to absurd results where 800 > 2560 or whatever.
Basically all x / y positions less than 1000 would have forced the smaller
number to be considered as the greatest value. Another corner case find by
mrmazda. Thanks mrmazda!

--------------------------------------------------------------------------------
FIXES:

1. Added i350bb sensor to network sensor type.

2. Small glitch with some scenarios with missing fan1 in sensors, showed fan1 0
rpm, but then showed fan 3: empty. That was a slight error in how undefined vs
'' empty was treated.

3. Added fix for defective fan speeds, skip fan item if > 15000, which is a bug
in the fan speed report, making it useless. Seen 65535 reported RPM. Could
probably make it 10000 upper limit but suspect that is a simple bug that creates
an absurd value, 2^16 so won't be anything high unless bug active. This fix runs
for ipmi, linux, and sysctl fan data.

4. Trying for fix for dynamic gpu voltage, assumed always mV, but might be V.

5. Inadequate or obscure or non-existent redhat/suse documentation led to some
fixes for cpu v levels. Note that level v3/v4 can't be fully determined by cpu
flag tests, but who cares? Certainly not me. Added 'note: check' for v3/v4.

6. Nvidia device arch id was too loose, false id for non existing lovelace arch.
Note that due to array reverse, the newest ids will always run first, which
leads to possible false positives with first string match tests when no product
IDs are available yet.

--------------------------------------------------------------------------------
ENHANCEMENTS:

1. Elbrus CPU arch, process, year, arch data made more complete using new data
resource. Thanks Elbrus guys!

2. Finally, raw, basic /sys/class/hwmon temp data. Linux kernel docs note
supports temp, fan, volts, amps, energy. But have only seen temps so far. Can
force /sys use with --force sensors-sys / --sensors-sys, though there's no point
to doing that except to test.

Also changed --recommends to note lm-sensors not required for sensor data now.

3. Adding device temp for -Gx, -Nx. Will only work for Linux and when found, and
only for free drivers (I think).

4. Added xdriinfo based dri drivers (with fallback to Xorg.0.log as data source,
not as accurate), that will show if and only if that driver is not the same name
as a detected X or gpu driver.

5. Another big upgrade to cp_cpu_arch, added and corrected many AMD/Intel
matches.

6. A few more gpu product ids, Intel, added.

7. More disk vendors, ids, the list, as we are now well aware, is endless,
reflecting perhaps the futility of pursuing the infinite using finite means.

--------------------------------------------------------------------------------
CHANGES:

1. Slight changes in how inxi supplies no sensor data messages, and in the
fallback cases and handling. More accurate and precise, and more robust overall.

2. Due to complexity of understanding level: and the fact not all cpu flags are
exposed that are required, moved -Cxx level: to -Ca.

3. Changing slightly inaccurate Sound Server for ALSA/OSS to Sound API, which is
the closest I can come to explaining clearly what it is. Note that you can only
load one API type audio subsystem/driver, so you will be running one or the
other, never both, from what I understand.

Since OpenBSD sndio includes sndiod, calling that a sound server is basically
fine, since it's both the server and the interface, if I understand it right,
and there won't be a second sound server listed, actually won't be for any BSD
that I know of, it's going to be sndio or OSS or nothing, unless something has
changed.

--------------------------------------------------------------------------------
DOCUMENTATION:

1. Man page, updates for /sys/class/hwmon based sensor data.

2. Small update for cpu level v3/v4, added note: check explanation, though it's
too hard to really explain this stuff since the docs are... not wonderful, when
they even exist and don't contradict each other.

--------------------------------------------------------------------------------
CODE:

1. Refined significantly sensors missing data and error messages to be much more
accurate and granular. Also enables more sensors tools, though hopefully they
won't appear since those are a real pain to implement, but it's more open to
being sensor tool agnostic now due to these refinements than before.

2. Added xdpiinfo to debugger.

3. Switched x_drivers to return ref of array of refs, use join for output only,
that lets us use the drivers to test dri stuff also (if we want or need to), and
keeps it consistent with how most of inxi does that type of data
handling/testing. If undef, it means no array ref exists, which makes testing
easy.

Not truly understanding hash/array refs when inxi rewrite to Perl started is
probably one of the bigger causes of glitches and ongoing optimizations.
Basically, in all but very small array cases, it's almost always better to start
with a ref from the start as soon as the hash/array moves between functions,
with one exception, when it's a globally stored data item. Then it depends. But
this requires a consistent testing for null data as well, which is harder if you
did it in different ways from the start. But slowly and surely chipping away at
these.
This commit is contained in:
Harald Hope 2022-10-07 19:43:17 -07:00
parent a87da04d67
commit b6ac6026f2
3 changed files with 912 additions and 324 deletions

969
inxi

File diff suppressed because it is too large Load diff

79
inxi.1
View file

@ -15,7 +15,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.TH INXI 1 "2022\-08\-06" "inxi" "inxi manual"
.TH INXI 1 "2022\-10\-08" "inxi" "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
@ -318,8 +318,9 @@ Deprecated. See \fB\-G \-a\fR.
.B \-G \fR, \fB\-\-graphics\fR
Show Graphic device(s) information, including details of device and display
drivers (\fBX:\fR \fBloaded:\fR, and, if applicable: \fBunloaded:\fR,
\fBfailed:\fR, and active \fBgpu:\fR drivers), display protocol (if available),
display server (and/or Wayland compositor), vendor and version number, e.g.:
\fBfailed:\fR, \fBdri:\fR (if X and different from loaded X drivers) drivers,
and active \fBgpu:\fR drivers), display protocol (if available), display server
(and/or Wayland compositor), vendor and version number, e.g.:
\fBDisplay: x11 server: Xorg v: 1.15.1\fR
@ -692,9 +693,15 @@ then shows what package(s) you need to install to add support for each feature.
Show output from sensors if sensors installed/configured: Motherboard/CPU/GPU
temperatures; detected fan speeds. GPU temperature when available. Nvidia shows
screen number for multiple screens. IPMI sensors are also used (root required)
if present. See Advanced options \fB\-\-sensors\-use\fR or
\fB\-\-sensors\-exclude\fR if you want to use only a subset of all sensors, or
exclude one.
if present.
See Advanced options \fB\-\-sensors\-use\fR or \fB\-\-sensors\-exclude\fR if you
want to use only a subset of all sensors, or exclude one (currently only for
\fBlm\-sensors\fR and \fB/sys\fR sourced data).
For current Linux, will fallback gracefully to using \fB/sys/class/hwmon\fR as
sensor data source if \fBlm\-sensors\fR is not installed. You can compare the
two by using \fB\-\-force sensors\-sys\fR option with \fB\-s\fR.
.
.TP
.B \-\-slots\fR
@ -998,7 +1005,6 @@ Konversation etc.
Setting a specific color type removes the global color selection.
.TP
.B \-\-indent [11\-xx]\fR
Change primary wide indent width. Generally useless. Only applied if output
@ -1208,7 +1214,7 @@ dds rev version to optical drive.
.TP
.B \-x \-D\fR
\- Adds HDD temperature with disk data.
\- Adds drive temperature with disk data.
Method 1: Systems running Linux kernels ~5.6 and newer should have
\fBdrivetemp\fR module data available. If so, drive temps will come from
@ -1269,6 +1275,8 @@ specific vendor [product] information.
\- \fBX.org:\fR Adds (for single GPU, nvidia driver) screen number that GPU is
running on.
\- Adds device temperature for each discrete device (Linux only).
.TP
.B \-x \-i\fR
\- Adds IP v6 additional scope data, like Global, Site, Temporary for
@ -1343,6 +1351,8 @@ specific vendor [product] information.
\- Adds PCI/USB ID of each device.
\- Adds device temperature for each discrete device (Linux only).
.TP
.B \-x \-o\fR, \fB\-x \-p\fR, \fB\-x \-P\fR
\- Adds \fBmapper:\fR (the \fB/dev/mapper/\fR partition ID)
@ -1363,8 +1373,8 @@ bitmap (if present). Resync line, shows blocks synced/total blocks.
.TP
.B \-x \-s\fR
\- Adds basic voltages: 12v, 5v, 3.3v, vbat (\fBipmi\fR, \fBlm-sensors\fR if
present).
\- Adds basic voltages: 12v, 5v, 3.3v, vbat (\fBipmi\fR, \fBlm\-sensors /
/sys/class/hwmon\fR if present).
.TP
.B \-x \-S\fR
@ -1402,12 +1412,6 @@ found for each distribution system base detection.
.B \-xx \-B\fR
\- Adds serial number.
.TP
.B \-xx \-C\fR
\- Adds microarchitecture level (v1,v2,v3,v4) (Intel and AMD 64 bit CPUs only).
This information is used for setting compile time optimization switches in for
example GCC. These levels were introduced in 2020.
.TP
.B \-xx \-D\fR
\- Adds disk serial number.
@ -1825,6 +1829,13 @@ shown).
only will show if Core generation, otherwise the arch value is enough. For AMD,
only shows Zen generation.
\- Adds microarchitecture \fBlevel:\fR (v1,v2,v3,v4) (64 bit Intel/AMD CPUs
only). This information is used for setting compile time optimization switches
in for example GCC. These levels were introduced in 2020.
Because this a CPU flag based test, and these levels when > 2 are not always
100% based on exposed CPU flags (eg OSXSAVE), for > v2, adds \fBnote: check\fR.
\- Adds CPU family, model\-id, and stepping (replaces \fBrev\fR of \fB\-Cx\fR).
Format is \fBhexadecimal (decimal)\fR if greater than 9, otherwise
\fBhexadecimal\fR.
@ -1919,6 +1930,8 @@ differences shown, like \fBcores:\fR, \fBmin/max:\fR, etc.
type: MT MCP MCM SMP
arch: Zen
gen: 1
level: v3
note: check
process: GF 14nm
built: 2017\-19
family:0x17 (23)
@ -2073,8 +2086,8 @@ Graphics:
active: DVI\-I\-1,VGA\-1 empty: HDMI\-A\-1 bus\-ID: 0a:00.0
chip\-ID: 1002:68f9 class\-ID: 0300
Display: x11 server: X.Org v: 1.21.1.3 with: Xwayland v: 22.1.0
compositor: xfwm v: 4.16.1 driver: X: loaded: modesetting gpu: radeon
display\-ID: :0.0 screens: 1
compositor: xfwm v: 4.16.1 driver: X: loaded: modesetting dri: r600
gpu: radeon display\-ID: :0.0 screens: 1
Screen\-1: 0 s-res: 2560x1024 s-dpi: 96 s\-size: 677x270mm (26.65x10.63")
s\-diag: 729mm (28.7")
Monitor\-1: DVI\-I\-1 pos: primary,left model: Samsung SyncMaster
@ -2294,7 +2307,7 @@ Shortcut. See \fB\-\-force dmidecode\fR.
Force inxi to use Curl, Fetch, Perl, or Wget for downloads.
.TP
.B \-\-force [colors|dmidecode|hddtemp|lsusb|rpm|usb-sys|wayland|vmstat|wmctrl]\fR
.B \-\-force [option(s)]\fR
Various force options to allow users to override defaults. Values can be given
as a comma separated list:
@ -2330,7 +2343,14 @@ For systems that support running rpm along with the primary package installer
if any, installed, so the command runs in those cases (if inxi can determine it
is running in that type of system).
\- \fBusb-sys\fR \- Forces the USB data generator to use \fB/sys\fR as data
\- \fBsensors\-sys\fR \- Force use of \fB/sys/class/hwmon\fR data for sensors
(excluding ipmi sensors, which are their own line if present), skip
\fBlm\-sensors\fR. Generally useful for testing since sys data is used if no
lm\-sensors data was found anyway, but if \fBlm\-sensors\fR was installed, and
returned no data, it's most likely if not nearly certain that \fB/sys\fR will
also not return data.
\- \fBusb\-sys\fR \- Forces the USB data generator to use \fB/sys\fR as data
source instead of \fBlsusb\fR (Linux only).
\- \fBvmstat\fR \- Forces use of vmstat for memory data.
@ -2423,19 +2443,24 @@ on a one time basis.
.TP
.B \-\-sensors\-exclude\fR
Similar to \fB\-\-sensors\-use\fR except removes listed sensors from sensor
data. Make permanent with \fBSENSORS_EXCLUDE\fR configuration item. Note that
gpu, network, disk, and other specific device monitor chips are excluded by
Linux only. Similar to \fB\-\-sensors\-use\fR except removes listed sensors from
sensor data. Make permanent with \fBSENSORS_EXCLUDE\fR configuration item. Note
that gpu, network, disk, and other specific device monitor chips are excluded by
default.
Example: \fBinxi \-sxx \-\-sensors\-exclude k10temp-pci-00c3\fR
.TP
.B \-\-sensors\-sys\fR
Shortcut. See \fB\-\-force sensors\-sys\fR
.TP
.B \-\-sensors\-use\fR
Use only the (comma separated) sensor arrays for \fB\-s\fR output. Make
permanent with \fBSENSORS_USE\fR configuration item. Sensor array ID value
must be the exact value shown in lm\-sensors sensors output (Linux/lm-sensors
only). If you only want to exclude one (or more) sensors from the output,
Linux only. Use only the (comma separated) sensor arrays for \fB\-s\fR output.
Make permanent with \fBSENSORS_USE\fR configuration item. Sensor array ID value
must be the exact value shown in lm\-sensors sensors output (lm-sensors only) or
use \fB\-s \-\-dbg 18\fR ('main' =>.. section) to see the sensor ID strings used
internally. If you only want to exclude one (or more) sensors from the output,
use \fB\-\-sensors\-exclude\fR.
Can be useful if the default sensor data used by inxi is not from the right

View file

@ -1,3 +1,171 @@
================================================================================
Version: 3.3.22
Patch: 00
Date: 2022-10-08
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
Another big one, with a long time to-do item done! /sys based sensors data is
now used as a fallback, with fully revised error messages to handle this new
sensor data variant. Due to potential bugs this might create, this was left off
of the 3.3.21 release, which needed to go out on a schedule, but there is plenty
of time for 3.3.22 to be debugged.
--------------------------------------------------------------------------------
KNOWN ISSUES:
1. inxi can't currently handle raw in[0-9] voltage sensor data from
/sys/class/hwmon, that may get corrected, but I've honestly never seen a system
that shows raw in[0-9] values as field names, so it's probably not very
pressing, but it can happen. Similar that is to how default fanx and tempx field
names are processed.
2. Currently only checking -Gx, -Nx device temp for bus IDs ending in .0, which
is the primary PCI device. I think that's the only one that will have a temp,
.1, which is a second device on the same hardware, doesn't have that data in
tests. Saves some requests since it's a big glob of /sys.
3. Spiral Linux has no obvious way to determine that it is Spiral and not Debian
11 as base distro. No /etc/ files for distro ID contain anything for spiral, so
leaving that one alone.
4. Can't get 100% reliable cpu level > v2 due to it not being a pure cpu flag
based test, which is kind of sadly typical for the originators of this idea, but
since the choice was dump the feature, or just use the note: check for > v2,
opted for note: check. One wants to ask questions here, but honestly I already
know the answer so why bother asking the question... The docs for this are
awful, inadequate, incomplete.
My strong suspicion is that this is NOT intended to be a distro-wide feature
beyond v2 support minimum, but rather is for specific compile options for a
package or daemon or server or whatever that can benefit from this type of
fine-tuning. One thinks of Gentoo for example back when such fine-tunings could
actually deliver noticeable differences in performance. A per system type
feature that is, not a distro-wide feature. At least that's my initial feeling,
but this is probably about all the time I will spend on it since inxi can't get
it more accurate anyway.
--------------------------------------------------------------------------------
BUGS:
1. Bug in monitor position logic, the horizontal/vertical sorts were being done
alphanumerically, leading to absurd results where 800 > 2560 or whatever.
Basically all x / y positions less than 1000 would have forced the smaller
number to be considered as the greatest value. Another corner case find by
mrmazda. Thanks mrmazda!
--------------------------------------------------------------------------------
FIXES:
1. Added i350bb sensor to network sensor type.
2. Small glitch with some scenarios with missing fan1 in sensors, showed fan1 0
rpm, but then showed fan 3: empty. That was a slight error in how undefined vs
'' empty was treated.
3. Added fix for defective fan speeds, skip fan item if > 15000, which is a bug
in the fan speed report, making it useless. Seen 65535 reported RPM. Could
probably make it 10000 upper limit but suspect that is a simple bug that creates
an absurd value, 2^16 so won't be anything high unless bug active. This fix runs
for ipmi, linux, and sysctl fan data.
4. Trying for fix for dynamic gpu voltage, assumed always mV, but might be V.
5. Inadequate or obscure or non-existent redhat/suse documentation led to some
fixes for cpu v levels. Note that level v3/v4 can't be fully determined by cpu
flag tests, but who cares? Certainly not me. Added 'note: check' for v3/v4.
6. Nvidia device arch id was too loose, false id for non existing lovelace arch.
Note that due to array reverse, the newest ids will always run first, which
leads to possible false positives with first string match tests when no product
IDs are available yet.
--------------------------------------------------------------------------------
ENHANCEMENTS:
1. Elbrus CPU arch, process, year, arch data made more complete using new data
resource. Thanks Elbrus guys!
2. Finally, raw, basic /sys/class/hwmon temp data. Linux kernel docs note
supports temp, fan, volts, amps, energy. But have only seen temps so far. Can
force /sys use with --force sensors-sys / --sensors-sys, though there's no point
to doing that except to test.
Also changed --recommends to note lm-sensors not required for sensor data now.
3. Adding device temp for -Gx, -Nx. Will only work for Linux and when found, and
only for free drivers (I think).
4. Added xdriinfo based dri drivers (with fallback to Xorg.0.log as data source,
not as accurate), that will show if and only if that driver is not the same name
as a detected X or gpu driver.
5. Another big upgrade to cp_cpu_arch, added and corrected many AMD/Intel
matches.
6. A few more gpu product ids, Intel, added.
7. More disk vendors, ids, the list, as we are now well aware, is endless,
reflecting perhaps the futility of pursuing the infinite using finite means.
--------------------------------------------------------------------------------
CHANGES:
1. Slight changes in how inxi supplies no sensor data messages, and in the
fallback cases and handling. More accurate and precise, and more robust overall.
2. Due to complexity of understanding level: and the fact not all cpu flags are
exposed that are required, moved -Cxx level: to -Ca.
3. Changing slightly inaccurate Sound Server for ALSA/OSS to Sound API, which is
the closest I can come to explaining clearly what it is. Note that you can only
load one API type audio subsystem/driver, so you will be running one or the
other, never both, from what I understand.
Since OpenBSD sndio includes sndiod, calling that a sound server is basically
fine, since it's both the server and the interface, if I understand it right,
and there won't be a second sound server listed, actually won't be for any BSD
that I know of, it's going to be sndio or OSS or nothing, unless something has
changed.
--------------------------------------------------------------------------------
DOCUMENTATION:
1. Man page, updates for /sys/class/hwmon based sensor data.
2. Small update for cpu level v3/v4, added note: check explanation, though it's
too hard to really explain this stuff since the docs are... not wonderful, when
they even exist and don't contradict each other.
--------------------------------------------------------------------------------
CODE:
1. Refined significantly sensors missing data and error messages to be much more
accurate and granular. Also enables more sensors tools, though hopefully they
won't appear since those are a real pain to implement, but it's more open to
being sensor tool agnostic now due to these refinements than before.
2. Added xdpiinfo to debugger.
3. Switched x_drivers to return ref of array of refs, use join for output only,
that lets us use the drivers to test dri stuff also (if we want or need to), and
keeps it consistent with how most of inxi does that type of data
handling/testing. If undef, it means no array ref exists, which makes testing
easy.
Not truly understanding hash/array refs when inxi rewrite to Perl started is
probably one of the bigger causes of glitches and ongoing optimizations.
Basically, in all but very small array cases, it's almost always better to start
with a ref from the start as soon as the hash/array moves between functions,
with one exception, when it's a globally stored data item. Then it depends. But
this requires a consistent testing for null data as well, which is harder if you
did it in different ways from the start. But slowly and surely chipping away at
these.
--------------------------------------------------------------------------------
-- Harald Hope - Sat, 7 Oct 2022 11:15:12 -0700
================================================================================
Version: 3.3.21
Patch: 00