Huge upgrade!! Bug Fixes!! Refactors!!! BSDs!!! More BSDs!!!

raspberry pi!! New Features!!! Enhanced old features!!! Did I
mention bluetooth?! USB? Audio? No? well, all hugely upgraded!

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

1. Sadly, 3.3.01 went out with a bug, forgot to remove a debugger,
resulted in hardcoded kernel compiler version always showing.

Note that there is a new inxi-perl/docs/inxi-bugs.txt file to
track such bugs, and matched to specific tagged releases so you
know the line number and items to update to fix it.

2. Typo in manjaro system base match resulted in failing to report
system base as expected.

------------------------------------------------------------------------
KNOWN ISSUES BUT CAN'T OR WON'T BE FIXED:

1. OpenBSD made fvwm -version output an error along with the
version, and not in the normal format for standard fvwm, this
is just too complicated to work around for now, though it could
be in theory by creating a dedicated fvwm-oBSD item in
program_values. But that kind of granularity gets too hard to track,
and they are likely to change or fix this in the future anyway.
Best is they just restore default -version output to what it is
elsewhere, not nested in error outputs.

2. Discovered an oddity, don't know how widespread this
is, but Intel SSDs take about 200 milliseconds to get the sys
hwmon based drive temps, when it should take under a
millisecond, this may be a similar cause as those drives having
a noticeable SMART report delay, not sure. This is quite
noticeable since 200 ms is about 15% of the total execution
time on my test system.

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

1. For --recommends, added different rpm SUSE xdpyinfo package name.

2. Distro Data: added double term filter for lsb-release due to sometimes
generating repeated names in distro.

3. Packages: fix for appimage package counts.

4. Desktop: fixed ID for some wm when no xprop installed, fallback to
using @ps_cmd detections, which usually work fine.

5a. When swap used was 0, showed N/A, fixed to correctly show 0 KiB.

5b. If no swap devices found, BSDs were not correctly showing
no swap data found message. Corrected.

6a. Bluetooth: Removed hcidump from debugger, in some cases, that will
just hang endlessly. Also wrapped bluetoothctl and bt-adapter debugger
data collection with @ps_cmd bluetooth running test. Only run if
bluetooth service is running.

6b. Bluetooth: running detections have to be very strict, only
bluetoothd, not bluetooth, the latter can show true when bluetoothd
is not running, and did in my tests.

7. USB: with Code Change 1, found a few places where fallback usb type
detections were creating false matches, which resulted in say,
bluetooth devices showing up as network devices due to the presence
of the word 'wireless' in the device description. These matches are
all updated and revised to be more accurate and less error prone.

8. Battery: an oversight, had forgotten to have percent used of
available capacity, which made Battery data hard to decipher, now
it shows the percent of available total, as well as the condition
percent, so it's easier to understand the data now, and hopefully
more clear.

9a. OpenBSD changed usbdevs output format sometime in the latest
releases, which made the delicate matching patterns fail. Updated
to handle both variants. They also changed pcidump -v formatting
at some point, now inxi will try to handle either. Note that
usbdevs updates also work fine on NetBSD.

9b. FreeBSD also changed their pciconf output in beta 13.0, which
also broke the detections completely, now checks for old and new
formats. Sigh. It should not take this much work to parse tools
whose output should be consistent and reliable. Luckily I ran
the beta prior to this release, or all pci device detections
would simply have failed, without fallback.

9c. Dragonfly BSD also changed an output format, in vmstat, that
made the RAM used report fail. Since it's clearly not predictable
which BSD will change support for which vmstat options, now just
running vmstat without options, and then using processing logic
to determine what to do with the results.

10. It turns out NetBSD is using /proc/meminfo, who would have
thought? for memory data, but they use it in a weird way that
could result in either negative or near 0 ram used. Added in
some filters to not allow such values to print, now it tries
to make an educated guess about how much ram the system is
really using based on some tests.

11. Something you'd only notice if testing a lot, uptime failed
when the uptime was < 1 minute, it had failed to handle the seconds
only option, now it does, seconds, minutes, hours:minutes,
days hours:minutes, all work.

12. Missed linsysfs type to exclude in partitons, that was a partner
to linprocfs type, both are BSD types.

13. Added -ww to ps arguments, that stops the cutting width to terminal
size default behavior in BSDs, an easy fix, wish I'd known about
that a long time ago.

15. gpart seems to show sizes in bytes, not the expected KiB, so
that's now handled internally. Hopefully that odd behavior won't
randomly change in the future, sigh.

16. Fixed slim dm detection, saw instance where it's got slim.pid
like normal dms, not the slim.lock which inxi was looking for, so
now inxi looks for both, and we're all happy!

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

1. Added in something that should have been there all along, now inxi
validates the man page download as well as the self, this avoids
corrupted downloads breaking the man.

2. Init: added support for shepherd init system.

3. Distro Data: added support for guix distro ID; added support for
NomadBSD, GhostBSD, HardenedBSD system base. GhostBSD also shows the main
package version for the distro version ID, which isn't quite the
same as the version you download, but it's close. Also added os-release
support for BSDs, using similar tests as for linux distros, that
results in nicer outputs for example for Dragonfly BSD.

4. Package Data: added guix/scratch [venom]/kiss/nix package managers.
Update for slackware 15 package manager data directory relocation,
now handles either legacy current or future one.

5. Repos: added scratch/kiss/nix-channels; Added GhostBSD, HardenedBSD
pkg repos.

6. USB Data: added usbconfig. That's FreeBSD's, and related systems.

7. Device Data: Added pcictl support, that's NetBSD's, I thought
inxi had supported that, but then I remembered last time I tried to
run netBSD in a vm, I couldn't get it figured out. Now debugged and
working reasonably well.

8. Raspberry Pi 3, 4: ethernet nic now detected; wifi device,
which is on a special mmcnr type, now works, that stopped working in
pi 3, due to the change, now it's handled cleanly. Also added support
for pi bluetooth, which lives on a special serial bus, not usb.
For Raspberry Pi OS, added system base detections, which are tricky.
Also matched mmcnr devices to IF data, which was trickyy as well.
Note that as far as I could discover, only pi puts wifi on mmcnr.

9. Bluetooth: due to deprecated nature of the fine hciconfig
utility, added in support for bt-adapter, which also allows matching
of bluetooth data to device data, but is very sparse in info
supplied compared to hciconfig. bluetoothctl does not have enough
data to show the hci device, so it's not used, since inxi can't
match the bluetooth data to the device (no hci[x]). This should help
the distros that are moving away from hciconfig, in particular,
AUR is only way arch users can get hciconfig, which isn't ideal.

10. New tool and feature, ServiceData, this does two things,
as cross platform as practical, show status of bluetooth service,
this should help a lot in support people debugging bluetooth problems,
since you have bluetooth enabled but down, or up, disabled, and you
can also have the device itself down or up, so now it shows all that
data together for when it's down, but when the device is up, it just
shows the device status since the other stuff is redundant then.

In -Sa, it now shows the OS service manager that inxi detected
using a bunch of fallback tests, that's useful to admins who
are on a machine they don't know, then you can see the service
manager to use, like rc-service, systemctl, service, sv, etc.

11. Big update for -A: Sound Servers: had always been really
just only ALSA, now it shows all detected sound servers, and whether
they are running or not. Includes: ALSA, OSS, PipeWire, PulseAudio,
sndio, JACK. Note that OSS version is a guess, might be wrong source
for the version info.

12. Added USB device 'power:' item, that's in mA, not a terrible
thing to have listed, -xxx. This new feature was launched cross
platform, which is nice. Whether the BSD detections will break
in the future of course depends on whether they change the output
formats again or not. Also added in USB more chip IDs, which can
be useful. For BSDs, also added in a synthetic USB rev, taken
from the device/hub speeds. Yes, I know, USB 2 can have low speed,
full speed, or high speed, and 1.1 can have low and full speeds,
so you actually can't tell the USB revision version from the speeds,
but it's close enough.

13. Made all USB/Device data the same syntax and order, more
predictable, bus, chip, class IDs all the same now.

14. Added in support for hammer and null/nullfs file system types,
which trigger 'logical:' type device in partitions, that's also
more correct than the source: Err-102 that used to show, which
was really just a flag to alert me visibly that the partition
type detection had simply failed internally. Now for detected
types, like zfs tank/name or null/nullfs, it knows they are
logical structures.

