New version, man page. Big set of changes. Full USB refactor, plus added features.

Bugs:
1. A result of the issue #156 USB refactor, I discovered that the --usb sort order,
which was based on Bus+DeviceID, in fact is wrong, pure and simple. This was exposed
by using a second USB hub on a bus, the Device IDs are not really related in any
clearly logical way to the actual position on the bus. The solution was to fully
refactor the entire USB logic and then use generated alpha sorters based on the full
bus-port[.port] ID. Device ID is now printed last in the ID string, like so: 1-4:1.
Note that Device IDs start at 1 for each bus, regardless of how many hubs you have
attached to that port.
2. Certain situations triggered a bug in Optical devices, I'd forgotten to change
$_ to $key in two places. Since that part didn't normally get triggered, I'd never
noticed that bug before. Thanks TinyCore for exposing that glitch!

Fixes:
1. On legacy systems, fluxbox --version does not work, -v does. Corrected.
2. for --usb, network devices should now show the correct 'type: Network'.
For some weird reason, the people who made the usb types didn't seem to consider
many key devices, scanners, wifi/ethernet adapters, and those are almost always
"Vendor defined class".
3. A really big fix, for instances where system is using only Busybox, like
TinyCore, or booting into any system running busybox for whatever reason, now
avoids the various errors when using busybox ps, which only for example outputs
3, not 11, default columns for ps aux, and which does not support ps -j, which
is used in the start/shell client information. This gets rid of a huge spray
of errors, and actually allows for pretty complete output from systems that only
have busybox tools installed. This should cover everything from TinyCore to MIPS
to ARM systems that run minimalist Linux. Note that this fix goes along with the
/sys based USB parser, since such systems may have USB, but are unlikely to have
lsusb installed, but do have /sys USB data.
4. In some cases, strings /sbin/init would trigger a false version result, fixed
that logic so now it rarely will do that.

Enhancements:
1. Added Mosksha desktop, that's a Bodhi fork of Enlightenment E17; added qtile
window manager (no version info).
2. Added Bodhi detection; Salix + base slackware; kde neon system base;
3. Added support for slaptget repos, basic, it may not be perfecct.
4. More disk vendors, and matches for existing vendors.
5. Full rewrite of USB data, in --usb, -A, and -N, along with core usb data engines.
This makes lsusb optional, though recommended (because it has a better vendor/
product ID to string internal database) than /sys data. This was in response
to a second set of issues in #156 by gm10, USB drivers.
Depending on the system, using only /sys data, while slightly less informative,
is between 20 and 2000 milliseconds faster, so if you want speed, either use the
new --usb-sys option, or the configuration file USB_SYS=[true|false] option.
 1. switched to cleaner more efficient data structures
 2. added ports count to hub report, linux and bsd.
 3. added [--usb|-A|-N] -xxx serial for Device items, if present.
 4. added --usb -xx drivers, per interface, can be 1 or more drivers.
 5. fully refactored -A and -N usb device logic, far cleaner and simple now,
 much easier to work with, no more hacks to find things and match them.
 6. USB type: now comes from /sys, and is in general going to be more accurate
 than the lsusb -v based method, which was always an ugly and incomplete hack.
 As with drivers, it also now lists all the interface types found per device, not
 just the first one as with the previous method. Note that HID means the more
 verbose: Human Interface Device, but I shortened it. Now that the type: data is
 created by inxi reading the class/subclass/protocal IDs, and then figuring out
 what to do itself, I can have quite a bit more flexibility in terms of how type
 is generated.
 7. added --usb -xxx interfaces: [count] for devices, which lists the device
 interface count. This can be useful to determine if say, a usb/keyboard adapter
 is a 2 interface device. Note that Audio devices generally have many interfaces,
 since they do more than 1 thing (audio output, microphone input, etc.).
 8. Support for user configuration file item: USB_SYS=[true|false]. This is useful
 if you want to see only the /sys version of the data, or if you want the significant
 speed boost not using lsusb offers, particularly on older systems with a complex
 USB setup, many buses, many devices, etc.
 New option --usb-tool overrides USB_SYS value, and forces lsusb use.
 9. New options: --usb-sys - forces all usb items to use /sys data, and skip lsusb.
 Note that you still have to use the feature options, like --usb, -A, or -N. This
 can lead to a significant improvement in execution time for inxi.
 10. Rather than the previous bus:device ID string, to go along with the internal
 sorting strings used, inxi now shows the real Bus / port /port ids, like:
 1-3.2.1:3 - Bus-Port[.port]:device id.
