A small point release, some nice enhancements, a few bug fixes, and some fixes

to correct or update some issues. Main new features:
* -rx,-rxx,-ra/-Ix,-Ixx,-Ia: enhanced Packages: report
* -Cxx: microarchitecture level. This is a relatively new convention, used to
set various compile flags.

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

1. Can't safely look for pm tool KDE Discover because apt calls it
plasma-discover, but other packaging systems call it discover, which is already
a non-related program (hardware data). Since it's not really core to any package
manager, it's not really a necessary thing to report anyway, though
gnome-software is added because that appears to be more like syntaptic than
anything else.

There's also a qt variant of the rpm packagekit, packagekit-qt, which is
available in for example Arch, but again, it's too granular, and not really
core.

2. At some point, sensors should add /sys hwmon sensor data, then switch to
using lm-sensors as a fallback, and remove one recommended tool from newer linux
systems. I don't think that's too hard, just a bunch of little steps to
integrate that into the main logic.

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

1. For Slackware slackpkg/pkgtool:
a: Failed to show package counts at all because of bad globbing path, forgot /*.
b. Failed to show lib counts for packages due to having wrong counter for path.

2. If no ipmi sensor data was found but the tools are present, could result in
an undefined hash reference error for sensors. The most likely cause for this is
that one of the ipmi commands:
"ipmi-tool sensors" or "ipmi-sensors"
had an error, and since errors are sent to /dev/null, inxi saw null data, then
returned an undefined value instead of the hash reference it was supposed to.
This is the first time I've seen this happen with ipmi, but there have not been
a lot of ipmi samples.

Thanks issue poster #274 for having systems that triggered this scenario.

3. $source for ipmi was set to lm-sensors by accident.

4. For sensors, with > 1 sensor type, like lm-sensors + ipmi, sensor data from
second sensor type was getting written to first sensor type row. See Fixes 9 for
more sensors fixes.

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

1. Force CPU bits to 64 if LM flag is present, if it reports as i686. This fix
only runs for non RISC CPUs that show as 32 bit, so it won't run very often. If
no LM found, remains 32 bit.

This fix goes along with enhancement 1, which only applies to 64 bit CPUs.

2. In --recommends, JSON::PP module package names were wrong, they were copied
from JSON::Cpanel::XS and hadn't been changed to the right package names. Note
that for most distros, this is in Perl Core Modules, but not all.

3. Samsung ram vendor id was too tight, loosened it up a bit. Missed this one:
K3LK7K70BM

4. With Bug 1, extended possible package manager tool detection for slackware
type systems. Slackware is kind of unique in that it is not actually made out of
a core package manager as a collection of packages, but uses package managers as
a kind of layer on top of that, but none of those tools is required to run the
system.

5. Found another corner case indentation glitch, was adding in level 2 on -I
which is has no second level indentation.

6. Forgot to add $force{'pkg'} to -v8.

7. Small fix, if -Z is used, forgot to force --zl, --zu, --zv to false as well
as -z.

8. Small fix, for saphire rapids, alder lake, added + to year built, since those
are ongoing.

9. Sensors:
a. in one case, with an array of fan speeds, set to '' instead of undef, which
made test fail, and showed empty fan item.
b. added wildcards for possible voltage/power matches, was too restrictive for
ipmi sensors values.
c. added better space regex for ipmi temps [\s_-]?
d. DIMM voltage/temp excluded > 9 numbering, like DIMM 19

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

1. New feature: -Cxx shows for AMD / Intel 64 bit CPUs the microarchitecture
level (v1,v2,v3,v4). v1 is baseline. GCC supports this I believe in latest
versions, and some distros use it to determine CPU support levels for compile
time optimizations. This was introduced in 2020 via a collaboration between AMD,
Intel, SUSE, and Redhat. Now you know. This is a simple test based on which CPU
flags/features are present.

These levels can be used for Go language optimization (GOAMD64), GCC
optimization switches (GCC -O2 for example), and probably more.

2. Expanded YMTC (Yangtze Memory) RAM vendor ids and detections.

3. Added [unverified] window managers CDE and NsCDE. No data, only using ps aux
method.

4a. Added slax ID to distro id, added slax to system base support. Currently
only work on slackware based 15.0, not debian based 11.4.

4b. Added SteamOS debian/arch for system  base.

4c. Added os-release VERSION_CODENAME to enhance distro ID data (eg steamos)

5. Added to -ra/-Ia package tools installed report, this goes along with change
2, which changes apt to dpkg, the low level tool. Now with -a, shows the package
manager tools installed, like slackpkg, apt, apt-get, dnf, yum, zypper, etc.

rpm installed as secondary pm requires some further tests. Currently known pm
that have tools (and rpm tests if detected):
All these are known to support rpm secondary pm:
* dpkg - Debian, Ubuntu, and apt-rpm based distros like PCLinuxOS, Alt Linux
* pacman - Arch based distros
* pkgtool - Slackware based distros
* tce - TinyCore Linux

6. A few more pci product IDs for GPU matches. Slow going.

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

1. Changed --pkg to --rpm, the original intention was that this could apply to
more than RPM package manager, but that's the only one that it's used for. This
leads to unclear output for other distributions where the user might have rpm
installed alongside their standard package manager.

2. Changed package pm: 'apt' to 'dpkg', to go along with type rpm (suse,redhat)
and pkgtool (slackware). Note that dpkg is the actual package manager of Debian,
inxi had this wrong, apt interacts with dpkg.

3. Changed -h -a section, to follow after -x, -xx, -xxx, like on man page.

4. For rpm notes, after running some tests to determine whether to use rpm or
not, will show the rpm note: see --rpm in pm: rpm note:... This allows for
more granular errors which will be more useful to users.

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

1. Docs were wrong for -ra/-Ia packages, from original when it package report
was only an -a option, but it got moved to -rx, -rxx for basic features, and -a
for advanced features.

2. Updated for --pkg/--rpm and --force rpm/pkg

3. See change 3, I think people tend to miss the sequence of -x, -xx, -xxx, -a
because -a came before -x, -xx, -xxx in -h menu, but on man page, -a correctly
comes after the -xxx options. Better to be consistent.

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

1. Switched force{pkg} to force{package} internally, and added converts to
change --force pkg/rpm to switch on $force{package}.

2. Refactored package PackageData to be more granular.
This commit is contained in:
Harald Hope 2022-08-22 17:55:45 -07:00
parent a17d1b958a
commit 915c7efa34
3 changed files with 565 additions and 235 deletions

547
inxi

File diff suppressed because it is too large Load diff

66
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\-07\-27" "inxi" "inxi manual"
.TH INXI 1 "2022\-08\-06" "inxi" "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
@ -25,7 +25,7 @@ inxi \- Command line system information script for console and IRC
\fBinxi\fR [\fB\-AbBCdDEfFGhiIjJlLmMnNopPrRsSuUVwyYzZ\fR]
\fBinxi\fR [\fB\-c NUMBER\fR]
\fBinxi\fR [\fB\-c -NUMBER\fR]
[\fB\-\-sensors\-exclude SENSORS\fR] [\fB\-\-sensors\-use SENSORS\fR]
[\fB\-t\fR [\fBc\fR|\fBm\fR|\fBcm\fR|\fBmc\fR][\fBNUMBER\fR]]
[\fB\-v NUMBER\fR] [\fB\-W LOCATION\fR]
@ -1402,6 +1402,12 @@ 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.
@ -1538,9 +1544,9 @@ same. Example:
\- Adds system default runlevel/target, if detected. Supports Systemd / Upstart
/SysVinit type defaults.
\- Shows \fBPackages:\fR counts by discovered package manager types. In cases
where only 1 type had results, does not show total after \fBPackages:\fR. Does
not show installed package managers wtih 0 packages. See \fB\-a\fR for full
\- Shows \fBPackages:\fR counts by discovered package manager types (\fBpm:\fR).
In cases where only 1 pm had results, does not show total after \fBPackages:\fR.
Does not show installed package managers with 0 packages. See \fB\-a\fR for full
output. Moves to \fBRepos\fR if \fB\-rxx\fR.
\- Adds parent program (or pty/tty) that started shell, if not IRC client.
@ -1594,7 +1600,7 @@ ROM size if using \fBdmidecode\fR.
.TP
.B \-xx \-r\fR
\- Adds Packages info. See \fB\-Ixx\fR
\- Adds to \fBPackages:\fR info. See \fB\-Ixx\fR
.TP
.B \-xx \-R\fR
@ -2011,7 +2017,7 @@ issues, shows extra data that can help diagnose/debug. Adds \fBcode:\fR item if
found and not the same as \fBarch:\fR.
.nf
\fBinxi \-GIaz
\fBinxi \-Gaz
Graphics:
Device\-1: NVIDIA NV34 [GeForce FX 5200] driver: nouveau v: kernel
non\-free: 173.14.xx status: legacy (EOL) last: kernel: 3.12 xorg: 1.15
@ -2026,7 +2032,7 @@ Graphics:
With \fB\-y1\fR:
.nf
\fBinxi \-Ga \-y1
\fBinxi \-Gaz \-y1
Graphics:
Device\-1: NVIDIA NV34 [GeForce FX 5200]
driver: nouveau
@ -2106,18 +2112,18 @@ Graphics:
.fi
.TP
.B \-a \-I\fR
\- Adds Packages, totals, per package manager totals, and number of lib packages
detected per package manager. Also adds detected package managers with 0
packages listed. Moves to \fBRepos\fR if \fB\-ra\fR.
\- Adds to Packages number of lib packages detected per package manager. Also
adds detected package managers with 0 packages listed. Adds package manager
tools (supported: rpm, dpkg, pkgtool) Moves to \fBRepos\fR if \fB\-ra\fR.
.nf
\fBinxi \-aI
Info:
....
Init: systemd v: 245 target: graphical.target (5) default: graphical.target
Compilers: gcc: 9.3.0 alt: 5/6/7/8/9 Packages: apt: 3681 lib: 2096 rpm: 0
Shell: ksh v: A_2020.0.0 default: Bash v: 5.0.16 running\-in: kate
inxi: 3.1.04\fR
Compilers: gcc: 9.3.0 alt: 5/6/7/8/9 Packages: pm: apt pkgs: 3681 libs: 2096
tools: apt, apt\-get,aptitude pm: rpm pkgs: 0 Shell: ksh v: A_2020.0.0
default: Bash v: 5.0.16 running\-in: kate inxi: 3.1.04\fR
.fi
\- Adds service control tool, tested for in the following order: \fBsystemctl
@ -2187,7 +2193,7 @@ not the raw size.
.TP
.B \-a \-r\fR
\- Adds Packages. See \fB\-Ia\fR
\- Adds to \fBPackages:\fR report. See \fB\-Ia\fR
.TP
.B \-a \-R\fR
@ -2288,7 +2294,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|pkg|usb-sys|wayland|vmstat|wmctrl]\fR
.B \-\-force [colors|dmidecode|hddtemp|lsusb|rpm|usb-sys|wayland|vmstat|wmctrl]\fR
Various force options to allow users to override defaults. Values can be given
as a comma separated list:
@ -2305,16 +2311,24 @@ redirected output.
\- \fBlsusb\fR \- Forces the USB data generator to use \fBlsusb\fR as data
source (default). Overrides \fBUSB_SYS\fR in user configuration file(s).
\- \fBpkg\fR \- Force override of disabled package counts. Known package
managers with non\-resolvable issues:
\- \fBrpm\fR, \fBpkg\fR \- Force override of disabled RPM package counts on
primarily RPM run systems due to unacceptably slow execution times for this
command:
rpm: Due to up to 30 seconds delays executing
.nf
\fBrpm \-qa \-\-nodigest \-\-nosignature\fR
.fi
on older hardware (and over 1 second on new hardware with some rpm versions)
package counts are disabled by default because of the unacceptable slowdowns to
execute a simple package list command.
Even on newer RPM systems, in virtual machines, running rpm package list query
takes more than 0.15 seconds (compared to 0.01 to 0.05 for dpkg, pacman, pkgtool
etc) for just this single feature, which is north of 10% of total execution time
for \fBinxi \-bar\fR. On bare metal this can hit 1 second or more in our tests.
Older systems have taken up to 30 seconds to run this command!
For systems that support running rpm along with the primary package installer
(dpkg/apt, pacman, and pkgtool/slackpkg), there are not going to be many rpms,
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
source instead of \fBlsusb\fR (Linux only).
@ -2392,16 +2406,16 @@ emails in such cases, so if you want to disable regular user use of sudo (which
requires configuration to setup anyway for these options) just use this option,
or \fBNO_SUDO\fR configuration item.
.TP
.B \-\-pkg\fR
Shortcut. See \fB\-\-force pkg\fR.
.TP
.B \-\-pm\-type [package manager name]\fR
For distro package maintainers only, and only for non apt, rpm, or pacman
based systems. To be used to test replacement package lists for recommends
for that package manager.
.TP
.B \-\-rpm\fR, \fB\-\-pkg\fR
Shortcut. See \fB\-\-force rpm\fR.
.TP
.B \-\-sensors\-default\fR
Overrides configuration values \fBSENSORS_USE\fR or \fBSENSORS_EXCLUDE\fR

View file

@ -1,3 +1,182 @@
================================================================================
Version: 3.3.21
Patch: 00
Date: 2022-08-22
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
A small point release, some nice enhancements, a few bug fixes, and some fixes
to correct or update some issues. Main new features:
* -rx,-rxx,-ra/-Ix,-Ixx,-Ia: enhanced Packages: report
* -Cxx: microarchitecture level. This is a relatively new convention, used to
set various compile flags.
--------------------------------------------------------------------------------
KNOWN ISSUES:
1. Can't safely look for pm tool KDE Discover because apt calls it
plasma-discover, but other packaging systems call it discover, which is already
a non-related program (hardware data). Since it's not really core to any package
manager, it's not really a necessary thing to report anyway, though
gnome-software is added because that appears to be more like syntaptic than
anything else.
There's also a qt variant of the rpm packagekit, packagekit-qt, which is
available in for example Arch, but again, it's too granular, and not really
core.
2. At some point, sensors should add /sys hwmon sensor data, then switch to
using lm-sensors as a fallback, and remove one recommended tool from newer linux
systems. I don't think that's too hard, just a bunch of little steps to
integrate that into the main logic.
--------------------------------------------------------------------------------
BUGS:
1. For Slackware slackpkg/pkgtool:
a: Failed to show package counts at all because of bad globbing path, forgot /*.
b. Failed to show lib counts for packages due to having wrong counter for path.
2. If no ipmi sensor data was found but the tools are present, could result in
an undefined hash reference error for sensors. The most likely cause for this is
that one of the ipmi commands:
"ipmi-tool sensors" or "ipmi-sensors"
had an error, and since errors are sent to /dev/null, inxi saw null data, then
returned an undefined value instead of the hash reference it was supposed to.
This is the first time I've seen this happen with ipmi, but there have not been
a lot of ipmi samples.
Thanks issue poster #274 for having systems that triggered this scenario.
3. $source for ipmi was set to lm-sensors by accident.
4. For sensors, with > 1 sensor type, like lm-sensors + ipmi, sensor data from
second sensor type was getting written to first sensor type row. See Fixes 9 for
more sensors fixes.
--------------------------------------------------------------------------------
FIXES:
1. Force CPU bits to 64 if LM flag is present, if it reports as i686. This fix
only runs for non RISC CPUs that show as 32 bit, so it won't run very often. If
no LM found, remains 32 bit.
This fix goes along with enhancement 1, which only applies to 64 bit CPUs.
2. In --recommends, JSON::PP module package names were wrong, they were copied
from JSON::Cpanel::XS and hadn't been changed to the right package names. Note
that for most distros, this is in Perl Core Modules, but not all.
3. Samsung ram vendor id was too tight, loosened it up a bit. Missed this one:
K3LK7K70BM
4. With Bug 1, extended possible package manager tool detection for slackware
type systems. Slackware is kind of unique in that it is not actually made out of
a core package manager as a collection of packages, but uses package managers as
a kind of layer on top of that, but none of those tools is required to run the
system.
5. Found another corner case indentation glitch, was adding in level 2 on -I
which is has no second level indentation.
6. Forgot to add $force{'pkg'} to -v8.
7. Small fix, if -Z is used, forgot to force --zl, --zu, --zv to false as well
as -z.
8. Small fix, for saphire rapids, alder lake, added + to year built, since those
are ongoing.
9. Sensors:
a. in one case, with an array of fan speeds, set to '' instead of undef, which
made test fail, and showed empty fan item.
b. added wildcards for possible voltage/power matches, was too restrictive for
ipmi sensors values.
c. added better space regex for ipmi temps [\s_-]?
d. DIMM voltage/temp excluded > 9 numbering, like DIMM 19
--------------------------------------------------------------------------------
ENHANCEMENTS:
1. New feature: -Cxx shows for AMD / Intel 64 bit CPUs the microarchitecture
level (v1,v2,v3,v4). v1 is baseline. GCC supports this I believe in latest
versions, and some distros use it to determine CPU support levels for compile
time optimizations. This was introduced in 2020 via a collaboration between AMD,
Intel, SUSE, and Redhat. Now you know. This is a simple test based on which CPU
flags/features are present.
These levels can be used for Go language optimization (GOAMD64), GCC
optimization switches (GCC -O2 for example), and probably more.
2. Expanded YMTC (Yangtze Memory) RAM vendor ids and detections.
3. Added [unverified] window managers CDE and NsCDE. No data, only using ps aux
method.
4a. Added slax ID to distro id, added slax to system base support. Currently
only work on slackware based 15.0, not debian based 11.4.
4b. Added SteamOS debian/arch for system base.
4c. Added os-release VERSION_CODENAME to enhance distro ID data (eg steamos)
5. Added to -ra/-Ia package tools installed report, this goes along with change
2, which changes apt to dpkg, the low level tool. Now with -a, shows the package
manager tools installed, like slackpkg, apt, apt-get, dnf, yum, zypper, etc.
rpm installed as secondary pm requires some further tests. Currently known pm
that have tools (and rpm tests if detected):
All these are known to support rpm secondary pm:
* dpkg - Debian, Ubuntu, and apt-rpm based distros like PCLinuxOS, Alt Linux
* pacman - Arch based distros
* pkgtool - Slackware based distros
* tce - TinyCore Linux
6. A few more pci product IDs for GPU matches. Slow going.
--------------------------------------------------------------------------------
CHANGES:
1. Changed --pkg to --rpm, the original intention was that this could apply to
more than RPM package manager, but that's the only one that it's used for. This
leads to unclear output for other distributions where the user might have rpm
installed alongside their standard package manager.
2. Changed package pm: 'apt' to 'dpkg', to go along with type rpm (suse,redhat)
and pkgtool (slackware). Note that dpkg is the actual package manager of Debian,
inxi had this wrong, apt interacts with dpkg.
3. Changed -h -a section, to follow after -x, -xx, -xxx, like on man page.
4. For rpm notes, after running some tests to determine whether to use rpm or
not, will show the rpm note: see --rpm in pm: rpm note:... This allows for
more granular errors which will be more useful to users.
--------------------------------------------------------------------------------
DOCUMENTATION:
1. Docs were wrong for -ra/-Ia packages, from original when it package report
was only an -a option, but it got moved to -rx, -rxx for basic features, and -a
for advanced features.
2. Updated for --pkg/--rpm and --force rpm/pkg
3. See change 3, I think people tend to miss the sequence of -x, -xx, -xxx, -a
because -a came before -x, -xx, -xxx in -h menu, but on man page, -a correctly
comes after the -xxx options. Better to be consistent.
--------------------------------------------------------------------------------
CODE:
1. Switched force{pkg} to force{package} internally, and added converts to
change --force pkg/rpm to switch on $force{package}.
2. Refactored package PackageData to be more granular.
--------------------------------------------------------------------------------
-- Harald Hope - Mon, 22 Aug 2022 17:46:23 -0700
================================================================================
Version: 3.3.20
Patch: 00