15. Expanded BSD CPU data, where available, now can show L1/L2/
L3 cache, cpu arch, stepping, family/model ids, etc, which is
kind of nifty, although, again, delicate fragile rules that
will probably break in the future, but easier to fix now.

16. By an old request, added full native BSD doas support.
That's a nice little tool, and it plugged in fairly seamlessly
to existing sudo support. Both the internal doas/sudo stuff
should work the same, and the detection of sudo/doas start
should work the same too.

17a. Shell/Parent Data: Big refactor of the shell start/parent logic,
into ShellData which helped resolve some issues with running-in
showing shell name, not vt terminal or program name. Cause of that
is lots of levels of parents before inxi could reach the actual
program that was running inxi. Solution was to change to a longer
loop, and let it iterate 8 times, until it finds something that is
not a shell or sudo/doas/su type parent, this seems to work quite
well, you can only make it fail now if you actually try to do it on
purpose, which is fine.

This was very old logic, and carried some mistakes and
redundancies that made it very hard to understand, that's cleaned
up now. Also restored the old (login) value, which shows
when you use your normal login account on console, some system
will also now show (sudo,login) if the login user sudos inxi,
but that varies system to system.

17b. BSD running-in: Some of the BSDs now support the -f flag
for ps, which made the parent logic for running-in possible for
BSDs, which was nice. Some still don't support it, like OpenBSD
and NetBSD, but that's fine, inxi tests, and if no support detected,
just shows tty number. Adding in more robust support here cleaned
up some redundant logic internally as well.

17c. Updated terminal and shell ID detections, there's quite a few
new terminals this year, and a new shell or two. Those are needed
for more reliable detections of when the parent is NOT a shell,
which is how we find what it is.

18. Added ctwm wm support, that's the new default for NetBSD,
based on twm, has version numbers.

19. Upgraded BSD support for gpart and glabel data, now should
catch more more often.

20. For things like zfs raid, added component size, that doesn't
always work due to how zfs refers to its components, but it often
does, which is better than never before.

21. To make BSD support smoother, got rid of some OpenBSD only
rules, which in fact often apply to NetBSD as well. That may
lead to some glitches, but overall it's better to totally stay
away from OpenBSD only tests, and all BSD variant tests, and
just do dynamic testing that will work when it applies, and
not when it doesn't. In this case, added ftp downloader support
for netBSD by removing the openBSD only flag for that item.

There's a bit of a risk there in a sense since if different ftp
programs with different options were to be the fallback for something
else, it might get used, but that's fine, it's a corner case, better
to have them all work now than to worry about weird future things.
But limiting it to only BSDs should get rid of most of the problem.

vmstat and optical drive still use net/openbsd specifics because
it is too tricky to figure out it out in any more dynamic way.

22. For -Sxxx, added if systemd, display, virtual terminal number.
Could be useful to debug subtle issues, if the user is for example
not running their desktop in vt 7, the default for most systems.

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

1. Moved battery voltage to -Bx output, the voltage is quite
important to know since that is the key indicator of battery state.
If voltage is within .5 volts of specified minimum, shows voltage
for -B since that's a prefail condition, it's getting close to
death.

2. In partitions and raid, when the device was linear raid logical
type layout, it said, no-raid, when it should be 'linear', that's
now cleaner and more correct.

3. When running-in is a tty value, it will now show the entire
tty ID, minus the '/dev/tty', this will be more precise, and also
may resolve cases where tty was fully alpha, no numbers, previously
inxi filtered out everything that was not a number, but that can
in some tty types remove critical tty data, so now it will show:

running-in:
tty 2 [not changed]; tty pts/2 [adds pts/]; tty E2 [adds the E];
tty rx [would have not shown at ll before]

------------------------------------------------------------------------
CODE CHANGES:

NOTE: unlike the previous refactors, a lot of these changes were
done to make inxi more maintainable, which means, slightly less
optimized, which has been my preference in the past, but if the
stuff can't be maintained, it doesn't matter how fast it runs!

These changes have really enhanced the quality of the code and
made it a lot easier to work with. It's also now a lot easier to
add debuggers, force/fake data switches, etc, so it gets done,
unlike before, when it was a pain, so it got skipped, and then
caused bugs because of stray debuggers left in place, and so on.

The bright side is while reading up on this, I learned that using
very large subs is much more efficient than many small ones,
which I've always felt was the case, and it is, so the style
used internally in inxi proves to be the best one for optimizations.

These refactors, ongoing, have now touched at least 1/3, almost
1/2, of the entire inxi codebase, so the stuff is getting more
and more consistent and up to date, but given how old the logic
is in places, there will be more refactors in the future, and
maybe once the code is easier to maintain, some renewed
optimizations!, if we can find anything that makes sense, like
passing array/hash references back to the caller, already the
first half is done, passing references to the sub/method always.

The second part is started, using the Benchmark Perl module,
which really speeds up testing and helps avoid pointless tweaks
that do little re speed improvements.

I could see with some care some areas where working on data
directly via references could really speed things up, but it's
hard to write and read that type of code, but it's already being
done in the recursive data and output logics, and a few other
places.

1. Large refactor of USBData, that was done in part to help make
it work for BSDs better, but also to get it better organized.

This refactor also made all the device items, like -A,-G,-N,-E
use the same methods for creating USB output, previously they
had used a hodgepodge of methods, some super old, it was not
possible to add USB support more extensively for BSDs without
this change.

Also added in some fallback usb type detection tools using
several large online collections of that info to see what possible
matching patterns could catch more devices and correctly match
them to their type, which is the primary way now that usb output
per type is created. This really helps with BSDs, though BSD
usb utilities suffer from less data than lsusb so they don't always
get device name strings in a form where they can be readily ID'ed,
but it's way better than it was before, so that's fine!

Moved all previous methods of detecting if a card/device was USB
into USBData itself so it would all be in one place, and easier
to maintain.

All USB tools now use bus_id_alpha for sorting, and all now
sort as well, that was an oversight, previously the BSD usb
tools were not sorted, but those have been enhanced a lot, so
sorting on alpha synthetic bus ids became possible.

Removed lsusb as a BSD option, it's really unreliable, and the data
is different, and also varies a lot, it didn't really work at all
in Dragonfly, or had strange output, so lsusb is now a linux only
item.

2. Moved various booleans that were global to %force, %loaded, and
some to the already present, but lightly used, %use hashes. It was
getting too hard to add tests etc, which was causing bugs to happen.
Yes, using hashes is slower than hardcoding in the boolean scalars,
but this change was done to improve maintainability, which is starting
to matter more.

3. Moved several sets of subs to new packages, again, to help with
debugging and maintainability. MemoryData, redone in part to
handle the oddities with NetBSD reporting of free, cached, and
buffers, but really just to make it easier to work with overall.
Also moved kernel parameter logic to KernelParameters, gpart logic
to GpartData, glabel logic to GlabelData, ip data IpData, check_tools
to CheckTools, which was also enhanced largely, and simplified,
making it much easier to work with.

4. Wrapped more debugger logic in $fake{data} logic, that makes
it harder to leave a debugger uncommented, now to run it, you have
to trigger it with $fake{item} so the test runs, that way even if
I forget to comment it out, it won't run for regular user.

5. Big update to docs in branch inxi-perl/docs, those are now
much more usable for development. Updated in particular
inxi-values.txt to be primary reference doc for $fake, $dbg,
%force, %use, etc types and values. Also updated inxi-optimization.txt
and inxi-resources.txt to bring them closer to the present.

Created inxi-bugs.txt as well, which will help to know which known
bugs belonged to which frozen pools. These bugs will only refer
to bugs known to exist in tagged releases in frozen pool distros.

6. For sizes, moved most of the sizing to use main::translate_size,
this is more predictable, though as noted, these types of
changes make inxi a bit slower since it moved stuff out of inline
to using quick expensive sub calls, but it's a lot easier to
maintain, and that's getting to be more important to me now.

7. In order to catch live events, added in dmesg to dmesg.boot data
in BSDs, that's the only way I could find to readily detect
usb flash drives that were plugged in after boot. Another hack,
these will all come back to bite me, but that's fine, the base
is easier to work on and debug now, so if I want to spend time
revisiting the next major version BSD releases, it will be easier
to resolve the next sets of failures.