6. Added support for Xvesa display server. Thanks for exposing that one, TinyCore!
7. Added tce package manager to repos. That's the tinycore package manager.

Changes:
1. big one, after 10 plus years, the venerable 'Card-x:' for -A,-N, and -G has been
replaced by the more neutral 'Device-x:'.  This was a suggestion by gm10 from Mint
in issue #156
This makes sense because for a long time, most of these devices are not cards, they
are SOC, motherboard builtin, USB devices, etc, so the one thing they all are are
some form of a device, and the one thing that they are all not is a Card. Along with
the recent change from HDD: to Local Storage in Disks: this brings inxi terminology
out of the ancient times and into the present. Thanks for the nudge gm10.

Removed:
See inxi-perl/docs/inxi-fragments.txt for removed blocks.
1. Entire parser for lsusb -v, now it all runs either usbdevs or lsusb, and if Linux
and not lsusb, it will use /sys exclusively, otherwise it uses /sys data to complete
the lsusb vendor/product strings.
2. Two functions that were used by -A and -N to match usb devices and get their /sys data,
that became redundant since it all now goes through the /sys parser already, so those
features can get the data pre-parsed from the @usb arrays.

Output Examples:

Sort by DeviceID failures in 3.0.20 using Device ID:

inxi --usb
USB:
  Hub: 1:1 usb: 2.0 type: Full speed (or root) hub
  Device-1: Wacom Graphire 2 4x5 bus ID: 1:2 type: Mouse
  Device-2: Tangtop HID Keyboard bus ID: 1:3 type: Keyboard
  Device-3: Verbatim bus ID: 1:11 type: Mass Storage
  Device-4: Apple Ethernet Adapter [A1277] bus ID: 1:13
  type: Vendor Specific Class
  Hub: 1:85 usb: 1.1 type: Atmel 4-Port Hub
  Device-5: C-Media Audio Adapter (Planet UP-100 Genius G-Talk) bus ID: 1:86
  type: Audio
  Device-6: Canon CanoScan LiDE 110 bus ID: 1:112
  type: Vendor Specific Protocol
  Device-7: ALi M5621 High-Speed IDE Controller bus ID: 1:113
  type: Mass Storage
  Hub: 2:1 usb: 3.1 type: Full speed (or root) hub
  Hub: 3:1 usb: 2.0 type: Full speed (or root) hub
  Hub: 4:1 usb: 3.1 type: Full speed (or root) hub
  Hub: 5:1 usb: 2.0 type: Full speed (or root) hub
  Hub: 6:1 usb: 3.0 type: Full speed (or root) hub

Corrected: sort by BusID in 3.0.21:

inxi --usb
USB:
  Hub: 1-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 14
  Hub: 1-3:85 usb: 1.1 type: Atmel 4-Port Hub ports: 4
  Device-1: C-Media Audio Adapter (Planet UP-100 Genius G-Talk)
  type: Audio,HID bus ID: 1-3.2:86
  Device-2: ALi M5621 High-Speed IDE Controller type: Mass Storage
  bus ID: 1-3.4:113
  Device-3: Wacom Graphire 2 4x5 type: Mouse bus ID: 1-4:2
  Device-4: Verbatim type: Mass Storage bus ID: 1-7:11
  Device-5: Tangtop HID Keyboard type: Keyboard,Mouse bus ID: 1-10:3
  Device-6: Canon CanoScan LiDE 110 type: <vendor specific> bus ID: 1-13:112
  Device-7: Apple Ethernet Adapter [A1277] type: Network bus ID: 1-14:13
  Hub: 2-0:1 usb: 3.1 type: Full speed (or root) Hub ports: 8
  Hub: 3-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 2
  Hub: 4-0:1 usb: 3.1 type: Full speed (or root) Hub ports: 2
  Hub: 5-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 4
  Hub: 6-0:1 usb: 3.0 type: Full speed (or root) Hub ports: 4
