New version! Fixes!! Bug fixes! More bug fixes!! Cleanups!

Most of these were exposed by issue #251 filed by LukasNickel, then further
revealed via his debugger data set, which showed two more bugs. Well, bugs,
changed syntaxes, same difference to end users.

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

1. Work is ongoing to add btrfs support to -R (similar to softraid or zfs),
basic stubs and debuggers added, but reporting tools are not as robust (and
often require sudo/root for reasons that escape me) as I would have hoped, so
it's slow. One of these days... Normally would not release with working stubs,
but there were enough real issues/bugs to warrant just getting 3.3.06 out the
door, then going on with the btrfs feature for -R. But so far I view the
reporting tools as inadequate, unfortunately.

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

1. As initially discovered in issue #251 there are alternate syntaxes which had
never been seen before for remote mounts, fuse mounts, etc. In this case, it was
fuse.sshfs that was not removed from the Disk total:... used: leading to silly
1000+% used percentage. Note that while technically inxi could try to be clever
about reporting impossible percentages, so far those have led to bugs getting
reported, then fixed, so I think it worth leaving it as is.

2. When --swap/-j is used with no other arguments, failed to show uuid or label.
Discovered this while testing fix 2.

3. Bug which is not a bug but will appear as such to users, nvme temps were
failing in -Dx due to a change in how those values are located in /sys. See fix
3.

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

1. Going along with Bug 1, and considering that only in 3.3.05 was the nfs4
remote fs failure to identify/exclude, the entire section involving remote/ fuse
etc file systems was refactored, and extended to add many more previously
non-handled remote and fuse type file systems. Significant extension of known
remote filesystem types, distributed file systems, overlay file systems, all to
try to avoid having more distributed/remote/fuse file system issues. Also added
test to support fuse. or fuseblk. type prefixes for any of these. Hopefully
there will be fewer issues related to distributed and remote and overlay type
file systems in the future.

2. Made all label/uuid triggers global, that is, -ol shows unmounted with
labels, -ju shows swap with uuid, and so on. This may require a bit more tweaks
to get exactly right, but in general, this is a purely cosmetic fix, that is,
try not to show label/uuid for partition/mounts that probably can't have those
values.

3. There was a change in the way nvme /sys temperature paths were handled, an
actually understandable, albeit as always annoying, one, because inxi actually
had to do a sort of convoluted hack to get the nvme block devices temperatore
paths before, now that hack is not required for newer kernels (5.12+), though
for kernels that had the old paths (5,8, 5.9 at least, don't know when paths
changed) left in the old method. Now tests are more granular, and inxi should
find temperatures regardless of which method is used for nvme and sd type
drives.

4. Another somewhat irksome random change, again, understandable since the new
syntax is more consistent in output than the previous one, but still breaks all
existing parsers that use the changed field names. Lsblk did NOT change the -o
input field names, but DID change the output field names, which broke the
internal inxi parser, and led to null lsblk data.

Changes were - or : separators in input values are output as _ always. that is,
MAJ:MIN becomes MAJ_MIN. Also corrected the debugger lsblk to use the same
output fields for -P -o as the actual lsblk parser uses internally so these
failures can be spotted more readily, as it was, it was literally only because
someone submitted the debugger dataset, and was running lsblk 2.37, where I
believe this behavior change happened. Solution was to just use regex patterns
instead, [:_-], in the parser. Big fear now is that they will randomly stop
supporting the -o input field names that contain - or : and change that too
without any real warning or deprecation notice.

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

1. Going with bug and fix 1, added avfs, afs, archivemount, avfs, ceph, gfs,
glusterfs, gmailfs, hdfs, ipfs, kosmos/kfs, lafs, mergerfs, mhddfs, moosefs,
ocfs, openafs, orangefs, overlayfs, pvfs, s3fs, sheepdog, vmfs, and several
others to the exclude list for disk used and show label/uuids for partitions.

2. A smattering of disk vendors added.

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

1. Going with fix 2, -l and -u no longer will trigger -P by default, now if -l
or -u are used without -j, -o, -p, -P, an  error will explain that you must use
one of those together with -l or -u. This was the only way to get the -l and -u
switches to turn off/on label/uuid reports in swap, unmounted, and partitions
consistently. Triggering -P was really a legacy behavior from when the only
options were -p or -P, and --swap and --unmounted did not exist. I found it
increasingly odd that unmounted would show label/uuid always but partitions only
with -l/-u.