8. A big change, I learned about the non greedy operator for
regex patterns, ?, as in, .*?(next match rule), it will now
go up only to the next match rule. Not knowing this simple
little thing made inxi use some really convoluted regex to
avoid such greedy patterns. Still some gotchas with ?, like
it ignores following rules that are zero or 1, ? type, and
just treats it as zero instances. But that's easy to work with.

9. Not totally done, but now moved more to having set data
tools set their $loaded{item} value in get data, not externally,
that makes it easier to track the stuff. Only where it makes
sense, but there's a lot of those set/get items, they should
probably all become package/classes, with set/get I think.

10. Optimized reader() and grabber() and set_ps_aux_data(), all
switched from using grep/map to using for loops, that means
inxi doesn't have to go through each array 2x anymore, actually
4x in  the case of set_ps_aux_data(). This saved a visible
amount of execution time, I noticed this lag when running
pinxi through NYTProf optimizer, there was a quite visible
time difference between grabber/reader and  the subshell
time, these optimizations almost removed that difference,
meaning only the subshell now really takes any time to run.

Optimized url_cleaner and data_cleaner in RepoData, those
now just work directy on the array references, no returns.

Ran some more optimization tests, but will probably hold off
on some of them, for example, using cleaner() by reference is
about 50% faster than by copy, but redoing that requires
adding in many copies from read only things like $1, so
the change would lead to slightly less clean code, but may
revisit this in the future, we'll see.

But in theory, basically all the core internal tools that
take a value and modify it should do that by reference
purely since it's way faster, up to 10x.
This commit is contained in:
Harald Hope 2021-03-15 18:44:00 -07:00
parent d11f2a7a89
commit 75433a383a
3 changed files with 3958 additions and 2185 deletions

5486
inxi

File diff suppressed because it is too large Load diff