This commit is contained in:
Harald Hope 2018-08-17 15:58:44 -07:00
parent aab72b75c9
commit c69f9d701b
3 changed files with 809 additions and 500 deletions

1113
inxi

File diff suppressed because it is too large Load diff

41
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2018\-07\-30" inxi "inxi manual" .TH INXI 1 "2018\-08\-17" 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
.SH SYNOPSIS .SH SYNOPSIS
@ -30,7 +30,7 @@ using the \fB\-c\fR color options listed in the STANDARD OPTIONS section below.
.SH PRIVACY AND SECURITY .SH PRIVACY AND SECURITY
In order to maintain basic privacy and security, inxi used on IRC automatically In order to maintain basic privacy and security, inxi used on IRC automatically
filters out your network card MAC address, WAN and LAN IP, your \fB/home\fR filters out your network device MAC address, WAN and LAN IP, your \fB/home\fR
username directory in partitions, and a few other items. username directory in partitions, and a few other items.
Because inxi is often used on forums for support, you can also trigger this Because inxi is often used on forums for support, you can also trigger this
@ -361,7 +361,18 @@ same line.
.TP .TP
.B \-\-usb\fR .B \-\-usb\fR
Show USB data for attached Hubs and Devices. Show USB data for attached Hubs and Devices. Hubs also show number of ports.
Be aware that a port is not always external, some may be internal, and either
used or unused (for example, a motherboard USB header connector that is not used).
BusID is generally in this format: BusID-port[.port][.port]:DeviceID
Device ID is a number created by the kernel, and has no necessary ordering
or sequence connection, but can be used to match this output to lsusb
values, which generally shows BusID / DeviceID (except for tree view, which
shows ports).
Examples: \fRBus ID: 4-3.2.1:2\fR or \fRHub: 4-0:1\fR
.TP .TP
.B \-u\fR,\fB \-\-uuid\fR .B \-u\fR,\fB \-\-uuid\fR
@ -702,6 +713,8 @@ if \fBps\fR tests fail to find data.
.TP .TP
.B \-xx \-\-usb\fR .B \-xx \-\-usb\fR
\- Adds vendor:chip id. \- Adds vendor:chip id.
\- Adds driver(s).
.TP .TP
.B \-xx \-w\fR,\fB \-W\fR .B \-xx \-w\fR,\fB \-W\fR
\- Adds wind chill, heat index, and dew point if any of these are available. \- Adds wind chill, heat index, and dew point if any of these are available.
@ -709,6 +722,8 @@ if \fBps\fR tests fail to find data.
.B \-xxx \-A\fR .B \-xxx \-A\fR
\- Adds (if available and/or relevant) \fBvendor:\fR item, which shows \- Adds (if available and/or relevant) \fBvendor:\fR item, which shows
specific vendor [product] information. specific vendor [product] information.
\- Adds, if present, serial number.
.TP .TP
.B \-xxx \-B\fR .B \-xxx \-B\fR
\- Adds battery chemistry (e.g. \fBLi\-ion\fR), cycles (NOTE: there appears to \- Adds battery chemistry (e.g. \fBLi\-ion\fR), cycles (NOTE: there appears to
@ -757,6 +772,9 @@ data available.
\- Adds device serial number. \- Adds device serial number.
.TP .TP
.B \-xxx \-N\fR
\- Adds, if present, serial number.
.TP
.B \-xxx \-R\fR .B \-xxx \-R\fR
\- md\-raid: Adds system mdraid support types (kernel support, read ahead, RAID events) \- md\-raid: Adds system mdraid support types (kernel support, read ahead, RAID events)
@ -773,7 +791,11 @@ lxpanel, xfce4\-panel, lxqt\-panel, and others.
\- Adds (if present), window manager (\fBwm\fR) version number. \- Adds (if present), window manager (\fBwm\fR) version number.
\- Adds (if present), display manager (\fBdm\fR) version number. \- Adds (if present), display manager (\fBdm\fR) version number.
.TP
.B \-xxx \-\-usb\fR
\- Adds, if present, serial number for non hub devices.
\- Adds \fBinterfaces:\fR for non hub devices.
.TP .TP
.B \-xxx \-w\fR,\fB \-W\fR .B \-xxx \-w\fR,\fB \-W\fR
\- Adds location (city state country), altitude, weather observation time. \- Adds location (city state country), altitude, weather observation time.
@ -782,7 +804,6 @@ lxpanel, xfce4\-panel, lxqt\-panel, and others.
These options are triggered with \fB\-\-admin\fR. Admin options are advanced output options, These options are triggered with \fB\-\-admin\fR. Admin options are advanced output options,
and are more technical, and mostly of interest to system administrators or other machine admins. and are more technical, and mostly of interest to system administrators or other machine admins.
The \fB\-\-admin\fR option only has to be used once, and will trigger the following features. The \fB\-\-admin\fR option only has to be used once, and will trigger the following features.
.TP .TP
.B \-\-admin \-C\fR .B \-\-admin \-C\fR
\- Adds CPU family, model\-id, and stepping (replaces \fBrev\fR of \fB\-Cx\fR). \- Adds CPU family, model\-id, and stepping (replaces \fBrev\fR of \fB\-Cx\fR).
@ -911,6 +932,16 @@ Overrides default internal value and user configuration value:
\fBCPU_SLEEP=0.25\fR \fBCPU_SLEEP=0.25\fR
.TP
.B \-\-usb\-sys\fR
Forces the USB data generator to use \fB/sys\fR as data source
instead of \fBlsusb\fR.
.TP
.B \-\-usb\-tool\fR
Forces the USB data generator to use \fBlsusb\fR as data source. Overrides
\fBUSB_SYS\fR in user configuration file(s).
.TP .TP
.B \-\-wm\fR .B \-\-wm\fR
Force \fBSystem\fR item \fBwm\fR to use \fBwmctrl\fR as data source, Force \fBSystem\fR item \fBwm\fR to use \fBwmctrl\fR as data source,
@ -1075,6 +1106,8 @@ above configuration page on smxi.org for full info.
\fBSEP2_CONSOLE\fR Replaces default key / value separator of '\fB:\fR'. \fBSEP2_CONSOLE\fR Replaces default key / value separator of '\fB:\fR'.
\fBUSB_SYS\fR Forces all USB data to use \fB/sys\fR instead of \fBlsusb\fR.
\fBWEATHER_UNIT\fR Values: [\fBc\fR|\fBf\fR|\fBcf\fR|\fBfc\fR]. Same as \fB\-\-weather\-unit\fR. \fBWEATHER_UNIT\fR Values: [\fBc\fR|\fBf\fR|\fBcf\fR|\fBfc\fR]. Same as \fB\-\-weather\-unit\fR.
.TP .TP

View file

@ -1,3 +1,156 @@
=====================================================================================
Version: 3.0.21
Patch Version: 00
Script Date: 2018-08-17
-----------------------------------
Changes:
-----------------------------------
Bugs:
1. A result of the issue #156 USB refactor, I discovered that the --usb sort order,
which was based on Bus+DeviceID, in fact is wrong, pure and simple. This was exposed
by using a second USB hub on a bus, the Device IDs are not really related in any
clearly logical way to the actual position on the bus. The solution was to fully
refactor the entire USB logic and then use generated alpha sorters based on the full
bus-port[.port] ID. Device ID is now printed last in the ID string, like so: 1-4:1.
Note that Device IDs start at 1 for each bus, regardless of how many hubs you have
attached to that port.
2. Certain situations triggered a bug in Optical devices, I'd forgotten to change
$_ to $key in two places. Since that part didn't normally get triggered, I'd never
noticed that bug before. Thanks TinyCore for exposing that glitch!
Fixes:
1. On legacy systems, fluxbox --version does not work, -v does. Corrected.
2. for --usb, network devices should now show the correct 'type: Network'.
For some weird reason, the people who made the usb types didn't seem to consider
many key devices, scanners, wifi/ethernet adapters, and those are almost always
"Vendor defined class".
3. A really big fix, for instances where system is using only Busybox, like
TinyCore, or booting into any system running busybox for whatever reason, now
avoids the various errors when using busybox ps, which only for example outputs
3, not 11, default columns for ps aux, and which does not support ps -j, which
is used in the start/shell client information. This gets rid of a huge spray
of errors, and actually allows for pretty complete output from systems that only
have busybox tools installed. This should cover everything from TinyCore to MIPS
to ARM systems that run minimalist Linux. Note that this fix goes along with the
/sys based USB parser, since such systems may have USB, but are unlikely to have
lsusb installed, but do have /sys USB data.
4. In some cases, strings /sbin/init would trigger a false version result, fixed
that logic so now it rarely will do that.
Enhancements:
1. Added Mosksha desktop, that's a Bodhi fork of Enlightenment E17; added qtile
window manager (no version info).
2. Added Bodhi detection; Salix + base slackware; kde neon system base;
3. Added support for slaptget repos, basic, it may not be perfecct.
4. More disk vendors, and matches for existing vendors.
5. Full rewrite of USB data, in --usb, -A, and -N, along with core usb data engines.
This makes lsusb optional, though recommended (because it has a better vendor/
product ID to string internal database) than /sys data. This was in response
to a second set of issues in #156 by gm10, USB drivers.
Depending on the system, using only /sys data, while slightly less informative,
is between 20 and 2000 milliseconds faster, so if you want speed, either use the
new --usb-sys option, or the configuration file USB_SYS=[true|false] option.
1. switched to cleaner more efficient data structures
2. added ports count to hub report, linux and bsd.
3. added [--usb|-A|-N] -xxx serial for Device items, if present.
4. added --usb -xx drivers, per interface, can be 1 or more drivers.
5. fully refactored -A and -N usb device logic, far cleaner and simple now,
much easier to work with, no more hacks to find things and match them.
6. USB type: now comes from /sys, and is in general going to be more accurate
than the lsusb -v based method, which was always an ugly and incomplete hack.
As with drivers, it also now lists all the interface types found per device, not
just the first one as with the previous method. Note that HID means the more
verbose: Human Interface Device, but I shortened it. Now that the type: data is
created by inxi reading the class/subclass/protocal IDs, and then figuring out
what to do itself, I can have quite a bit more flexibility in terms of how type
is generated.
7. added --usb -xxx interfaces: [count] for devices, which lists the device
interface count. This can be useful to determine if say, a usb/keyboard adapter
is a 2 interface device. Note that Audio devices generally have many interfaces,
since they do more than 1 thing (audio output, microphone input, etc.).
8. Support for user configuration file item: USB_SYS=[true|false]. This is useful
if you want to see only the /sys version of the data, or if you want the significant
speed boost not using lsusb offers, particularly on older systems with a complex
USB setup, many buses, many devices, etc.
New option --usb-tool overrides USB_SYS value, and forces lsusb use.
9. New options: --usb-sys - forces all usb items to use /sys data, and skip lsusb.
Note that you still have to use the feature options, like --usb, -A, or -N. This
can lead to a significant improvement in execution time for inxi.
10. Rather than the previous bus:device ID string, to go along with the internal
sorting strings used, inxi now shows the real Bus / port /port ids, like:
1-3.2.1:3 - Bus-Port[.port]:device id.
6. Added support for Xvesa display server. Thanks for exposing that one, TinyCore!
7. Added tce package manager to repos. That's the tinycore package manager.
Changes:
1. big one, after 10 plus years, the venerable 'Card-x:' for -A,-N, and -G has been
replaced by the more neutral 'Device-x:'. This was a suggestion by gm10 from Mint
in issue #156
This makes sense because for a long time, most of these devices are not cards, they
are SOC, motherboard builtin, USB devices, etc, so the one thing they all are are
some form of a device, and the one thing that they are all not is a Card. Along with
the recent change from HDD: to Local Storage in Disks: this brings inxi terminology
out of the ancient times and into the present. Thanks for the nudge gm10.
Removed:
See inxi-perl/docs/inxi-fragments.txt for removed blocks.
1. Entire parser for lsusb -v, now it all runs either usbdevs or lsusb, and if Linux
and not lsusb, it will use /sys exclusively, otherwise it uses /sys data to complete
the lsusb vendor/product strings.
2. Two functions that were used by -A and -N to match usb devices and get their /sys data,
that became redundant since it all now goes through the /sys parser already, so those
features can get the data pre-parsed from the @usb arrays.
Output Examples:
Sort by DeviceID failures in 3.0.20 using Device ID:
inxi --usb
USB:
Hub: 1:1 usb: 2.0 type: Full speed (or root) hub
Device-1: Wacom Graphire 2 4x5 bus ID: 1:2 type: Mouse
Device-2: Tangtop HID Keyboard bus ID: 1:3 type: Keyboard
Device-3: Verbatim bus ID: 1:11 type: Mass Storage
Device-4: Apple Ethernet Adapter [A1277] bus ID: 1:13
type: Vendor Specific Class
Hub: 1:85 usb: 1.1 type: Atmel 4-Port Hub
Device-5: C-Media Audio Adapter (Planet UP-100 Genius G-Talk) bus ID: 1:86
type: Audio
Device-6: Canon CanoScan LiDE 110 bus ID: 1:112
type: Vendor Specific Protocol
Device-7: ALi M5621 High-Speed IDE Controller bus ID: 1:113
type: Mass Storage
Hub: 2:1 usb: 3.1 type: Full speed (or root) hub
Hub: 3:1 usb: 2.0 type: Full speed (or root) hub
Hub: 4:1 usb: 3.1 type: Full speed (or root) hub
Hub: 5:1 usb: 2.0 type: Full speed (or root) hub
Hub: 6:1 usb: 3.0 type: Full speed (or root) hub
Corrected: sort by BusID in 3.0.21:
inxi --usb
USB:
Hub: 1-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 14
Hub: 1-3:85 usb: 1.1 type: Atmel 4-Port Hub ports: 4
Device-1: C-Media Audio Adapter (Planet UP-100 Genius G-Talk)
type: Audio,HID bus ID: 1-3.2:86
Device-2: ALi M5621 High-Speed IDE Controller type: Mass Storage
bus ID: 1-3.4:113
Device-3: Wacom Graphire 2 4x5 type: Mouse bus ID: 1-4:2
Device-4: Verbatim type: Mass Storage bus ID: 1-7:11
Device-5: Tangtop HID Keyboard type: Keyboard,Mouse bus ID: 1-10:3
Device-6: Canon CanoScan LiDE 110 type: <vendor specific> bus ID: 1-13:112
Device-7: Apple Ethernet Adapter [A1277] type: Network bus ID: 1-14:13
Hub: 2-0:1 usb: 3.1 type: Full speed (or root) Hub ports: 8
Hub: 3-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 2
Hub: 4-0:1 usb: 3.1 type: Full speed (or root) Hub ports: 2
Hub: 5-0:1 usb: 2.0 type: Full speed (or root) Hub ports: 4
Hub: 6-0:1 usb: 3.0 type: Full speed (or root) Hub ports: 4
-----------------------------------
-- Harald Hope - Fri, 17 Aug 2018 14:07:01 -0700
===================================================================================== =====================================================================================
Version: 3.0.20 Version: 3.0.20
Patch Version: 00 Patch Version: 00