2. This was a pet peeve, sometimes field names just bug me (like 'Topology: did
for CPU, now  corrected to Info:), the Drive: rotation: was one such annoyance.
I had recycled that to indicate SSD, which was a feature request, but that was
always a sloppy solution, and made no sense, since SSD isn't a rotation speed.

Now it reports a much more logical:

ID-1:...... type: HDD rpm: 7200
or
ID-1:...... type: SSD
or
ID-1:...... type: N/A

This also corresponds to the intended meaning much better. The HDD type was
always present internally if rotation speed is detected, but was not used. Now
will also show type: N/A if reliable type detection failed, which will also be
more consistent.

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

1. Brought most of inxi.changelog (this file) into a consistent state, re
whitespaces, readability, consistent use of various header / section names.
Ideally while I don't expect anyone to ever sit down and read this changelog, it
will be now much easier to scan to find whatever interests you. This change goes
along with ongoing changes in docs to in general try to be usually 80 columns
wide.

2. inxi-resources.txt, inxi-data.txt are updated with more raid, partition, file
system values and data to go along with bug, fix, enhancement 1.

3. Man and help updated to indicate -u and -l no longer trigger -P by default.

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

1. Ongoing refactors, bringing the codebase to the point that matches current
coding styles. Removed remainder of whitespaces in conditions and for/while
loops, for example:

if ( condition ) {
becomes:
if (condition){
and
if ( ( test set 1 ) && ( test set 2 ) ) {
becomes:
if ((test set 1) && (test set 2)){

and so on. That dropped over 2 KiB of whitespaces. This went along with fixes
that have been ongoing to change to this whitespace use style, but previously it
was only being  done when that situation was hit in a local block, now it's been
completed globally.

This continues the style refactor that has been ongoing for a while now, to
bring inxi into a consistent state, since when it started, it was more pressing
to get the bash/gawk mess translated to Perl than it was to get the Perl itself
to be as good/consistent as possible, so now those issues are being slowly
unravelled, and hopefully will set inxi on course for its next 10 years.

It was starting to get annoying, because some parts of inxi used those spaces,
and all newer ones didn't in general. Now it's one behavior throughout the whole
program file.

2. Refactored the entire fs exclude for disk used data, and integrated those
values into a global tool that is used either to exclude file systems from disk
used totals, or to not show uuid/labels for the excluded
remote/distributed/overlay type file systems, which in general don't have uuid
or labels.
This commit is contained in:
Harald Hope 2021-07-21 20:30:58 -07:00
parent 30e5bdf563
commit f571b45973
3 changed files with 1528 additions and 1195 deletions

2496
inxi

File diff suppressed because it is too large Load diff

46
inxi.1
View file

@ -15,7 +15,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc., .\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.TH INXI 1 "2021\-07\-11" "inxi" "inxi manual" .TH INXI 1 "2021\-07\-21" "inxi" "inxi manual"
.SH NAME .SH NAME
inxi \- Command line system information script for console and IRC inxi \- Command line system information script for console and IRC
@ -337,6 +337,9 @@ this result to increase the \fBMemory:\fR amount and \fBused:\fR amounts.
Shows all active swap types (partition, file, zram). When this option is used, Shows all active swap types (partition, file, zram). When this option is used,
swap partition(s) will not show on the \fB\-P\fR line to avoid redundancy. swap partition(s) will not show on the \fB\-P\fR line to avoid redundancy.
To show partition labels or UUIDs (when available and relevant), use with
\fB\-l\fR or\fB \-u\fR.
.TP .TP
.B \-J\fR,\fB \-\-usb\fR .B \-J\fR,\fB \-\-usb\fR
Show USB data for attached Hubs and Devices. Hubs also show number of ports. Show USB data for attached Hubs and Devices. Hubs also show number of ports.
@ -360,8 +363,10 @@ The \fBrev: 2.0\fR item refers to the USB revision number, like \fB1.0\fR or
.TP .TP
.B \-l\fR,\fB \-\-label\fR .B \-l\fR,\fB \-\-label\fR
Show partition labels. Default: main partitions \fB\-P\fR. For full \fB\-p\fR Show partition labels. Use with \fB\-j\fR, \fB\-o\fR, \fB\-p\fR, and \fB\-P\fR
output, use: \fB\-pl\fR. to show partition labels. Does nothing without one of those options.
Sample: \fB\-ojpl\fR.
.TP .TP
.B \-L\fR, \fB\-\-logical\fR .B \-L\fR, \fB\-\-logical\fR
@ -552,11 +557,17 @@ BSD users: see \fBman doas.conf\fR for setup.
Does not show components (partitions that create the md\-raid array) of Does not show components (partitions that create the md\-raid array) of
md\-raid arrays. md\-raid arrays.
To show partition labels or UUIDs (when available and relevant), use with
\fB\-l\fR or\fB \-u\fR.
.TP .TP
.B \-p\fR,\fB \-\-partitions\-full\fR .B \-p\fR,\fB \-\-partitions\-full\fR
Show full Partition information (\fB\-P\fR plus all other detected mounted Show full Partition information (\fB\-P\fR plus all other detected mounted
partitions). partitions).
To show partition labels or UUIDs (when available and relevant), use with
\fB\-l\fR or\fB \-u\fR.
.TP .TP
.B \-P\fR,\fB \-\-partitions\fR .B \-P\fR,\fB \-\-partitions\fR
Show basic Partition information. Show basic Partition information.
@ -565,6 +576,9 @@ Shows, if detected: \fB/ /boot /boot/efi /home /opt /tmp /usr /usr/home /var
If \fB\-\-swap\fR is not used, shows active swap partitions (never shows file If \fB\-\-swap\fR is not used, shows active swap partitions (never shows file
or zram type swap). Use \fB\-p\fR to see all mounted partitions. or zram type swap). Use \fB\-p\fR to see all mounted partitions.
To show partition labels or UUIDs (when available and relevant), use with
\fB\-l\fR or\fB \-u\fR.
.TP .TP
.B \-\-processes\fR \- See \fB\-t\fR .B \-\-processes\fR \- See \fB\-t\fR
@ -686,8 +700,10 @@ same line.
.TP .TP
.B \-u\fR,\fB \-\-uuid\fR .B \-u\fR,\fB \-\-uuid\fR
Show partition UUIDs. Default: main partitions \fB\-P\fR. For full \fB\-p\fR Show partition UUIDs. Use with \fB\-j\fR, \fB\-o\fR, \fB\-p\fR, and \fB\-P\fR
output, use: \fB\-pu\fR. to show partition labels. Does nothing without one of those options.
Sample: \fB\-opju\fR.
.TP .TP
.B \-U\fR,\fB \-\-update\fR .B \-U\fR,\fB \-\-update\fR
@ -776,7 +792,8 @@ feature.
DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Automated or excessive DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Automated or excessive
use will lead to your being blocked from any further access. This feature is not use will lead to your being blocked from any further access. This feature is not
meant for widget type weather monitoring, or Conky type use. It is meant to get meant for widget type weather monitoring, or Conky type use. It is meant to get
weather when you need to see it, for example, on a remote server. weather when you need to see it, for example, on a remote server. If you did not
type the weather option in manually, it's an automated request.
.TP .TP
.B \-W\fR, \fB\-\-weather\-location <location_string>\fR .B \-W\fR, \fB\-\-weather\-location <location_string>\fR
@ -797,9 +814,11 @@ Use only ASCII letters in city/state/country names.
Examples: \fB\-W 95623,us\fR OR \fB\-W Boston,MA\fR OR Examples: \fB\-W 95623,us\fR OR \fB\-W Boston,MA\fR OR
\fB\-W 45.5234,\-122.6762\fR OR \fB\-W new+york,ny\fR OR \fB\-W bodo,norway\fR. \fB\-W 45.5234,\-122.6762\fR OR \fB\-W new+york,ny\fR OR \fB\-W bodo,norway\fR.
DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Use of automated queries, DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Automated or excessive
will result in your access being blocked. If you try to work around the ban, use will lead to your being blocked from any further access. This feature is not
you will be permanently banned from this service. meant for widget type weather monitoring, or Conky type use. It is meant to get
weather when you need to see it, for example, on a remote server. If you did not
type the weather option in manually, it's an automated request.
.TP .TP
.B \-\-weather\-source\fR, \fB\-\-ws <unit>\fR .B \-\-weather\-source\fR, \fB\-\-ws <unit>\fR
@ -1286,10 +1305,11 @@ Requires doas[BSDs]/sudo/root and \fBdmidecode\fR.
Currently not able to detect all schemes, but handles the most common, e.g. Currently not able to detect all schemes, but handles the most common, e.g.
\fBGPT\fR or \fBMBR\fR. \fBGPT\fR or \fBMBR\fR.
\- Adds disk rotation speed (in some but not all cases), e.g. \- Adds disk type (\fBHDD\fR/\fBSSD\fR), rotation speed (in some but not all
\fBrotation: 7200 rpm\fR or \fBrotation: SSD\fR if positive SSD identification cases), e.g. \fBtype: HDD rpm: 7200\fR, or \fBtype: SSD\fR if positive SSD
was made. If no rotation or positive SSD ID found, nothing shows. Not all disks identification was made. If no HDD, rotation, or positive SSD ID found, shows
report this speed, so even if they are spinnning, no data will show. \fBtype: N/A\fR. Not all HDD spinning disks report their speed, so even if they
are spinnning, no rpm data will show.
.TP .TP
.B \-xxx \-E\fR (\fB\-\-bluetooth\fR) .B \-xxx \-E\fR (\fB\-\-bluetooth\fR)

View file

@ -1,3 +1,183 @@
================================================================================
Version: 3.3.06
Patch: 00
Date: 2021-07-19
--------------------------------------------------------------------------------
UPDATES:
--------------------------------------------------------------------------------
New version! Fixes!! Bug fixes! More bug fixes!! Cleanups!
Most of these were exposed by issue #251 filed by LukasNickel, then further
revealed via his debugger data set, which showed two more bugs. Well, bugs,
changed syntaxes, same difference to end users.
--------------------------------------------------------------------------------
KNOWN ISSUES:
1. Work is ongoing to add btrfs support to -R (similar to softraid or zfs),
basic stubs and debuggers added, but reporting tools are not as robust (and
often require sudo/root for reasons that escape me) as I would have hoped, so
it's slow. One of these days... Normally would not release with working stubs,
but there were enough real issues/bugs to warrant just getting 3.3.06 out the
door, then going on with the btrfs feature for -R. But so far I view the
reporting tools as inadequate, unfortunately.
--------------------------------------------------------------------------------
BUGS:
1. As initially discovered in issue #251 there are alternate syntaxes which had
never been seen before for remote mounts, fuse mounts, etc. In this case, it was
fuse.sshfs that was not removed from the Disk total:... used: leading to silly
1000+% used percentage. Note that while technically inxi could try to be clever
about reporting impossible percentages, so far those have led to bugs getting
reported, then fixed, so I think it worth leaving it as is.
2. When --swap/-j is used with no other arguments, failed to show uuid or label.
Discovered this while testing fix 2.
3. Bug which is not a bug but will appear as such to users, nvme temps were
failing in -Dx due to a change in how those values are located in /sys. See fix
3.
--------------------------------------------------------------------------------
FIXES:
1. Going along with Bug 1, and considering that only in 3.3.05 was the nfs4
remote fs failure to identify/exclude, the entire section involving remote/ fuse
etc file systems was refactored, and extended to add many more previously
non-handled remote and fuse type file systems. Significant extension of known
remote filesystem types, distributed file systems, overlay file systems, all to
try to avoid having more distributed/remote/fuse file system issues. Also added
test to support fuse. or fuseblk. type prefixes for any of these. Hopefully
there will be fewer issues related to distributed and remote and overlay type
file systems in the future.
2. Made all label/uuid triggers global, that is, -ol shows unmounted with
labels, -ju shows swap with uuid, and so on. This may require a bit more tweaks
to get exactly right, but in general, this is a purely cosmetic fix, that is,
try not to show label/uuid for partition/mounts that probably can't have those
values.
3. There was a change in the way nvme /sys temperature paths were handled, an
actually understandable, albeit as always annoying, one, because inxi actually
had to do a sort of convoluted hack to get the nvme block devices temperatore
paths before, now that hack is not required for newer kernels (5.12+), though
for kernels that had the old paths (5,8, 5.9 at least, don't know when paths
changed) left in the old method. Now tests are more granular, and inxi should
find temperatures regardless of which method is used for nvme and sd type
drives.
4. Another somewhat irksome random change, again, understandable since the new
syntax is more consistent in output than the previous one, but still breaks all
existing parsers that use the changed field names. Lsblk did NOT change the -o
input field names, but DID change the output field names, which broke the
internal inxi parser, and led to null lsblk data.
Changes were - or : separators in input values are output as _ always. that is,
MAJ:MIN becomes MAJ_MIN. Also corrected the debugger lsblk to use the same
output fields for -P -o as the actual lsblk parser uses internally so these
failures can be spotted more readily, as it was, it was literally only because
someone submitted the debugger dataset, and was running lsblk 2.37, where I
believe this behavior change happened. Solution was to just use regex patterns
instead, [:_-], in the parser. Big fear now is that they will randomly stop
supporting the -o input field names that contain - or : and change that too
without any real warning or deprecation notice.
--------------------------------------------------------------------------------
ENHANCEMENTS:
1. Going with bug and fix 1, added avfs, afs, archivemount, avfs, ceph, gfs,
glusterfs, gmailfs, hdfs, ipfs, kosmos/kfs, lafs, mergerfs, mhddfs, moosefs,
ocfs, openafs, orangefs, overlayfs, pvfs, s3fs, sheepdog, vmfs, and several
others to the exclude list for disk used and show label/uuids for partitions.
2. A smattering of disk vendors added.
--------------------------------------------------------------------------------
CHANGES:
1. Going with fix 2, -l and -u no longer will trigger -P by default, now if -l
or -u are used without -j, -o, -p, -P, an error will explain that you must use
one of those together with -l or -u. This was the only way to get the -l and -u
switches to turn off/on label/uuid reports in swap, unmounted, and partitions
consistently. Triggering -P was really a legacy behavior from when the only
options were -p or -P, and --swap and --unmounted did not exist. I found it
increasingly odd that unmounted would show label/uuid always but partitions only
with -l/-u.
2. This was a pet peeve, sometimes field names just bug me (like 'Topology: did
for CPU, now corrected to Info:), the Drive: rotation: was one such annoyance.
I had recycled that to indicate SSD, which was a feature request, but that was
always a sloppy solution, and made no sense, since SSD isn't a rotation speed.
Now it reports a much more logical:
ID-1:...... type: HDD rpm: 7200
or
ID-1:...... type: SSD
or
ID-1:...... type: N/A
This also corresponds to the intended meaning much better. The HDD type was
always present internally if rotation speed is detected, but was not used. Now
will also show type: N/A if reliable type detection failed, which will also be
more consistent.
--------------------------------------------------------------------------------
DOCUMENTATION:
1. Brought most of inxi.changelog (this file) into a consistent state, re
whitespaces, readability, consistent use of various header / section names.
Ideally while I don't expect anyone to ever sit down and read this changelog, it
will be now much easier to scan to find whatever interests you. This change goes
along with ongoing changes in docs to in general try to be usually 80 columns
wide.
2. inxi-resources.txt, inxi-data.txt are updated with more raid, partition, file
system values and data to go along with bug, fix, enhancement 1.
3. Man and help updated to indicate -u and -l no longer trigger -P by default.
--------------------------------------------------------------------------------
CODE:
1. Ongoing refactors, bringing the codebase to the point that matches current
coding styles. Removed remainder of whitespaces in conditions and for/while
loops, for example:
if ( condition ) {
becomes:
if (condition){
and
if ( ( test set 1 ) && ( test set 2 ) ) {
becomes:
if ((test set 1) && (test set 2)){
and so on. That dropped over 2 KiB of whitespaces. This went along with fixes
that have been ongoing to change to this whitespace use style, but previously it
was only being done when that situation was hit in a local block, now it's been
completed globally.
This continues the style refactor that has been ongoing for a while now, to
bring inxi into a consistent state, since when it started, it was more pressing
to get the bash/gawk mess translated to Perl than it was to get the Perl itself
to be as good/consistent as possible, so now those issues are being slowly
unravelled, and hopefully will set inxi on course for its next 10 years.
It was starting to get annoying, because some parts of inxi used those spaces,
and all newer ones didn't in general. Now it's one behavior throughout the whole
program file.
2. Refactored the entire fs exclude for disk used data, and integrated those
values into a global tool that is used either to exclude file systems from disk
used totals, or to not show uuid/labels for the excluded
remote/distributed/overlay type file systems, which in general don't have uuid
or labels.
--------------------------------------------------------------------------------
-- Harald Hope - Wed, 21 Jul 2021 18:23:21 -0700
================================================================================ ================================================================================
Version: 3.3.05 Version: 3.3.05
Patch: 00 Patch: 00
@ -11429,5 +11609,6 @@ to derive cpu speed.
Better than nothing I guess, but will be wrong in other cases, particularly with Better than nothing I guess, but will be wrong in other cases, particularly with
dual core arm. dual core arm.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Harald Hope - Mon, 21 Jan 2013 16:24:40 -0800 -- Harald Hope - Mon, 21 Jan 2013 16:24:40 -0800