189
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2021\-02\-08" inxi "inxi manual" .TH INXI 1 "2021\-03\-15" 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
@ -64,7 +64,8 @@ keep things simple.
.TP .TP
.B \-A\fR,\fB \-\-audio\fR .B \-A\fR,\fB \-\-audio\fR
Show Audio/sound device(s) information, including device driver. Show Audio/sound device(s) information, including device driver. Show running
sound server(s). See \fB\-xxA\fR to show all sound servers detected.
.TP .TP
.B \-b\fR,\fB \-\-basic\fR .B \-b\fR,\fB \-\-basic\fR
@ -78,18 +79,25 @@ Show system battery (\fBID\-x\fR) data, charge, condition, plus extra informatio
about current battery state/charge/voltage. Supports multiple batteries when about current battery state/charge/voltage. Supports multiple batteries when
using \fB/sys\fR data. using \fB/sys\fR data.
Note that for \fBcharge\fR, the output shows the current charge, as well as its Note that for \fBcharge:\fR, the output shows the current charge, as well as its
value as a percentage of the available capacity, which can be less than the original design value as a percentage of the available capacity, which can be less than the original design
capacity. In the following example, the actual current available capacity of the battery capacity. In the following example, the actual current available capacity of the battery
is \fB22.2 Wh\fR. is \fB22.2 Wh\fR.
\fBcharge: 20.1 Wh 95.4%\fR \fBcharge: 20.1 Wh (95.4%)\fR
The \fBcondition\fR item shows the remaining available capacity / original design The \fBcondition:\fR item shows the remaining available capacity / original design
capacity, and then this figure as a percentage of original capacity available in the battery. capacity, and then this figure as a percentage of original capacity available in the battery.
\fBcondition: 22.2/36.4 Wh (61%)\fR \fBcondition: 22.2/36.4 Wh (61%)\fR
With \fB\-x\fR, or if voltage difference is critical, \fBvolts:\fR item shows the
current voltage, and the \fBmin:\fR voltage. Note
that if the current is below the minimum listed the battery is essentially dead
and will not charge. Test that to confirm, but that's technically how it's supposed to work.
\fBvolts: 12.0 min: 11.4\fR
With \fB\-x\fR shows attached \fBDevice\-x\fR information (mouse, keyboard, etc.) With \fB\-x\fR shows attached \fBDevice\-x\fR information (mouse, keyboard, etc.)
if they are battery powered. if they are battery powered.
@ -198,14 +206,17 @@ model, and size. See \fBExtra Data Options\fR (\fB\-x\fR options) and
.TP .TP
.B \-E\fR, \fB\-\-bluetooth\fR .B \-E\fR, \fB\-\-bluetooth\fR
Show bluetooth device(s), drivers. Show \fBReport:\fR with Show bluetooth device(s), drivers. Show \fBReport:\fR (requires
(if available) bluetooth version (\fBbt\-v\fR), HCI ID, state, \fBbt\-adapter\fR or \fBhciconfig\fR) with HCI ID, state, address per device,
address per device. See \fBExtra Data Options\fR for more. and if available (hciconfig only) bluetooth version (\fBbt\-v\fR).
See \fBExtra Data Options\fR for more.
If bluetooth service is down or disabled, will show message.
Note that \fBReport\-ID:\fR indicates that the HCI item was not able to be linked to a Note that \fBReport\-ID:\fR indicates that the HCI item was not able to be linked to a
specific device, similar to \fBIF\-ID:\fR in \fB\-n\fR. specific device, similar to \fBIF\-ID:\fR in \fB\-n\fR.
Note that if your internal bluetooth device does not show, it's possible that If your internal bluetooth device does not show, it's possible that
it has been disabled, if you try enabling it using for example: it has been disabled, if you try enabling it using for example:
\fBhciconfig hci0 up\fR \fBhciconfig hci0 up\fR
@ -216,7 +227,7 @@ and it returns a blocked by RF\-Kill error, you can do one of these:
or or
\fBrfkill list\fR \fBrfkill list bluetooth\fR
\fBrfkill unblock bluetooth\fR \fBrfkill unblock bluetooth\fR
@ -328,7 +339,8 @@ Show Logical volume information, for LVM, LUKS, bcache, etc. Shows
size, free space (for LVM VG). For LVM, shows \fBDevice\-[xx]: VG:\fR size, free space (for LVM VG). For LVM, shows \fBDevice\-[xx]: VG:\fR
(Volume Group) size/free, \fBLV\-[xx]\fR (Logical Volume). LV shows type, (Volume Group) size/free, \fBLV\-[xx]\fR (Logical Volume). LV shows type,
size, and components. Note that components are made up of either containers size, and components. Note that components are made up of either containers
(aka, logical devices), or physical devices. The full report requires sudo/root. (aka, logical devices), or physical devices. The full report requires
doas[BSDs]/sudo/root.
Logical block devices can be thought of as devices that are made up out Logical block devices can be thought of as devices that are made up out
of either other logical devices, or physical devices. inxi does its best of either other logical devices, or physical devices. inxi does its best
@ -406,9 +418,9 @@ information. Devices shows locator data (highly variable in syntax), size, speed
type (eg: \fBtype: DDR3\fR). type (eg: \fBtype: DDR3\fR).
Note: \fB\-m\fR uses \fBdmidecode\fR, which must be run as root (or start Note: \fB\-m\fR uses \fBdmidecode\fR, which must be run as root (or start
\fBinxi\fR with \fBsudo\fR), unless you figure out how to set up sudo to permit \fBinxi\fR with \fBsudo\fR), unless you figure out how to set up doas[BSDs]/sudo
dmidecode to read \fB/dev/mem\fR as user. \fBspeed\fR and \fBbus width\fR will not to permit dmidecode to read \fB/dev/mem\fR as user. \fBspeed\fR and \fBbus\-width\fR
show if \fBNo Module Installed\fR is found in \fBsize\fR. will not show if \fBNo Module Installed\fR is found in \fBsize\fR.
Note: If \fB\-m\fR is triggered RAM total/used report will appear in this section, Note: If \fB\-m\fR is triggered RAM total/used report will appear in this section,
not in \fB\-I\fR or \fB\-tm\fR items. not in \fB\-I\fR or \fB\-tm\fR items.
@ -497,6 +509,8 @@ if you have added to \fB/etc/sudoers\fR (sudo v. 1.7 or newer):
.B <username> ALL = NOPASSWD: /usr/bin/file (sample) .B <username> ALL = NOPASSWD: /usr/bin/file (sample)
BSD users: see \fBman doas.conf\fR for setup.
Does not show components (partitions that create the md\-raid array) of md\-raid arrays. Does not show components (partitions that create the md\-raid array) of md\-raid arrays.
.TP .TP
@ -528,16 +542,22 @@ APT distros like PCLinuxOS or Alt\-Linux)
\fBEOPKG\fR (Solus) \fBEOPKG\fR (Solus)
\fBNIX\fR (NixOS + other distros as alternate package manager)
\fBPACMAN\fR (Arch Linux, KaOS + derived versions) \fBPACMAN\fR (Arch Linux, KaOS + derived versions)
\fBPACMAN\-G2\fR (Frugalware + derived versions) \fBPACMAN\-G2\fR (Frugalware + derived versions)
\fBPISI\fR (Pardus + derived versions) \fBPISI\fR (Pardus + derived versions)
\fBPKG\fR (OpenBSD, FreeBSD, NetBSD + derived OS types)
\fBPORTAGE\fR (Gentoo, Sabayon + derived versions) \fBPORTAGE\fR (Gentoo, Sabayon + derived versions)
\fBPORTS\fR (OpenBSD, FreeBSD, NetBSD + derived OS types) \fBPORTS\fR (OpenBSD, FreeBSD, NetBSD + derived OS types)
\fBSCRATCHPKG\fR (Venom + derived versions)
\fBSLACKPKG\fR (Slackware + derived versions) \fBSLACKPKG\fR (Slackware + derived versions)
\fBTCE\fR (TinyCore) \fBTCE\fR (TinyCore)
@ -812,6 +832,8 @@ specific vendor [product] information.
\- Adds PCI/USB ID of each device. \- Adds PCI/USB ID of each device.
\- Adds non-running sound servers, if detected.
.TP .TP
.B \-x \-B\fR .B \-x \-B\fR
\- Adds vendor/model, battery status (if battery present). \- Adds vendor/model, battery status (if battery present).
@ -819,6 +841,10 @@ specific vendor [product] information.
\- Adds attached battery powered peripherals (\fBDevice\-[number]:\fR) if \- Adds attached battery powered peripherals (\fBDevice\-[number]:\fR) if
detected (keyboard, mouse, etc.). detected (keyboard, mouse, etc.).
\- Adds battery \fBvolts:\fR, \fBmin:\fR voltages. Note that if difference
is critical, that is current voltage is too close to minimum voltage, shows
without \fB\-x\fR.
.TP .TP
.B \-x \-C\fR .B \-x \-C\fR
\- Adds bogomips on CPU (if available) \- Adds bogomips on CPU (if available)
@ -860,8 +886,8 @@ Once enabled, add \fBdrivetemp\fR to \fB/etc/modules\fR or
\fB/etc/modules\-load.d/***.conf\fR so it starts automatically. \fB/etc/modules\-load.d/***.conf\fR so it starts automatically.
If you see drive temps running as regular user and you did not configure system If you see drive temps running as regular user and you did not configure system
to use sudo hddtemp, then your system supports this feature. If no /sys data is to use doas[BSDs]/sudo hddtemp, then your system supports this feature. If no /sys
found, inxi will try to use hddtemp methods instead for that drive. data is found, inxi will try to use hddtemp methods instead for that drive.
Hint: if temp is /sys sourced, the temp will be to 1 decimal, like 34.8, if hddtemp Hint: if temp is /sys sourced, the temp will be to 1 decimal, like 34.8, if hddtemp
sourced, they will be integers. sourced, they will be integers.
@ -870,6 +896,8 @@ or if you have added to \fB/etc/sudoers\fR (sudo v. 1.7 or newer):
.B <username> ALL = NOPASSWD: /usr/sbin/hddtemp (sample) .B <username> ALL = NOPASSWD: /usr/sbin/hddtemp (sample)
BSD users: see \fBman doas.conf\fR for setup.
You can force use of \fBhddtemp\fR for all drives using \fB\-\-hddtemp\fR. You can force use of \fBhddtemp\fR for all drives using \fB\-\-hddtemp\fR.
\- If free LVM volume group size detected (root required), show \fBlvm-free:\fR \- If free LVM volume group size detected (root required), show \fBlvm-free:\fR
@ -885,8 +913,9 @@ specific vendor [product] information.
\- Adds driver version (if available) for each device. \- Adds driver version (if available) for each device.
\- Adds LMP (HCI if no LMP data, and HCI if HCI/LMP versions are different) \- Adds (if available, and \fBhciconfig\fR only) LMP (HCI if no LMP data,
version (if available) for each HCI ID. and HCI if HCI/LMP versions are different) version (if available)
for each HCI ID.
.TP .TP
.B \-x \-G\fR .B \-x \-G\fR
@ -1023,13 +1052,12 @@ methods are found for each distribution system base detection.
.TP .TP
.B \-xx \-B\fR .B \-xx \-B\fR
\- Adds serial number, voltage (if available). Note that \fBvolts\fR shows the \- Adds serial number.
data (if available) as the voltage now / minimum design voltage.
.TP .TP
.B \-xx \-C\fR .B \-xx \-C\fR
\- Adds \fBL1 cache:\fR and \fBL3 cache:\fR if either are available. Requires \- Adds \fBL1\-cache:\fR and \fBL3\-cache:\fR if either are available. Requires
dmidecode and sudo/root. dmidecode and doas[BSDs]/sudo/root.
.TP .TP
.B \-xx \-D\fR .B \-xx \-D\fR
@ -1056,7 +1084,8 @@ For a PCIe 3 NVMe drive, with speed of \fB8 GT/s\fR and \fB4\fR lanes
.B \-xx \-E\fR (\fB\-\-bluetooth\fR) .B \-xx \-E\fR (\fB\-\-bluetooth\fR)
\- Adds vendor:product ID of each device. \- Adds vendor:product ID of each device.
\- Adds LMP subversion (and/or HCI revision if applicable) for each device. \- Adds (\fBhciconfig \fRonly) LMP subversion (and/or HCI revision
if applicable) for each device.
.TP .TP
.B \-xx \-G\fR .B \-xx \-G\fR
@ -1198,7 +1227,7 @@ data is simply not available as of 2018\-04\-03), location (only available from
.TP .TP
.B \-xxx \-C\fR .B \-xxx \-C\fR
\- Adds CPU voltage and external clock speed (this is the motherboard speed). \- Adds CPU voltage and external clock speed (this is the motherboard speed).
Requires sudo/root and \fBdmidecode\fR. Requires doas[BSDs]/sudo/root and \fBdmidecode\fR.
.TP .TP
.B \-xxx \-D\fR .B \-xxx \-D\fR
@ -1216,7 +1245,7 @@ no data will show.
.B \-xxx \-E\fR (\fB\-\-bluetooth\fR) .B \-xxx \-E\fR (\fB\-\-bluetooth\fR)
\- Adds, if present, PCI/USB class ID. \- Adds, if present, PCI/USB class ID.
\- Adds HCI version, revision. \- Adds (\fBhciconfig \fRonly) HCI version, revision.
.TP .TP
.B \-xxx \-G\fR .B \-xxx \-G\fR
@ -1233,8 +1262,8 @@ Linux only). 0 value means the machine has not been suspended.
\- For \fBShell:\fR adds \fBdefault:\fR shell if different from \- For \fBShell:\fR adds \fBdefault:\fR shell if different from
running shell, and default shell \fBv:\fR, if available. running shell, and default shell \fBv:\fR, if available.
\- For \fBrunning in:\fR adds \fB(SSH)\fR to parent, if present. SSH detection \- For \fBrunning\-in:\fR adds \fB(SSH)\fR to parent, if present. SSH detection
uses the \fBwho am i\fR test. uses the \fBwhoami\fR test.
.TP .TP
.B \-xxx \-J\fR (\fB\-\-usb\fR) .B \-xxx \-J\fR (\fB\-\-usb\fR)
@ -1246,6 +1275,8 @@ uses the \fBwho am i\fR test.
\- Adds, if present, USB class ID. \- Adds, if present, USB class ID.
\- Adds, if non 0, max power in mA.
.TP .TP
.B \-xxx \-m\fR, \fB\-\-memory\-modules\fR .B \-xxx \-m\fR, \fB\-\-memory\-modules\fR
\- Adds memory bus width: primary bus width, and if present, total width. e.g. \- Adds memory bus width: primary bus width, and if present, total width. e.g.
@ -1285,6 +1316,9 @@ lxpanel, xfce4\-panel, lxqt\-panel, tint2, cairo-dock, trayer, and many others.
\- Adds (if present), display manager (\fBdm\fR) version number. \- Adds (if present), display manager (\fBdm\fR) version number.
\- Adds (if Linux, systemd, and in display), virtual terminal (\fBvt\fR) number.
These are the same as \fBctrl+alt+F[x]\fR numbers usually.
.TP .TP
.B \-xxx \-w\fR,\fB \-W\fR .B \-xxx \-w\fR,\fB \-W\fR
\- Adds location (city state country), observation altitude (if available), \- Adds location (city state country), observation altitude (if available),
@ -1314,19 +1348,19 @@ Format is \fBhexadecimal (decimal)\fR if greater than 9, otherwise \fBhexadecima
\- Adds CPU microcode. Format is \fBhexadecimal\fR. \- Adds CPU microcode. Format is \fBhexadecimal\fR.
\- Adds socket type (for motherboard CPU socket, if available). If results doubtful \- Adds socket type (for motherboard CPU socket, if available). If results doubtful
will list two socket types and \fBnote: check\fR. Requires sudo/root and \fBdmidecode\fR. will list two socket types and \fBnote: check\fR. Requires doas[BSDs]/sudo/root and
The item in parentheses may simply be a different syntax for the same socket, \fBdmidecode\fR. The item in parentheses may simply be a different syntax for the
but in general, check this before trusting it. same socket, but in general, check this before trusting it.
.nf .nf
Sample: \fBsocket: 775 (478) note: check\fR Sample: \fBsocket: 775 (478) note: check\fR
Sample: \fBsocket: AM4\fR Sample: \fBsocket: AM4\fR
.fi .fi
\- Adds DMI CPU base and boost/turbo speeds. Requires sudo/root and \fBdmidecode\fR. \- Adds DMI CPU base and boost/turbo speeds. Requires doas[BSDs]/sudo/root and
In some cases, like with overclocking or 'turbo' or 'boost' modes, voltage and \fBdmidecode\fR. In some cases, like with overclocking or 'turbo' or 'boost' modes,
external clock speeds may be increased, or short term limits raised on max CPU speeds. voltage and external clock speeds may be increased, or short term limits raised
These are often not reflected in /sys based CPU \fBmin/max:\fR speed results, on max CPU speeds. These are often not reflected in /sys based CPU \fBmin/max:\fR
but often are using this source. speed results, but often are using this source.
Samples: Samples:
.nf .nf
@ -1363,7 +1397,7 @@ values. The \fBbase/boost:\fR values are sometimes real, and sometimes not.
.B \-a \-d\fR,\fB\-a \-D\fR .B \-a \-d\fR,\fB\-a \-D\fR
\- Adds logical and physical block size in bytes. \- Adds logical and physical block size in bytes.
Using \fBsmartctl\fR (requires sudo/root privileges). Using \fBsmartctl\fR (requires doas[BSDs]/sudo/root privileges).
\- Adds device model family, like \fBCaviar Black\fR, if available. \- Adds device model family, like \fBCaviar Black\fR, if available.
@ -1388,8 +1422,9 @@ and other useful data.
.TP .TP
.B \-a \-E\fR (\fB\-\-bluetooth\fR) .B \-a \-E\fR (\fB\-\-bluetooth\fR)
\- Adds extra line to \fBReport:\fR, \fBInfo:\fR. Includes, if available, \- Adds (\fBhciconfig\fR only) extra line to \fBReport:\fR, \fBInfo:\fR.
ACL MTU, SCO MTU, Link policy, Link mode, and Service Classes. Includes, if available, ACL MTU, SCO MTU, Link policy, Link mode,
and Service Classes.
.TP .TP
.B \-a \-G\fR .B \-a \-G\fR
@ -1466,7 +1501,7 @@ instead.
.TP .TP
.B \-a \-I\fR .B \-a \-I\fR
Adds Packages, totals, per package manager totals, and number of lib \- Adds Packages, totals, per package manager totals, and number of lib
packages detected per package manager. Also adds detected package managers packages detected per package manager. Also adds detected package managers
with 0 packages listed. Moves to \fBRepos\fR if \fB\-ra\fR. with 0 packages listed. Moves to \fBRepos\fR if \fB\-ra\fR.
@ -1476,9 +1511,13 @@ Info:
.... ....
Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 5/6/7/8/9 Init: systemd v: 245 runlevel: 5 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 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 v: 5.0.16 running\-in: kate inxi: 3.1.04
.fi .fi
\- Adds service control tool, tested for in the following order: \fBsystemctl
rc-service service sv /etc/rc.d /etc/init.d\fR - useful to know which you need
when using an unfamiliar machine.
.TP .TP
.B \-a \-j\fR, \fB\-a \-P\fR [swap], \fB\-a \-P\fR [swap] .B \-a \-j\fR, \fB\-a \-P\fR [swap], \fB\-a \-P\fR [swap]
\- Adds swappiness and vfs cache pressure, and a message to indicate \- Adds swappiness and vfs cache pressure, and a message to indicate
@ -1487,11 +1526,11 @@ If not the default value, shows default value as well, e.g.
For \fB\-P\fR per swap physical partition: For \fB\-P\fR per swap physical partition:
\fBswappiness: 60 (default) cache pressure: 90 (default 100)\fR \fBswappiness: 60 (default) cache\-pressure: 90 (default 100)\fR
For \fB\-j\fR row 1 output: For \fB\-j\fR row 1 output:
\fBKernel: swappiness: 60 (default) cache pressure: 90 (default 100)\fR \fBKernel: swappiness: 60 (default) cache\-pressure: 90 (default 100)\fR
\- Adds device kernel major:minor number (Linux only). \- Adds device kernel major:minor number (Linux only).
@ -1518,7 +1557,7 @@ instead.
.B \-a \-p\fR,\fB\-a \-P\fR .B \-a \-p\fR,\fB\-a \-P\fR
\- Adds raw partition size, including file system overhead, partition table, e.g. \- Adds raw partition size, including file system overhead, partition table, e.g.
\fBraw size: 60.00 GiB\fR. \fBraw\-size: 60.00 GiB\fR.
\- Adds percent of raw size available to \fBsize:\fR item, e.g. \- Adds percent of raw size available to \fBsize:\fR item, e.g.
@ -1576,6 +1615,10 @@ basically forces the downloader selection to use \fBPerl 5.x\fR \fBHTTP::Tiny\fR
which is generally slower than \fBCurl\fR or \fBWget\fR but it may help bypass which is generally slower than \fBCurl\fR or \fBWget\fR but it may help bypass
issues with downloading. issues with downloading.
.TP
.B \-\-bt\-tool [bt\-adapter|hciconfig]\fR
Force the use of the given tool for bluetooth report (\fB\-E\fR).
.TP .TP
.B \-\-dig\fR .B \-\-dig\fR
Temporary override of \fBNO_DIG\fR configuration item. Only use to test w/wo dig. Temporary override of \fBNO_DIG\fR configuration item. Only use to test w/wo dig.
@ -1600,16 +1643,38 @@ If it hangs, \fB\-\-display\fR will not work.
.TP .TP
.B \-\-dmidecode\fR .B \-\-dmidecode\fR
Force use of \fBdmidecode\fR. This will override \fB/sys\fR data in some lines, Shortcut, legacy. See \fB\-\-force dmidecode\fR.
e.g. \fB\-M\fR or \fB\-B\fR.
.TP .TP
.B \-\-downloader [curl|fetch|perl|wget]\fR .B \-\-downloader [curl|fetch|perl|wget]\fR
Force inxi to use Curl, Fetch, Perl, or Wget for downloads. Force inxi to use Curl, Fetch, Perl, or Wget for downloads.
.TP
.B \-\-force [dmidecode|hddtemp|lsusb|usb-sys|vmstat|wmctl]\fR
Various force options to allow users to override defaults. Values be given
as a comma separated list:
\fBinxi \-MJ --force dmidecode,lsusb\fR
\- \fBdmidecode\fR \- Force use of \fBdmidecode\fR. This will override \fB/sys\fR
data in some lines, e.g. \fB\-M\fR or \fB\-B\fR.
\- \fBhddtemp\fR \- Force use of hddtemp instead of /sys temp data for disks.
\- \fBlsusb\fR \- Forces the USB data generator to use \fBlsusb\fR as
data source (default). Overrides \fBUSB_SYS\fR in user configuration file(s).
\- \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.
\- \fBwmctl\fR \- Force \fBSystem\fR item \fBwm\fR to use \fBwmctrl\fR
as data source, override default \fBps\fR source.
.TP .TP
.B \-\-hddtemp\fR .B \-\-hddtemp\fR
Force use of hddtemp instead of /sys temp data for disks. Shortcut, legacy. See \fB\-\-force hddtemp\fR.
.TP .TP
.B \-\-host\fR .B \-\-host\fR
@ -1641,6 +1706,15 @@ Overrides default use of \fBdig\fR to get WAN IP address. Allows use of normal
downloader tool to get IP addresses. Only use if dig is failing, since dig is much downloader tool to get IP addresses. Only use if dig is failing, since dig is much
faster and more reliable in general than other methods. faster and more reliable in general than other methods.
.TP
.B \-\-no\-doas\fR
Skips the use of doas to run certain internal features (like \fBhddtemp\fR, \fBfile\fR)
with doas. Not related to running inxi itself with doas/sudo or super user.
Some systems will register errors which will then trigger admin emails in such cases, so if
you want to disable regular user use of doas (which requires configuration to setup
anyway for these options) just use this option, or \fBNO_DOAS\fR configuration item.
See \fB\-\-no\-sudo\fR if you need to disable both types.
.TP .TP
.B \-\-no\-host\fR .B \-\-no\-host\fR
Turns off hostname in System line. This is default when using \fB\-z\fR, Turns off hostname in System line. This is default when using \fB\-z\fR,
@ -1678,10 +1752,10 @@ lists, or if you have problems making a connection for any reason. Works with
.TP .TP
.B \-\-no\-sudo\fR .B \-\-no\-sudo\fR
Skips the use of sudo to run certain internal features (like \fBhddtemp\fR, \fBfile\fR) Skips the use of sudo to run certain internal features (like \fBhddtemp\fR, \fBfile\fR)
with sudo. Not related to running inxi itself with sudo or super user. Some systems will with sudo. Not related to running inxi itself with sudo or super user.
register errors which will then trigger admin emails in such cases, so if you want to disable Some systems will register errors which will then trigger admin emails in such cases, so if
regular user use of sudo (which requires configuration to setup anyway for these options) you want to disable regular user use of sudo (which requires configuration to setup
just use this option, or \fBNO_SUDO\fR configuration item. anyway for these options) just use this option, or \fBNO_SUDO\fR configuration item.
.TP .TP
.B \-\-output [json|screen|xml]\fR .B \-\-output [json|screen|xml]\fR
@ -1790,13 +1864,11 @@ parent start program whitelist.
.TP .TP
.B \-\-usb\-sys\fR .B \-\-usb\-sys\fR
Forces the USB data generator to use \fB/sys\fR as data source Shortcut, legacy. See \fB\-\-force usb\-sys\fR
instead of \fBlsusb\fR.
.TP .TP
.B \-\-usb\-tool\fR .B \-\-usb\-tool\fR
Forces the USB data generator to use \fBlsusb\fR as data source. Overrides Shortcut, legacy. See \fB\-\-force lsusb\fR
\fBUSB_SYS\fR in user configuration file(s).
.TP .TP
.B \-\-wan\-ip\-url [URL]\fR .B \-\-wan\-ip\-url [URL]\fR
@ -1812,8 +1884,7 @@ Same as configuration value (example):
.TP .TP
.B \-\-wm\fR .B \-\-wm\fR
Force \fBSystem\fR item \fBwm\fR to use \fBwmctrl\fR as data source, Shortcut, legacy. See \fB\-\-force wmctl\fR.
override default \fBps\fR source.
.TP .TP
.B \-\-wrap\-max [integer]\fR .B \-\-wrap\-max [integer]\fR
@ -1914,7 +1985,7 @@ Skip /sys debugging in case of a hang.
.TP .TP
.B \-\-debug\-sys\fR .B \-\-debug\-sys\fR
Force PowerPC debugger parsing of /sys as sudo/root. Force PowerPC debugger parsing of /sys as doas[BSDs]/sudo/root.
.TP .TP
.B \-\-debug\-sys\-print\fR .B \-\-debug\-sys\-print\fR
@ -2020,6 +2091,8 @@ to sys admins running servers with many IP addresses.
\fBNO_DIG\fR Set to \fB1\fR or \fBtrue\fR to disable WAN IP use of \fBdig\fR and force \fBNO_DIG\fR Set to \fB1\fR or \fBtrue\fR to disable WAN IP use of \fBdig\fR and force
use of alternate downloaders. use of alternate downloaders.
\fBNO_DOAS\fR Set to \fB1\fR or \fBtrue\fR to disable internal use of \fBdoas\fR.
\fBNO_HTML_WAN\fR Set to \fB1\fR or \fBtrue\fR to disable WAN IP use of \fBHTML Downloaders\fR and force \fBNO_HTML_WAN\fR Set to \fB1\fR or \fBtrue\fR to disable WAN IP use of \fBHTML Downloaders\fR and force
use of dig only, or nothing if dig disabled as well. Same as \fB\-\-no\-html\-wan\fR. Only use if use of dig only, or nothing if dig disabled as well. Same as \fB\-\-no\-html\-wan\fR. Only use if
dig is failing, and HTML downloaders are hanging. dig is failing, and HTML downloaders are hanging.
@ -2174,3 +2247,5 @@ out to be.
And of course, a big thanks to locsmif, who figured out a lot of the core methods, And of course, a big thanks to locsmif, who figured out a lot of the core methods,
logic, and tricks originally used in inxi Gawk/Bash. logic, and tricks originally used in inxi Gawk/Bash.
.\" EOF

View file

@ -1,3 +1,471 @@
=====================================================================================
Version: 3.3.02
Patch: 00
Date: 2021-03-15
-----------------------------------
Changes:
-----------------------------------
Huge upgrade!! Bug Fixes!! Refactors!!! BSDs!!! More BSDs!!!
raspberry pi!! New Features!!! Enhanced old features!!! Did I
mention bluetooth?! USB? Audio? No? well, all hugely upgraded!
------------------------------------------------------------------------
BUGS:
1. Sadly, 3.3.01 went out with a bug, forgot to remove a debugger,
resulted in hardcoded kernel compiler version always showing.
Note that there is a new inxi-perl/docs/inxi-bugs.txt file to
track such bugs, and matched to specific tagged releases so you
know the line number and items to update to fix it.
2. Typo in manjaro system base match resulted in failing to report
system base as expected.
------------------------------------------------------------------------
KNOWN ISSUES BUT CAN'T OR WON'T BE FIXED:
1. OpenBSD made fvwm -version output an error along with the
version, and not in the normal format for standard fvwm, this
is just too complicated to work around for now, though it could
be in theory by creating a dedicated fvwm-oBSD item in
program_values. But that kind of granularity gets too hard to track,
and they are likely to change or fix this in the future anyway.
Best is they just restore default -version output to what it is
elsewhere, not nested in error outputs.
2. Discovered an oddity, don't know how widespread this
is, but Intel SSDs take about 200 milliseconds to get the sys
hwmon based drive temps, when it should take under a
millisecond, this may be a similar cause as those drives having
a noticeable SMART report delay, not sure. This is quite
noticeable since 200 ms is about 15% of the total execution
time on my test system.
------------------------------------------------------------------------
FIXES:
1. For --recommends, added different rpm SUSE xdpyinfo package name.
2. Distro Data: added double term filter for lsb-release due to sometimes
generating repeated names in distro.
3. Packages: fix for appimage package counts.
4. Desktop: fixed ID for some wm when no xprop installed, fallback to
using @ps_cmd detections, which usually work fine.
5a. When swap used was 0, showed N/A, fixed to correctly show 0 KiB.
5b. If no swap devices found, BSDs were not correctly showing
no swap data found message. Corrected.
6a. Bluetooth: Removed hcidump from debugger, in some cases, that will
just hang endlessly. Also wrapped bluetoothctl and bt-adapter debugger
data collection with @ps_cmd bluetooth running test. Only run if
bluetooth service is running.
6b. Bluetooth: running detections have to be very strict, only
bluetoothd, not bluetooth, the latter can show true when bluetoothd
is not running, and did in my tests.
7. USB: with Code Change 1, found a few places where fallback usb type
detections were creating false matches, which resulted in say,
bluetooth devices showing up as network devices due to the presence
of the word 'wireless' in the device description. These matches are
all updated and revised to be more accurate and less error prone.
8. Battery: an oversight, had forgotten to have percent used of
available capacity, which made Battery data hard to decipher, now
it shows the percent of available total, as well as the condition
percent, so it's easier to understand the data now, and hopefully
more clear.
9a. OpenBSD changed usbdevs output format sometime in the latest
releases, which made the delicate matching patterns fail. Updated
to handle both variants. They also changed pcidump -v formatting
at some point, now inxi will try to handle either. Note that
usbdevs updates also work fine on NetBSD.
9b. FreeBSD also changed their pciconf output in beta 13.0, which
also broke the detections completely, now checks for old and new
formats. Sigh. It should not take this much work to parse tools
whose output should be consistent and reliable. Luckily I ran
the beta prior to this release, or all pci device detections
would simply have failed, without fallback.
9c. Dragonfly BSD also changed an output format, in vmstat, that
made the RAM used report fail. Since it's clearly not predictable
which BSD will change support for which vmstat options, now just
running vmstat without options, and then using processing logic
to determine what to do with the results.
10. It turns out NetBSD is using /proc/meminfo, who would have
thought? for memory data, but they use it in a weird way that
could result in either negative or near 0 ram used. Added in
some filters to not allow such values to print, now it tries
to make an educated guess about how much ram the system is
really using based on some tests.
11. Something you'd only notice if testing a lot, uptime failed
when the uptime was < 1 minute, it had failed to handle the seconds
only option, now it does, seconds, minutes, hours:minutes,
days hours:minutes, all work.
12. Missed linsysfs type to exclude in partitons, that was a partner
to linprocfs type, both are BSD types.
13. Added -ww to ps arguments, that stops the cutting width to terminal
size default behavior in BSDs, an easy fix, wish I'd known about
that a long time ago.
15. gpart seems to show sizes in bytes, not the expected KiB, so
that's now handled internally. Hopefully that odd behavior won't
randomly change in the future, sigh.
16. Fixed slim dm detection, saw instance where it's got slim.pid
like normal dms, not the slim.lock which inxi was looking for, so
now inxi looks for both, and we're all happy!
------------------------------------------------------------------------
ENHANCEMENTS:
1. Added in something that should have been there all along, now inxi
validates the man page download as well as the self, this avoids
corrupted downloads breaking the man.
2. Init: added support for shepherd init system.
3. Distro Data: added support for guix distro ID; added support for
NomadBSD, GhostBSD, HardenedBSD system base. GhostBSD also shows the main
package version for the distro version ID, which isn't quite the
same as the version you download, but it's close. Also added os-release
support for BSDs, using similar tests as for linux distros, that
results in nicer outputs for example for Dragonfly BSD.
4. Package Data: added guix/scratch [venom]/kiss/nix package managers.
Update for slackware 15 package manager data directory relocation,
now handles either legacy current or future one.
5. Repos: added scratch/kiss/nix-channels; Added GhostBSD, HardenedBSD
pkg repos.
6. USB Data: added usbconfig. That's FreeBSD's, and related systems.
7. Device Data: Added pcictl support, that's NetBSD's, I thought
inxi had supported that, but then I remembered last time I tried to
run netBSD in a vm, I couldn't get it figured out. Now debugged and
working reasonably well.
8. Raspberry Pi 3, 4: ethernet nic now detected; wifi device,
which is on a special mmcnr type, now works, that stopped working in
pi 3, due to the change, now it's handled cleanly. Also added support
for pi bluetooth, which lives on a special serial bus, not usb.
For Raspberry Pi OS, added system base detections, which are tricky.
Also matched mmcnr devices to IF data, which was trickyy as well.
Note that as far as I could discover, only pi puts wifi on mmcnr.
9. Bluetooth: due to deprecated nature of the fine hciconfig
utility, added in support for bt-adapter, which also allows matching
of bluetooth data to device data, but is very sparse in info
supplied compared to hciconfig. bluetoothctl does not have enough
data to show the hci device, so it's not used, since inxi can't
match the bluetooth data to the device (no hci[x]). This should help
the distros that are moving away from hciconfig, in particular,
AUR is only way arch users can get hciconfig, which isn't ideal.
10. New tool and feature, ServiceData, this does two things,
as cross platform as practical, show status of bluetooth service,
this should help a lot in support people debugging bluetooth problems,
since you have bluetooth enabled but down, or up, disabled, and you
can also have the device itself down or up, so now it shows all that
data together for when it's down, but when the device is up, it just
shows the device status since the other stuff is redundant then.
In -Sa, it now shows the OS service manager that inxi detected
using a bunch of fallback tests, that's useful to admins who
are on a machine they don't know, then you can see the service
manager to use, like rc-service, systemctl, service, sv, etc.
11. Big update for -A: Sound Servers: had always been really
just only ALSA, now it shows all detected sound servers, and whether
they are running or not. Includes: ALSA, OSS, PipeWire, PulseAudio,
sndio, JACK. Note that OSS version is a guess, might be wrong source
for the version info.
12. Added USB device 'power:' item, that's in mA, not a terrible
thing to have listed, -xxx. This new feature was launched cross
platform, which is nice. Whether the BSD detections will break
in the future of course depends on whether they change the output
formats again or not. Also added in USB more chip IDs, which can
be useful. For BSDs, also added in a synthetic USB rev, taken
from the device/hub speeds. Yes, I know, USB 2 can have low speed,
full speed, or high speed, and 1.1 can have low and full speeds,
so you actually can't tell the USB revision version from the speeds,
but it's close enough.
13. Made all USB/Device data the same syntax and order, more
predictable, bus, chip, class IDs all the same now.
14. Added in support for hammer and null/nullfs file system types,
which trigger 'logical:' type device in partitions, that's also
more correct than the source: Err-102 that used to show, which
was really just a flag to alert me visibly that the partition
type detection had simply failed internally. Now for detected
types, like zfs tank/name or null/nullfs, it knows they are
logical structures.
15. Expanded BSD CPU data, where available, now can show L1/L2/
L3 cache, cpu arch, stepping, family/model ids, etc, which is
kind of nifty, although, again, delicate fragile rules that
will probably break in the future, but easier to fix now.
16. By an old request, added full native BSD doas support.
That's a nice little tool, and it plugged in fairly seamlessly
to existing sudo support. Both the internal doas/sudo stuff
should work the same, and the detection of sudo/doas start
should work the same too.
17a. Shell/Parent Data: Big refactor of the shell start/parent logic,
into ShellData which helped resolve some issues with running-in
showing shell name, not vt terminal or program name. Cause of that
is lots of levels of parents before inxi could reach the actual
program that was running inxi. Solution was to change to a longer
loop, and let it iterate 8 times, until it finds something that is
not a shell or sudo/doas/su type parent, this seems to work quite
well, you can only make it fail now if you actually try to do it on
purpose, which is fine.
This was very old logic, and carried some mistakes and
redundancies that made it very hard to understand, that's cleaned
up now. Also restored the old (login) value, which shows
when you use your normal login account on console, some system
will also now show (sudo,login) if the login user sudos inxi,
but that varies system to system.
17b. BSD running-in: Some of the BSDs now support the -f flag
for ps, which made the parent logic for running-in possible for
BSDs, which was nice. Some still don't support it, like OpenBSD
and NetBSD, but that's fine, inxi tests, and if no support detected,
just shows tty number. Adding in more robust support here cleaned
up some redundant logic internally as well.
17c. Updated terminal and shell ID detections, there's quite a few
new terminals this year, and a new shell or two. Those are needed
for more reliable detections of when the parent is NOT a shell,
which is how we find what it is.
18. Added ctwm wm support, that's the new default for NetBSD,
based on twm, has version numbers.
19. Upgraded BSD support for gpart and glabel data, now should
catch more more often.
20. For things like zfs raid, added component size, that doesn't
always work due to how zfs refers to its components, but it often
does, which is better than never before.
21. To make BSD support smoother, got rid of some OpenBSD only
rules, which in fact often apply to NetBSD as well. That may
lead to some glitches, but overall it's better to totally stay
away from OpenBSD only tests, and all BSD variant tests, and
just do dynamic testing that will work when it applies, and
not when it doesn't. In this case, added ftp downloader support
for netBSD by removing the openBSD only flag for that item.
There's a bit of a risk there in a sense since if different ftp
programs with different options were to be the fallback for something
else, it might get used, but that's fine, it's a corner case, better
to have them all work now than to worry about weird future things.
But limiting it to only BSDs should get rid of most of the problem.
vmstat and optical drive still use net/openbsd specifics because
it is too tricky to figure out it out in any more dynamic way.
22. For -Sxxx, added if systemd, display, virtual terminal number.
Could be useful to debug subtle issues, if the user is for example
not running their desktop in vt 7, the default for most systems.
------------------------------------------------------------------------
CHANGES:
1. Moved battery voltage to -Bx output, the voltage is quite
important to know since that is the key indicator of battery state.
If voltage is within .5 volts of specified minimum, shows voltage
for -B since that's a prefail condition, it's getting close to
death.
2. In partitions and raid, when the device was linear raid logical
type layout, it said, no-raid, when it should be 'linear', that's
now cleaner and more correct.
3. When running-in is a tty value, it will now show the entire
tty ID, minus the '/dev/tty', this will be more precise, and also
may resolve cases where tty was fully alpha, no numbers, previously
inxi filtered out everything that was not a number, but that can
in some tty types remove critical tty data, so now it will show:
running-in:
tty 2 [not changed]; tty pts/2 [adds pts/]; tty E2 [adds the E];
tty rx [would have not shown at ll before]
------------------------------------------------------------------------
CODE CHANGES:
NOTE: unlike the previous refactors, a lot of these changes were
done to make inxi more maintainable, which means, slightly less
optimized, which has been my preference in the past, but if the
stuff can't be maintained, it doesn't matter how fast it runs!
These changes have really enhanced the quality of the code and
made it a lot easier to work with. It's also now a lot easier to
add debuggers, force/fake data switches, etc, so it gets done,
unlike before, when it was a pain, so it got skipped, and then
caused bugs because of stray debuggers left in place, and so on.
The bright side is while reading up on this, I learned that using
very large subs is much more efficient than many small ones,
which I've always felt was the case, and it is, so the style
used internally in inxi proves to be the best one for optimizations.
These refactors, ongoing, have now touched at least 1/3, almost
1/2, of the entire inxi codebase, so the stuff is getting more
and more consistent and up to date, but given how old the logic
is in places, there will be more refactors in the future, and
maybe once the code is easier to maintain, some renewed
optimizations!, if we can find anything that makes sense, like
passing array/hash references back to the caller, already the
first half is done, passing references to the sub/method always.
The second part is started, using the Benchmark Perl module,
which really speeds up testing and helps avoid pointless tweaks
that do little re speed improvements.
I could see with some care some areas where working on data
directly via references could really speed things up, but it's
hard to write and read that type of code, but it's already being
done in the recursive data and output logics, and a few other
places.
1. Large refactor of USBData, that was done in part to help make
it work for BSDs better, but also to get it better organized.
This refactor also made all the device items, like -A,-G,-N,-E
use the same methods for creating USB output, previously they
had used a hodgepodge of methods, some super old, it was not
possible to add USB support more extensively for BSDs without
this change.
Also added in some fallback usb type detection tools using
several large online collections of that info to see what possible
matching patterns could catch more devices and correctly match
them to their type, which is the primary way now that usb output
per type is created. This really helps with BSDs, though BSD
usb utilities suffer from less data than lsusb so they don't always
get device name strings in a form where they can be readily ID'ed,
but it's way better than it was before, so that's fine!
Moved all previous methods of detecting if a card/device was USB
into USBData itself so it would all be in one place, and easier
to maintain.
All USB tools now use bus_id_alpha for sorting, and all now
sort as well, that was an oversight, previously the BSD usb
tools were not sorted, but those have been enhanced a lot, so
sorting on alpha synthetic bus ids became possible.
Removed lsusb as a BSD option, it's really unreliable, and the data
is different, and also varies a lot, it didn't really work at all
in Dragonfly, or had strange output, so lsusb is now a linux only
item.
2. Moved various booleans that were global to %force, %loaded, and
some to the already present, but lightly used, %use hashes. It was
getting too hard to add tests etc, which was causing bugs to happen.
Yes, using hashes is slower than hardcoding in the boolean scalars,
but this change was done to improve maintainability, which is starting
to matter more.
3. Moved several sets of subs to new packages, again, to help with
debugging and maintainability. MemoryData, redone in part to
handle the oddities with NetBSD reporting of free, cached, and
buffers, but really just to make it easier to work with overall.
Also moved kernel parameter logic to KernelParameters, gpart logic
to GpartData, glabel logic to GlabelData, ip data IpData, check_tools
to CheckTools, which was also enhanced largely, and simplified,
making it much easier to work with.
4. Wrapped more debugger logic in $fake{data} logic, that makes
it harder to leave a debugger uncommented, now to run it, you have
to trigger it with $fake{item} so the test runs, that way even if
I forget to comment it out, it won't run for regular user.
5. Big update to docs in branch inxi-perl/docs, those are now
much more usable for development. Updated in particular
inxi-values.txt to be primary reference doc for $fake, $dbg,
%force, %use, etc types and values. Also updated inxi-optimization.txt
and inxi-resources.txt to bring them closer to the present.
Created inxi-bugs.txt as well, which will help to know which known
bugs belonged to which frozen pools. These bugs will only refer
to bugs known to exist in tagged releases in frozen pool distros.
6. For sizes, moved most of the sizing to use main::translate_size,
this is more predictable, though as noted, these types of
changes make inxi a bit slower since it moved stuff out of inline
to using quick expensive sub calls, but it's a lot easier to
maintain, and that's getting to be more important to me now.
7. In order to catch live events, added in dmesg to dmesg.boot data
in BSDs, that's the only way I could find to readily detect
usb flash drives that were plugged in after boot. Another hack,
these will all come back to bite me, but that's fine, the base
is easier to work on and debug now, so if I want to spend time
revisiting the next major version BSD releases, it will be easier
to resolve the next sets of failures.
8. A big change, I learned about the non greedy operator for
regex patterns, ?, as in, .*?(next match rule), it will now
go up only to the next match rule. Not knowing this simple
little thing made inxi use some really convoluted regex to
avoid such greedy patterns. Still some gotchas with ?, like
it ignores following rules that are zero or 1, ? type, and
just treats it as zero instances. But that's easy to work with.
9. Not totally done, but now moved more to having set data
tools set their $loaded{item} value in get data, not externally,
that makes it easier to track the stuff. Only where it makes
sense, but there's a lot of those set/get items, they should
probably all become package/classes, with set/get I think.
10. Optimized reader() and grabber() and set_ps_aux_data(), all
switched from using grep/map to using for loops, that means
inxi doesn't have to go through each array 2x anymore, actually
4x in the case of set_ps_aux_data(). This saved a visible
amount of execution time, I noticed this lag when running
pinxi through NYTProf optimizer, there was a quite visible
time difference between grabber/reader and the subshell
time, these optimizations almost removed that difference,
meaning only the subshell now really takes any time to run.
Optimized url_cleaner and data_cleaner in RepoData, those
now just work directy on the array references, no returns.
Ran some more optimization tests, but will probably hold off
on some of them, for example, using cleaner() by reference is
about 50% faster than by copy, but redoing that requires
adding in many copies from read only things like $1, so
the change would lead to slightly less clean code, but may
revisit this in the future, we'll see.
But in theory, basically all the core internal tools that
take a value and modify it should do that by reference
purely since it's way faster, up to 10x.
-----------------------------------
-- Harald Hope - Mon, 15 Mar 2021 18:42:04 -0700
===================================================================================== =====================================================================================
Version: 3.3.01 Version: 3.3.01
Patch: 00 Patch: 00