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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2. A smattering of disk vendors added.

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

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

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

Now it reports a much more logical:

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

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

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

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

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

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

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

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

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

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

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

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

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

294
inxi
View file

@ -46,8 +46,8 @@ use POSIX qw(ceil uname strftime ttyname);
## INXI INFO ##
my $self_name='inxi';
my $self_version='3.3.05';
my $self_date='2021-07-11';
my $self_version='3.3.06';
my $self_date='2021-07-21';
my $self_patch='00';
## END INXI INFO ##
@ -79,8 +79,8 @@ my (@app,@dmi,@gpudata,@ifs,@ifs_bsd,@paths,@ps_aux,@ps_cmd,@ps_gui,
@sensors_exclude,@sensors_use,@uname);
## Disk/Logical/Partition/RAID arrays
my (@glabel,@labels,@lsblk,@lvm,@lvm_raid,@md_raid,@partitions,@proc_partitions,
@raw_logical,@soft_raid,@swaps,@uuids,@zfs_raid);
my (@btrfs_raid,@glabel,@labels,@lsblk,@lvm,@lvm_raid,@md_raid,@partitions,
@proc_partitions,@raw_logical,@soft_raid,@swaps,@uuids,@zfs_raid);
## Debuggers
my %debugger = ('level' => 0);
@ -357,6 +357,9 @@ sub set_commands {
$commands{'blockdev'} = ['missing','linux','',''];
$commands{'lsblk'} = ['missing','linux','',''];
}
if ($use{'btrfs'}){
$commands{'btrfs'} = ['missing','linux','',''];
}
if ($use{'mdadm'}){
$commands{'mdadm'} = ['missing','linux','',''];
}
@ -609,7 +612,6 @@ sub set_user_paths {
$self_path = $0;
$self_path =~ s/[^\/]+$//;
# print "0: $0 sp: $self_path\n";
if (defined $ENV{'XDG_CONFIG_HOME'} && $ENV{'XDG_CONFIG_HOME'}){
$user_config_dir=$ENV{'XDG_CONFIG_HOME'};
$b_conf=1;
@ -1669,6 +1671,7 @@ sub disk_data {
copy_files(\@files, 'disk');
my @cmds = (
['blockdev', '--report'],
['btrfs', 'fi show'],
['btrfs', 'filesystem show'],
['btrfs', 'filesystem show --mounted'],
# ['btrfs', 'filesystem show --all-devices'],
@ -1713,8 +1716,11 @@ sub disk_data {
['lsblk', '-r'],
['lsblk', '-r --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS'],
['lsblk', '-rb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS'],
['lsblk', '-rb --output NAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,SERIAL,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS,MAJ:MIN,PKNAME'],
['lsblk', '-Pb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE'],
['lsblk', '-Pb --output NAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,SERIAL,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS'],
# this should always be the live command used internally:
['lsblk', '-bP --output NAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,SERIAL,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS,MAJ:MIN,PKNAME'],
['lvdisplay', '-c'],
['lvdisplay', '-cv'],
['lvdisplay', '-cv --segments'],
@ -4494,9 +4500,7 @@ sub get {
$show{'short'} = 0;
$show{'usb'} = 1; },
'l|labels|label' => sub {
$show{'short'} = 0;
$show{'label'} = 1;
$show{'partition'} = 1; },
$show{'label'} = 1;},
'limit:i' => sub {
my ($opt,$arg) = @_;
if ($arg != 0){
@ -4592,8 +4596,6 @@ sub get {
main::error_handler('bad-arg',$opt,$arg);
} },
'u|uuid' => sub {
$show{'short'} = 0;
$show{'partition'} = 1;
$show{'uuid'} = 1;},
'v|verbosity:i' => sub {
my ($opt,$arg) = @_;
@ -4894,8 +4896,8 @@ sub get {
my ($opt,$arg) = @_;
if ($arg){
my $wl = 'bluetooth|compiler|cpu|dboot|dmidecode|ipmi|logical|pciconf|';
$wl .= 'pcictl|pcidump|raid-hw|raid-lvm|raid-md|raid-soft|raid-zfs|';
$wl .= 'sensors|sysctl|uptime|usbconfig|usbdevs|vmstat|xorg-log';
$wl .= 'pcictl|pcidump|raid-btrfs|raid-hw|raid-lvm|raid-md|raid-soft|';
$wl .= 'raid-zfs|sensors|sysctl|uptime|usbconfig|usbdevs|vmstat|xorg-log';
for (split(',',$arg)){
if ($_ =~ /\b($wl)\b/){
$fake{lc($1)} = 1;
@ -5083,6 +5085,10 @@ sub post_process {
main::error_handler('bad-arg', '--output', '--output-file not provided');
}
}
if (($show{'label'} || $show{'uuid'}) && !$show{'partition'} &&
!$show{'partition-full'} && !$show{'swap'} && !$show{'unmounted'}){
main::error_handler('bad-arg', '-l/-u', 'missing required option(s) -j, -o, -p, -P');
}
$show{'graphic-basic'} = 0 if $b_admin;
if ($use{'sensors-default'}){
@sensors_exclude = ();
@ -5095,6 +5101,7 @@ sub post_process {
}
if ($show{'raid'} || $show{'disk'} || $show{'disk-total'} || $show{'disk-basic'}
|| $show{'unmounted'}){
$use{'btrfs'} = 1;
$use{'mdadm'} = 1;
}
if ($b_admin && $show{'disk'}){
@ -5274,8 +5281,7 @@ sub show_options {
IRC client or shell type, $self_name version." ],
['1', '-j', '--swap', "Swap in use. Includes ${partition_string}s, zram, file." ],
['1', '-J', '--usb', "Show USB data: Hubs and Devices." ],
['1', '-l', '--label', "$partition_string_u labels. Triggers -P.
For full -p output, use -pl." ],
['1', '-l', '--label', "$partition_string_u labels. Use with -j, -o, -p, -P." ],
['1', '-L', '--logical', "Logical devices, LVM (VG, LV),
LUKS, Crypto, bcache, etc. Shows components/devices, sizes, etc." ],
['1', '-m', '--memory', "Memory (RAM) data. Requires root. Numbers of
@ -5319,8 +5325,7 @@ sub show_options {
of processes for each type (default: 5; if in IRC, max: 5). " ],
['1', '', '', "Make sure that there is no space between letters and
numbers (e.g.^-t^cm10)." ],
['1', '-u', '--uuid', "$partition_string_u UUIDs. Triggers -P. For full -p
output, use -pu." ],
['1', '-u', '--uuid', "$partition_string_u UUIDs. Use with -j, -o, -p, -P." ],
['1', '-v', '--verbosity', "Set $self_name verbosity level (0-8).
Should not be used with -b or -F. Example: $self_name^-v^4" ],
['2', '0', '', "Same as: $self_name" ],
@ -5508,7 +5513,7 @@ sub show_options {
['2', '-B', '', "Chemistry, cycles, location (if available)." ],
['2', '-C', '', "CPU voltage, external clock speed (if root and dmidecode installed)." ],
['2', '-D', '', "Firmware rev. if available; partition scheme, in some cases; disk
rotation speed/SSD (if detected)." ],
type, rotation rpm (if available)." ],
['2', '-E', '', "Serial number, class ID, HCI version and revision." ],
['2', '-G', '', "Serial number, class ID." ],
['2', '-I', '', "For 'Shell:' adds ([doas|su|sudo|login]) to shell name if present;
@ -8521,7 +8526,8 @@ sub cpuinfo_data {
}
}
elsif (!$cpu{'family'} &&
($line[0] eq 'architecture' || $line[0] eq 'cpu family' || $line[0] eq 'cpu architecture' )){
($line[0] eq 'architecture' || $line[0] eq 'cpu family' ||
$line[0] eq 'cpu architecture')){
if ($line[1] =~ /^\d+$/){
# translate integers to hex
$cpu{'family'} = uc(sprintf("%x", $line[1]));
@ -8530,7 +8536,8 @@ sub cpuinfo_data {
$cpu{'arch'} = $line[1];
}
}
elsif (!defined $cpu{'stepping'} && ($line[0] eq 'stepping' || $line[0] eq 'cpu revision')){
elsif (!defined $cpu{'stepping'} && ($line[0] eq 'stepping' ||
$line[0] eq 'cpu revision')){
$cpu{'stepping'} = uc(sprintf("%x", $line[1]));
}
# ppc
@ -8546,13 +8553,15 @@ sub cpuinfo_data {
$cpu{'model_id'} =~ s/^0X//;
}
# cpu can show in arm
elsif (!$cpu{'model_name'} && ( $line[0] eq 'model name' || $line[0] eq 'cpu' || $line[0] eq 'cpu model' )){
elsif (!$cpu{'model_name'} && ($line[0] eq 'model name' ||
$line[0] eq 'cpu' || $line[0] eq 'cpu model')){
$cpu{'model_name'} = main::cleaner($line[1]);
$cpu{'model_name'} = cpu_cleaner($cpu{'model_name'});
if ($b_arm || $line[1] =~ /ARM|AArch/i){
$b_arm = 1;
$cpu{'type'} = 'arm';
if ($cpu{'model_name'} && $cpu{'model_name'} =~ /(.*)\srev\s([\S]+)\s(\(([\S]+)\))?/){
if ($cpu{'model_name'} &&
$cpu{'model_name'} =~ /(.*)\srev\s([\S]+)\s(\(([\S]+)\))?/){
$cpu{'model_name'} = $1;
$cpu{'stepping'} = $2;
if ($4){
@ -9530,7 +9539,8 @@ sub set_cpu_speeds_sys {
# policy4/cpuinfo_min_freq:["200000"]
if ((scalar @max_freq < 2 && scalar @min_freq < 2) &&
(defined $speeds{'min-freq'} && defined $speeds{'max-freq'}) &&
($speeds{'min-freq'} > $speeds{'max-freq'} || $speeds{'min-freq'} == $speeds{'max-freq'} )){
($speeds{'min-freq'} > $speeds{'max-freq'} ||
$speeds{'min-freq'} == $speeds{'max-freq'})){
$speeds{'min-freq'} = 0;
}
}
@ -10267,9 +10277,12 @@ sub drive_output {
$rows[$j]->{main::key($num++,0,2,'speed')} = $row->{'speed'};
$rows[$j]->{main::key($num++,0,2,'lanes')} = $row->{'lanes'} if $row->{'lanes'};
}
if ($extra > 2 && ($row->{'rotation'} || $row->{'drive-type'})){
$row->{'rotation'} = $row->{'drive-type'} if !$row->{'rotation'};
$rows[$j]->{main::key($num++,0,2,'rotation')} = $row->{'rotation'};
if ($extra > 2){
$row->{'drive-type'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'type')} = $row->{'drive-type'};
if ($row->{'rotation'}){
$rows[$j]->{main::key($num++,0,2,'rpm')} = $row->{'rotation'};
}
}
if ($extra > 1){
if (!$row->{'serial'} && $alerts{'bioctl'} &&
@ -10365,12 +10378,12 @@ sub drive_data {
my ($used) = (0);
PartitionItem::set_partitions() if !$loaded{'set-partitions'};
RaidItem::raid_data() if !$loaded{'raid'};
# see docs/inxi-data.txt PARTITION DATA for more on remote/fuse fs
my $fs_skip = PartitionItem::fs_excludes('disk-used');
foreach my $row (@partitions){
# don't count remote used, also, some cases mount
# panfs is parallel NAS volume manager, need more data
# null is hammer fs slice; nfs, nfs4
next if ($row->{'fs'} && $row->{'fs'} =~ /^(cifs|iso9660|nfs\d{0,2}|null|overlay|panfs|sshfs|smbfs|unionfs)$/);
# don't count zfs or file type swap
# don't count remote/distributed/union type fs towards used
next if ($row->{'fs'} && $row->{'fs'} =~ /^(fuse(blk)?[\._-]?)?($fs_skip)$/);
# don't count non partition swap
next if ($row->{'swap-type'} && $row->{'swap-type'} ne 'partition');
# in some cases, like redhat, mounted cdrom/dvds show up in partition data
next if ($row->{'dev-base'} && $row->{'dev-base'} =~ /^sr[0-9]+$/);
@ -10619,7 +10632,7 @@ sub proc_data_advanced {
$pt_cmd = $data[0];
$drives->[$i]{'partition-table'} = uc($data[1]) if $data[1];
if ($data[2]){
$drives->[$i]{'rotation'} = "$data[2] rpm";
$drives->[$i]{'rotation'} = $data[2];
$drives->[$i]{'drive-type'} = 'HDD';
}
elsif (($block_type && $block_type ne 'sdx') ||
@ -10898,6 +10911,7 @@ sub smartctl_data {
elsif ($split[$a] eq 'Rotation Rate'){
if ($split[$r] !~ /^Solid/){
$data->[$i]{'rotation'} = $split[$r];
$data->[$i]{'rotation'} =~ s/\s*rpm$//i;
$data->[$i]{'drive-type'} = 'HDD';
}
else {
@ -11523,7 +11537,7 @@ sub set_vendors {
# supertalent also has FM: |FM
['^(G[\.]?SKILL)','^G[\.]?SKILL','G.SKILL',''],
['^G[\s-]*Tech','^G[\s-]*Technology','G-Technology',''],
['^(Haajan|HS[1-9])','^Haajan','Haajan',''],
['^(Hajaan|HS[1-9])','^Haajan','Haajan',''],
['^Haizhide','^Haizhide','Haizhide',''],
['^(Hama|FlashPen\s?Fancy)','^Hama','Hama',''],
['^HDC','^HDC\b','HDC',''],
@ -11581,6 +11595,8 @@ sub set_vendors {
# LENSE30512GMSP34MEAT3TA / UMIS RPITJ256PED2MWX
['^(LEN|UMIS)','^Lenovo','Lenovo',''],
['^RPFT','','Lenovo O.E.M.',''],
# JAJS300M120C JAJM600M256C JAJS600M1024C JAJS600M256C
['^(Leven|JAJ[MS][1-9])','^Leven','Leven',''],
['^LG\b','^LG','LG',''],
['(LITE[-\s]?ON[\s-]?IT)','LITE[-]?ON[\s-]?IT','LITE-ON IT',''], # LITEONIT_LSS-24L6G
['(LITE[-\s]?ON|^PH[1-9])','LITE[-]?ON','LITE-ON',''], # PH6-CE240-L; CL1-3D256-Q11 NVMe LITEON 256GB
@ -11842,18 +11858,35 @@ sub hdd_temp {
sub hdd_temp_sys {
eval $start if $b_log;
my ($device) = @_;
my ($hdd_temp,$hdd_temp_alt,%sensors,@working);
my ($hdd_temp,$hdd_temp_alt,%sensors,@data,@working);
my ($holder,$index) = ('','');
my $path = Cwd::abs_path("/sys/block/$device");
return if !$path;
# slice out the part of path that gives us hwmon
$path =~ s%/(block|nvme)/.*$%%;
return if ! -e "$path/hwmon/";
# we don't want these: crit|max|min|lowest|highest
my $path = "/sys/block/$device/device";
my $path_trimmed = Cwd::abs_path("/sys/block/$device");
# slice out the part of path that gives us hwmon in earlier kernel drivetemp
$path_trimmed =~ s%/(block|nvme)/.*$%% if $path_trimmed;
print "device: $device path: $path\n path_trimmed: $path_trimmed\n" if $dbg[21];
return if ! -e $path && (!$path_trimmed || ! -e "$path_trimmed/hwmon");
# first type, trimmed block,nvme (ata and nvme), 5.9 kernel:
# /sys/devices/pci0000:10/0000:10:08.1/0000:16:00.2/ata8/host7/target7:0:0/7:0:0:0/hwmon/hwmon5/
# /sys/devices/pci0000:10/0000:10:01.2/0000:13:00.0/hwmon/hwmon0/ < nvme
# /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/hwmon/hwmon3/
# second type, 5.10+ kernel:
# /sys/devices/pci0000:20/0000:20:03.1/0000:21:00.0/nvme/nvme0/nvme0n1/device/hwmon1
# /sys/devices/pci0000:00/0000:00:08.1/0000:0b:00.2/ata12/host11/target11:0:0/11:0:0:0/block/sdd/device/hwmon/hwmon1
# we don't want these items: crit|max|min|lowest|highest
# original kernel 5.8/9 match for nvme and sd, 5.10+ match for sd
if (-e "$path_trimmed/hwmon/"){
@data = main::globber("$path_trimmed/hwmon/hwmon*/temp*_{input,label}");
}
# this case only happens if path_trimmed case isn't there, but leave in case
elsif (-e "$path/hwmon/"){
@data = main::globber("$path/hwmon/hwmon*/temp*_{input,label}");
}
# current match for nvme, but fails for 5.8/9 kernel nvme
else {
@data = main::globber("$path/hwmon*/temp*_{input,label}");
}
# seeing long lag to read temp input files for some reason
# on some systems, just one one of them.
my @data = main::globber("$path/hwmon/hwmon*/temp*_{input,label}");
# print "device: $device\n";
foreach (sort @data){
# print "file: $_\n";
# print(main::reader($_,'',0),"\n");
@ -14954,6 +14987,7 @@ sub create_output {
else {
@partitions = sort { $a->{$show{'partition-sort'}} <=> $b->{$show{'partition-sort'}} } @partitions;
}
my $fs_skip = fs_excludes('label-uuid');
foreach my $row (@partitions){
$num = 1;
next if $row->{'type'} eq 'secondary' && $show{'partition'};
@ -15010,15 +15044,21 @@ sub create_output {
$rows[$j]->{main::key($num++,0,3,'mapped')} = $row->{'dev-mapped'};
}
# add fs known to not use label/uuid here
if (($dev_type eq 'dev' && $fs !~ /^(ffs)$/) ||
$row->{'label'} || $row->{'uuid'}){
if (($show{'label'} || $show{'uuid'}) &&
$dev_type eq 'dev' && $fs !~ /^(fuse(blk)?[\._-]?)?($fs_skip)$/){
if ($show{'label'}){
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '') if $use{'filter-label'};
$rows[$j]->{main::key($num++,0,2,'label')} = ($row->{'label'}) ? $row->{'label'}: 'N/A';
if ($use{'filter-label'}){
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '');
}
$row->{'label'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'label')} = $row->{'label'};
}
if ($show{'uuid'}){
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '') if $use{'filter-uuid'};
$rows[$j]->{main::key($num++,0,2,'uuid')} = ($row->{'uuid'}) ? $row->{'uuid'}: 'N/A';
if ($use{'filter-uuid'}){
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '');
}
$row->{'uuid'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'uuid')} = $row->{'uuid'};
}
}
}
@ -15194,7 +15234,7 @@ sub set_partitions {
$fs = ($b_fs) ? $row[1]: get_mounts_fs($row[0],\@mount);
}
# assuming that all null/nullfs are parts of a logical fs
$b_logical = 1 if $fs && $fs =~ /^(hammer|null|zfs)/;
$b_logical = 1 if $fs && $fs =~ /^(btrfs|hammer|null|zfs)/;
$id = join(' ', @row[$cols .. $#row]);
$size = $row[$cols - $back_size];
if ($b_admin && -e "/sys/block/"){
@ -15290,6 +15330,9 @@ sub swap_data {
$swappiness = $data[0];
$cache_pressure = $data[1];
}
if (($show{'label'} || $show{'uuid'}) && !$loaded{'label-uuid'}){
set_label_uuid();
}
$pattern1 = 'partition|file|ram';
$pattern2 = '[^\s].*[^\s]';
}
@ -15458,13 +15501,31 @@ sub check_partition_data {
# all here for: subs partitiion_data(), check_partition_data()
# note: p_d filters 'filesystem', and c_p_d filters against fs
sub partition_filters {
my $filters = 'aufs|cgroup.*|cgmfs|configfs|debugfs|\/dev|dev|';
$filters .= '\/dev\/loop[0-9]*|devfs|devtmpfs|fdescfs|iso9660|';
$filters .= 'kernfs|linprocfs|linsysfs|none|overla(id|y)|procfs|ptyfs|';
$filters .= '/run(\/.*)?|run|shm|squashfs|swap|sys|\/sys\/.*|sysfs|';
$filters .= 'tmpfs|type|udev|unionfs|vartmp';
# snap mounts with squashfs; appimage/flatpak mount?
# swap is set in swap_data(); cgmfs is in ram, like devfs, sysfs;
# union fs types: aufs, overlayfs, unionfs, mergerfs
my $filters = 'aufs|cgroup.*|cgmfs|configfs|debugfs|\/dev|dev|\/dev\/loop[0-9]*|';
$filters .= 'devfs|devtmpfs|efivarfs|fdescfs|hugetlbfs|iso9660|kernfs|';
$filters .= 'linprocfs|linsysfs|none|overla(id|y)(fs)?|procfs|ptyfs|';
$filters .= '/run(\/.*)?|run|securityfs|shm|squashfs|swap|sys|\/sys\/.*|sysfs|';
$filters .= 'tmpfs|tracefs|type|udev|unionfs|vartmp';
return $filters
}
# used to exclude disk used, partition/unmounted/swap label/uuid, unmounted label/uuid
# see docs/inxi-data.txt PARTITION DATA for more on remote/fuse fs
sub fs_excludes {
my ($source) = @_;
# panfs is parallel NAS volume manager, need more data
# null is hammer fs slice; nfs/nfs3/nfs4; some can be fuse mounts: fuse.sshfs
my $excludes = 'afs|archivemount(fs)?|aufs|avfs|ceph|cifs|gfs\d{0,2}|glusterfs|';
$excludes .= 'gmailfs|hdfs|ipfs|iso9660||k(osmos)?fs|.*lafs|mhddfs|mergerfs|';
$excludes .= 'moosefs|nfs\d{0,2}|null(fs)?|ocfs\d{0,2}|openafs|orangefs|';
$excludes .= 'overla(id|y)(fs)?|panfs|pvfs\d{0,2}|s3fs|sheepdog|squashfs|';
$excludes .= 'sshfs|smbfs|unionfs|vmfs';
# for non disk used excludes
$excludes .= '|ffs|fuse(blk)?' if $source eq 'label-uuid';
return $excludes;
}
sub get_mounts_fs {
eval $start if $b_log;
my ($item,$mount) = @_;
@ -15484,7 +15545,6 @@ sub get_mounts_fs {
$fs = $1;
last;
}
}
eval $end if $b_log;
main::log_data('data',"fs: $fs") if $b_log;
@ -15500,7 +15560,7 @@ sub set_label_uuid {
if (-d '/dev/disk/by-uuid'){
@uuids = main::globber('/dev/disk/by-uuid/*');
}
main::log_data('dump', '@lebels', \@labels) if $b_log;
main::log_data('dump', '@labels', \@labels) if $b_log;
main::log_data('dump', '@uuids', \@uuids) if $b_log;
}
eval $end if $b_log;
@ -15790,10 +15850,12 @@ sub get {
my $num = 0;
@hardware_raid = hw_data() if $use{'hardware-raid'} || $fake{'raid-hw'};
raid_data() if !$loaded{'raid'};
# print 'get: ', Data::Dumper::Dumper \@lvm_raid;
# print 'get: ', Data::Dumper::Dumper \@md_raid;
# print 'get: ', Data::Dumper::Dumper \@zfs_raid;
if (!@lvm_raid && !@md_raid && !@zfs_raid && !@soft_raid && !@hardware_raid){
# print 'get btrfs: ', Data::Dumper::Dumper \@btrfs_raid;
# print 'get lvm: ', Data::Dumper::Dumper \@lvm_raid;
# print 'get md: ', Data::Dumper::Dumper \@md_raid;
# print 'get zfs: ', Data::Dumper::Dumper \@zfs_raid;
if (!@btrfs_raid && !@lvm_raid && !@md_raid && !@zfs_raid && !@soft_raid &&
!@hardware_raid){
if ($show{'raid-forced'}){
$key1 = 'Message';
$val1 = main::row_defaults('raid-data');
@ -15803,6 +15865,9 @@ sub get {
if (@hardware_raid){
push(@rows,hw_output(\@hardware_raid));
}
if (@btrfs_raid){
push(@rows,btrfs_output());
}
if (@lvm_raid){
push(@rows,lvm_output());
}
@ -15861,6 +15926,23 @@ sub hw_output {
# print Data::Dumper::Dumper \@rows;
return @rows;
}
sub btrfs_output {
eval $start if $b_log;
my (@components,@good,@rows);
my ($size);
my ($j,$num) = (0,0);
foreach my $row (sort {$a->{'id'} cmp $b->{'id'}} @btrfs_raid){
$j = scalar @rows;
$rows[$j]->{main::key($num++,1,2,'Components')} = '';
my $b_bump;
components_output('lvm','Online',\@rows,\@good,\$j,\$num,\$b_bump);
components_output('lvm','Meta',\@rows,\@components,\$j,\$num,\$b_bump);
}
eval $end if $b_log;
# print Data::Dumper::Dumper \@rows;
return @rows;
}
sub lvm_output {
eval $start if $b_log;
my (@components,@good,@components_meta,@rows);
@ -16227,7 +16309,10 @@ sub components_output {
my ($type,$item,$rows_ref,$array_ref,$j_ref,$num_ref,$b_bump_ref) = @_;
return if !@$array_ref && $item ne 'Online';
my ($extra1,$extra2,$f1,$f2,$f3,$f4,$f5,$k,$k1,$key1,$l1,$l2,$l3);
if ($type eq 'lvm'){
if ($type eq 'btrfs'){
}
elsif ($type eq 'lvm'){
($f1,$f2,$f3,$f4,$f5,$l1,$l2,$l3) = (1,2,3,4,5,3,4,5);
$k = 1;
$extra1 = 'mapped';
@ -16291,6 +16376,10 @@ sub raid_data {
PartitionData::set() if !$bsd_type && !$loaded{'partition-data'};
my (@data);
$loaded{'raid'} = 1;
if ($fake{'raid-btrfs'} ||
($alerts{'btrfs'}->{'action'} && $alerts{'btrfs'}->{'action'} eq 'use')){
@btrfs_raid = btrfs_data();
}
if ($fake{'raid-lvm'} ||
($alerts{'lvs'}->{'action'} && $alerts{'lvs'}->{'action'} eq 'use')){
@lvm_raid = lvm_data();
@ -16349,6 +16438,22 @@ sub hw_data {
eval $end if $b_log;
return @hardware_raid;
}
sub btrfs_data {
eval $start if $b_log;
my (@btraid,@working);
if ($fake{'raid-btrfs'}){
}
else {
}
print Data::Dumper::Dumper \@working if $dbg[37];
print Data::Dumper::Dumper \@btraid if $dbg[37];
main::log_data('dump','@lvraid',\@btraid) if $b_log;
eval $end if $b_log;
return @btraid;
}
sub lvm_data {
eval $start if $b_log;
LogicalItem::lvm_data() if !$loaded{'logical-data'};
@ -16402,7 +16507,7 @@ sub lvm_data {
'vg-used' => $vg_used,
});
}
# print Data::Dumper::Dumper \@lvraid;
print Data::Dumper::Dumper \@lvraid if $dbg[37];
main::log_data('dump','@lvraid',\@lvraid) if $b_log;
eval $end if $b_log;
return @lvraid;
@ -16558,7 +16663,7 @@ sub md_data {
$mdraid[0]->{'supported-levels'} = $system if $system;
$mdraid[0]->{'unused'} = $unused if $unused;
}
# print Data::Dumper::Dumper \@mdraid;
print Data::Dumper::Dumper \@mdraid if $dbg[37];
eval $end if $b_log;
return @mdraid;
}
@ -16796,7 +16901,7 @@ sub zfs_data {
# third is using /dev/disk/by-id
# ata-VBOX_HARDDISK_VB5b6350cd-06618d58 - - - - - - - - ONLINE
elsif ($row[1] =~ /^(sd[a-z]+|[a-z0-9]+[0-9]+|([\S]+)\/.*|(ata|mmc|nvme|pci|scsi|wwn)-\S+)$/ &&
($row[2] eq '-' || $row[2] =~ /^[0-9\.]+[MGTP]$/)){
($row[2] eq '-' || $row[2] =~ /^[0-9\.]+[MGTPE]$/)){
#print "r1:$row[1]",' :: ', Cwd::abs_path('/dev/disk/by-id/'.$row[1]), "\n";
$row[1] =~ /^(sd[a-z]+|[a-z0-9]+[0-9]+|([\S]+)\/.*|(ata|mmc|nvme|pci|scsi|wwn)-\S+)\s.*?(DEGRADED|FAULTED|OFFLINE)?$/;
#my $working = '';
@ -19974,12 +20079,18 @@ sub create_output {
$rows[$j]->{main::key($num++,0,3,'mapped')} = $row->{'dev-mapped'};
}
if ($show{'label'} && ($row->{'label'} || $row->{'swap-type'} eq 'partition')){
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '') if $use{'filter-label'};
$rows[$j]->{main::key($num++,0,2,'label')} = ($row->{'label'}) ? $row->{'label'}: 'N/A';
if ($use{'filter-label'}){
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '');
}
$row->{'label'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'label')} = $row->{'label'};
}
if ($show{'uuid'} && ($row->{'uuid'} || $row->{'swap-type'} eq 'partition')){
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '') if $use{'filter-uuid'};
$rows[$j]->{main::key($num++,0,2,'uuid')} = ($row->{'uuid'}) ? $row->{'uuid'}: 'N/A';
if ($use{'filter-uuid'}){
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '');
}
$row->{'uuid'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'uuid')} = $row->{'uuid'};
}
}
eval $end if $b_log;
@ -20048,6 +20159,7 @@ sub create_output {
my (@rows,$fs);
my ($j,$num) = (0,0);
@$unmounted = sort { $a->{'dev-base'} cmp $b->{'dev-base'} } @$unmounted;
my $fs_skip = PartitionItem::fs_excludes('label-uuid');
foreach my $row (@$unmounted){
$num = 1;
my $size = ($row->{'size'}) ? main::get_size($row->{'size'},'string') : 'N/A';
@ -20065,8 +20177,6 @@ sub create_output {
$fs = main::row_defaults('tool-missing-basic','file');
}
}
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '') if $use{'filter-label'};
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '') if $use{'filter-uuid'};
$j = scalar @rows;
push(@rows, {
main::key($num++,1,1,'ID') => "/dev/$row->{'dev-base'}",
@ -20082,11 +20192,23 @@ sub create_output {
$rows[$j]->{main::key($num++,0,2,'size')} = $size;
$rows[$j]->{main::key($num++,0,2,'fs')} = $fs;
# don't show for fs known to not have label/uuid
if ($fs !~ /^(ffs)$/){
if (($show{'label'} || $show{'uuid'}) && $fs !~ /^(fuse(blk)?[\._-]?)?($fs_skip)$/){
if ($show{'label'}){
if ($use{'filter-label'}){
$row->{'label'} = main::apply_partition_filter('part', $row->{'label'}, '');
}
$row->{'label'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'label')} = $row->{'label'};
}
if ($show{'uuid'}){
if ($use{'filter-uuid'}){
$row->{'uuid'} = main::apply_partition_filter('part', $row->{'uuid'}, '');
}
$row->{'uuid'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'uuid')} = $row->{'uuid'};
}
}
}
eval $end if $b_log;
return @rows;
}
@ -20149,7 +20271,7 @@ sub proc_data {
$uuid = PartitionItem::get_uuid("/dev/$row->[-1]") if !$uuid;
}
else {
my @temp = GpartnData::get($row->[-1]);
my @temp = GpartData::get($row->[-1]);
$label = $temp[1] if $temp[1];
$uuid = $temp[2] if $temp[2];
}
@ -20210,7 +20332,7 @@ sub get_mounted {
push(@mounted, $row->{'dev-base'}) if $row->{'dev-base'};
}
# print Data::Dumper::Dumper \@zfs_raid;
foreach my $row ((@lvm_raid,@md_raid,@soft_raid,@zfs_raid)){
foreach my $row ((@btrfs_raid,@lvm_raid,@md_raid,@soft_raid,@zfs_raid)){
# we want to not show md0 etc in unmounted report
push(@mounted, $row->{'id'}) if $row->{'id'};
# print Data::Dumper::Dumper $row;
@ -24270,14 +24392,19 @@ sub set {
eval $start if $b_log;
$loaded{'lsblk'} = 1;
if ($alerts{'lsblk'} && $alerts{'lsblk'}->{'path'}){
my $cmd = $alerts{'lsblk'}->{'path'} . ' -bP --output NAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,';
$cmd .= 'SERIAL,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS,MAJ:MIN,PKNAME 2>/dev/null';
# check to see if lsblk removes : - separators from accepted input syntax
my $cmd = $alerts{'lsblk'}->{'path'} . ' -bP --output NAME,TYPE,RM,FSTYPE,';
$cmd .= 'SIZE,LABEL,UUID,SERIAL,MOUNTPOINT,PHY-SEC,LOG-SEC,PARTFLAGS,';
$cmd .= 'MAJ:MIN,PKNAME 2>/dev/null';
print "cmd: $cmd\n" if $dbg[32];
my @working = main::grabber($cmd);
print Data::Dumper::Dumper \@working if $dbg[32];
# note: lsblk 2.37 changeed - and : to _ in the output.
my $pattern = 'NAME="([^"]*)"\s+TYPE="([^"]*)"\s+RM="([^"]*)"\s+';
$pattern .= 'FSTYPE="([^"]*)"\s+SIZE="([^"]*)"\s+LABEL="([^"]*)"\s+';
$pattern .= 'UUID="([^"]*)"\s+SERIAL="([^"]*)"\s+MOUNTPOINT="([^"]*)"\s+';
$pattern .= 'PHY-SEC="([^"]*)"\s+LOG-SEC="([^"]*)"\s+PARTFLAGS="([^"]*)"\s+';
$pattern .= 'MAJ:MIN="([^"]*)"\s+PKNAME="([^"]*)"';
my @working = main::grabber($cmd);
$pattern .= 'PHY[_-]SEC="([^"]*)"\s+LOG[_-]SEC="([^"]*)"\s+';
$pattern .= 'PARTFLAGS="([^"]*)"\s+MAJ[:_-]MIN="([^"]*)"\s+PKNAME="([^"]*)"';
foreach (@working){
if (/$pattern/){
my $size = ($5) ? $5/1024: 0;
@ -26150,7 +26277,8 @@ sub sys_data {
$usb{'main'}->[$i][8] = $usb_version;
$usb{'main'}->[$i][9] = $interfaces;
$usb{'main'}->[$i][10] = $ports if $ports;
if ($type && $b_hub && (!$usb{'main'}->[$i][13] || $usb{'main'}->[$i][13] =~ /^linux foundation/i )){
if ($type && $b_hub && (!$usb{'main'}->[$i][13] ||
$usb{'main'}->[$i][13] =~ /^linux foundation/i)){
$usb{'main'}->[$i][13] = "$type";
}
$usb{'main'}->[$i][14] = $type if ($type && !$b_hub);
@ -26922,8 +27050,12 @@ sub system_item {
if ($b_admin && (my $params = KernelParameters::get())){
$index = scalar(@{$data{$data_name}});
# print "$params\n";
$params = main::apply_partition_filter('system', $params, 'label') if $use{'filter-label'};
$params = main::apply_partition_filter('system', $params, 'uuid') if $use{'filter-uuid'};
if ($use{'filter-label'}){
$params = main::apply_partition_filter('system', $params, 'label');
}
if ($use{'filter-uuid'}){
$params = main::apply_partition_filter('system', $params, 'uuid');
}
$data{$data_name}->[$index]{main::key($num++,0,2,'parameters')} = $params;
$index = scalar(@{$data{$data_name}});
}

46
inxi.1
View file

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

View file

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