mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, new man. Bug fixes. BSD fixes.
Bugs fixed: 1. CPU: MT/HT was wrong for old xeon, made mt detection more robust and hopefully more reliable, removed all explicit b_xeon based tests. 2. fixed /dev/mapper glitch, that make /dev/mapper links fail to get id'ed. 3. openbsd: fixed memory handler; fixed cpu flags, fixed partitions handling. 4. freebsd: fixed similar partition bugs, these were caused by the darwin patch. 5. man page: fixed top synopis syntax, thanks ESR. 6. partitions fs: fixed possible failures with lsblk fs. lsblk: added debuggers so we can track down this failure in the future. 7. added sshfs filter for disk used output, note, there is a possible syntax for remote fs that isn't handled: AAA:BBB that is, no :/, only the :. This makes explicit detection of still unknown remote fs very difficult since : is a legal nix filename character.
This commit is contained in:
parent
b08a02d066
commit
03d5395a06
156
inxi
156
inxi
|
@ -31,7 +31,7 @@ use POSIX qw(uname strftime ttyname);
|
||||||
|
|
||||||
## INXI INFO ##
|
## INXI INFO ##
|
||||||
my $self_name='inxi';
|
my $self_name='inxi';
|
||||||
my $self_version='3.0.06';
|
my $self_version='3.0.07';
|
||||||
my $self_date='2018-04-17';
|
my $self_date='2018-04-17';
|
||||||
my $self_patch='00';
|
my $self_patch='00';
|
||||||
## END INXI INFO ##
|
## END INXI INFO ##
|
||||||
|
@ -1340,16 +1340,15 @@ sub disk_data {
|
||||||
['lsblk', '-fsr'],
|
['lsblk', '-fsr'],
|
||||||
['lsblk', '-fsP'],
|
['lsblk', '-fsP'],
|
||||||
['lsblk', '-a'],
|
['lsblk', '-a'],
|
||||||
|
['lsblk', '-aP'],
|
||||||
['lsblk', '-ar'],
|
['lsblk', '-ar'],
|
||||||
['lsblk', '-p'],
|
['lsblk', '-p'],
|
||||||
['lsblk', '-pr'],
|
['lsblk', '-pr'],
|
||||||
['lsblk', '-pP'],
|
['lsblk', '-pP'],
|
||||||
['lsblk', '-r'],
|
['lsblk', '-r'],
|
||||||
['lsblk', '-r --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
['lsblk', '-r --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT'],
|
||||||
['lsblk', '-rb --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
['lsblk', '-rb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT'],
|
||||||
['lsblk', '-Pb --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
['lsblk', '-Pb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT'],
|
||||||
['lsblk', '-rb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE'],
|
|
||||||
['lsblk', '-Pb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE'],
|
|
||||||
['gpart', 'list'],
|
['gpart', 'list'],
|
||||||
['gpart', 'show'],
|
['gpart', 'show'],
|
||||||
['gpart', 'status'],
|
['gpart', 'status'],
|
||||||
|
@ -4473,7 +4472,7 @@ sub perl_python_client {
|
||||||
$client{'name'} = 'gribble';
|
$client{'name'} = 'gribble';
|
||||||
$client{'name-print'} = 'Gribble';
|
$client{'name-print'} = 'Gribble';
|
||||||
}
|
}
|
||||||
if ( ( scalar grep { $_ =~ /limnoria/ } @ps_cmd ) > 0){
|
if ( grep { $_ =~ /limnoria/ } @ps_cmd){
|
||||||
$client{'name'} = 'limnoria';
|
$client{'name'} = 'limnoria';
|
||||||
$client{'name-print'} = 'Limnoria';
|
$client{'name-print'} = 'Limnoria';
|
||||||
}
|
}
|
||||||
|
@ -5862,10 +5861,8 @@ sub create_output_full {
|
||||||
main::key($num++,'model') => $cpu{'model_name'},
|
main::key($num++,'model') => $cpu{'model_name'},
|
||||||
},);
|
},);
|
||||||
@rows = (@rows,@data);
|
@rows = (@rows,@data);
|
||||||
#if ($extra > 1){
|
$properties{'bits-sys'} ||= 'N/A';
|
||||||
$properties{'bits-sys'} ||= 'N/A';
|
$rows[$j]{main::key($num++,'bits')} = $properties{'bits-sys'};
|
||||||
$rows[$j]{main::key($num++,'bits')} = $properties{'bits-sys'};
|
|
||||||
#}
|
|
||||||
if ($type){
|
if ($type){
|
||||||
$rows[$j]{main::key($num++,'type')} = $type;
|
$rows[$j]{main::key($num++,'type')} = $type;
|
||||||
}
|
}
|
||||||
|
@ -6009,9 +6006,7 @@ sub prep_short_data {
|
||||||
my (%cpu) = @_;
|
my (%cpu) = @_;
|
||||||
my %properties = cpu_properties(%cpu);
|
my %properties = cpu_properties(%cpu);
|
||||||
my ($cpu,$speed_key,$speed,$type) = ('','speed',0,'');
|
my ($cpu,$speed_key,$speed,$type) = ('','speed',0,'');
|
||||||
if ($cpu{'model_name'}){
|
$cpu = $cpu{'model_name'} if $cpu{'model_name'};
|
||||||
$cpu = $cpu{'model_name'};
|
|
||||||
}
|
|
||||||
$type = $properties{'cpu-type'} if $properties{'cpu-type'};
|
$type = $properties{'cpu-type'} if $properties{'cpu-type'};
|
||||||
$speed_key = $properties{'speed-key'} if $properties{'speed-key'};
|
$speed_key = $properties{'speed-key'} if $properties{'speed-key'};
|
||||||
$speed = $properties{'speed'} if $properties{'speed'};
|
$speed = $properties{'speed'} if $properties{'speed'};
|
||||||
|
@ -6038,7 +6033,6 @@ sub data_cpuinfo {
|
||||||
my ($arch,@ids,@line,$b_first,$b_proc_int,$starter);
|
my ($arch,@ids,@line,$b_first,$b_proc_int,$starter);
|
||||||
# use --arm flag when testing arm cpus
|
# use --arm flag when testing arm cpus
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/arm-4-core-pinebook-1.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/arm-4-core-pinebook-1.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/arm-4-core-pinebook-1.txt";
|
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv6-single-core-1.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv6-single-core-1.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv7-dual-core-1.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv7-dual-core-1.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv7-new-format-model-name-single-core.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/arm/armv7-new-format-model-name-single-core.txt";
|
||||||
|
@ -6047,6 +6041,9 @@ sub data_cpuinfo {
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/2-16-core-epyc-abucodonosor.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/2-16-core-epyc-abucodonosor.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/2-core-probook-antix.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/2-core-probook-antix.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/4-core-jean-antix.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/4-core-jean-antix.txt";
|
||||||
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/4-core-althlon-mjro.txt";
|
||||||
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/4-core-apu-vc-box.txt";
|
||||||
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/amd/4-core-a10-5800k-1.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-core-ht-atom-bruh.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-core-ht-atom-bruh.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/core-2-i3.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/core-2-i3.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/8-core-i7-damentz64.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/8-core-i7-damentz64.txt";
|
||||||
|
@ -6055,6 +6052,7 @@ sub data_cpuinfo {
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-core-i5-fake-dual-die-hek.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-core-i5-fake-dual-die-hek.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-1-core-xeon-vm-vs2017.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/2-1-core-xeon-vm-vs2017.txt";
|
||||||
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/4-1-core-xeon-vps-frodo1.txt";
|
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/4-1-core-xeon-vps-frodo1.txt";
|
||||||
|
$file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/4-6-core-xeon-no-mt-lathander.txt";
|
||||||
my %speeds = set_cpu_speeds_sys();
|
my %speeds = set_cpu_speeds_sys();
|
||||||
my @cpuinfo = main::reader($file);
|
my @cpuinfo = main::reader($file);
|
||||||
my @phys_cpus = (0);# start with 1 always
|
my @phys_cpus = (0);# start with 1 always
|
||||||
|
@ -6266,7 +6264,6 @@ sub data_sysctl {
|
||||||
my (@ids,@line,%speeds,@working);
|
my (@ids,@line,%speeds,@working);
|
||||||
my ($sep) = ('');
|
my ($sep) = ('');
|
||||||
my ($cache,$die_holder,$die_id,$phys_holder,$phys_id,$proc_count,$speed) = (0,0,0,0,0,0,0);
|
my ($cache,$die_holder,$die_id,$phys_holder,$phys_id,$proc_count,$speed) = (0,0,0,0,0,0,0);
|
||||||
|
|
||||||
foreach (@sysctl){
|
foreach (@sysctl){
|
||||||
@line = split /\s*:\s*/, $_;
|
@line = split /\s*:\s*/, $_;
|
||||||
next if ! $line[0];
|
next if ! $line[0];
|
||||||
|
@ -6395,16 +6392,23 @@ sub data_sysctl {
|
||||||
|
|
||||||
sub cpu_properties {
|
sub cpu_properties {
|
||||||
my (%cpu) = @_;
|
my (%cpu) = @_;
|
||||||
my $b_xeon = ($cpu{'model_name'} && $cpu{'model_name'} =~ /Xeon/i) ? 1 : 0;
|
my ($b_amd_zen,$b_epyc,$b_ht,$b_intel,$b_ryzen,$b_xeon);
|
||||||
my ($b_amd_zen,$b_epyc,$b_ht,$b_ryzen);
|
if ($cpu{'type'} ){
|
||||||
if ( $cpu{'type'} && $cpu{'type'} eq 'amd' && $cpu{'family'} && $cpu{'family'} eq '17' ) {
|
if ($cpu{'type'} eq 'intel'){
|
||||||
$b_amd_zen = 1;
|
$b_intel = 1;
|
||||||
if ($cpu{'model_name'} ){
|
$b_xeon = 1 if $cpu{'model_name'} =~ /Xeon/i;
|
||||||
if ($cpu{'model_name'} =~ /Ryzen/i ){
|
}
|
||||||
$b_ryzen = 1;
|
elsif ($cpu{'type'} eq 'amd' ){
|
||||||
}
|
if ( $cpu{'family'} && $cpu{'family'} eq '17' ) {
|
||||||
elsif ($cpu{'model_name'} =~ /EPYC/i){
|
$b_amd_zen = 1;
|
||||||
$b_epyc = 1;
|
if ($cpu{'model_name'} ){
|
||||||
|
if ($cpu{'model_name'} =~ /Ryzen/i ){
|
||||||
|
$b_ryzen = 1;
|
||||||
|
}
|
||||||
|
elsif ($cpu{'model_name'} =~ /EPYC/i){
|
||||||
|
$b_epyc = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6429,10 +6433,8 @@ sub cpu_properties {
|
||||||
#print "p count:$processors_count\n";
|
#print "p count:$processors_count\n";
|
||||||
#print Data::Dumper::Dumper \@processors;
|
#print Data::Dumper::Dumper \@processors;
|
||||||
# $cpu_cores is per physical cpu
|
# $cpu_cores is per physical cpu
|
||||||
my ($cpu_layout,$cpu_type,$min_max,$min_max_key,$cache,$core_count,
|
my ($cpu_layout,$cpu_type,$min_max,$min_max_key) = ('','','','');
|
||||||
$cpu_cores,$die_count) = ('','','','',0,0,0,0);
|
my ($cache,$core_count,$cpu_cores,$die_count) = (0,0,0,0);
|
||||||
my @cores;
|
|
||||||
|
|
||||||
foreach my $die_ref ( @phys ){
|
foreach my $die_ref ( @phys ){
|
||||||
next if ! $die_ref;
|
next if ! $die_ref;
|
||||||
my @dies = @$die_ref;
|
my @dies = @$die_ref;
|
||||||
|
@ -6452,18 +6454,8 @@ sub cpu_properties {
|
||||||
#print 'cores: ' . $core_count, "\n";
|
#print 'cores: ' . $core_count, "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# like, intel core duo
|
|
||||||
# NOTE: sadly, not all core intel are HT/MT, oh well...
|
|
||||||
# if ($b_xeon || $cpu{'model_name'} =~ /intel.*core/i){
|
|
||||||
if ($b_xeon ){
|
|
||||||
$b_ht = 1;
|
|
||||||
}
|
|
||||||
# this covers potentially cases where ARM cpus have > 1 die
|
# this covers potentially cases where ARM cpus have > 1 die
|
||||||
$cpu{'dies'} = ($b_arm && $die_count <= 1 && $cpu{'dies'} > 1) ? $cpu{'dies'}: $die_count;
|
$cpu{'dies'} = ($b_arm && $die_count <= 1 && $cpu{'dies'} > 1) ? $cpu{'dies'}: $die_count;
|
||||||
# Note: for > 1 phys cpu system, the die counts will be wrong
|
|
||||||
if ($phyical_count > 1 && $die_count > 1 ){
|
|
||||||
|
|
||||||
}
|
|
||||||
# this is an attempt to fix the amd family 15 bug with reported cores vs actual cores
|
# this is an attempt to fix the amd family 15 bug with reported cores vs actual cores
|
||||||
# NOTE: amd A6-4400M APU 2 core reports: cores: 1 siblings: 2
|
# NOTE: amd A6-4400M APU 2 core reports: cores: 1 siblings: 2
|
||||||
# NOTE: AMD A10-5800K APU 4 core reports: cores: 2 siblings: 4
|
# NOTE: AMD A10-5800K APU 4 core reports: cores: 2 siblings: 4
|
||||||
|
@ -6475,13 +6467,24 @@ sub cpu_properties {
|
||||||
}
|
}
|
||||||
#print "cpu-c:$cpu_cores\n";
|
#print "cpu-c:$cpu_cores\n";
|
||||||
#$cpu_cores = $cpu{'cores'};
|
#$cpu_cores = $cpu{'cores'};
|
||||||
|
# like, intel core duo
|
||||||
|
# NOTE: sadly, not all core intel are HT/MT, oh well...
|
||||||
# xeon may show wrong core / physical id count, if it does, fix it. A xeon
|
# xeon may show wrong core / physical id count, if it does, fix it. A xeon
|
||||||
# may show a repeated core id : 0 which gives a fake num_of_cores=1
|
# may show a repeated core id : 0 which gives a fake num_of_cores=1
|
||||||
if ($b_xeon && $cpu{'siblings'} > 1){
|
if ($b_intel){
|
||||||
$cpu_cores = ($cpu{'siblings'}/2);
|
if ($cpu{'siblings'} && $cpu{'siblings'} > 1 && $cpu{'cores'} && $cpu{'cores'} > 1 ){
|
||||||
|
if ( $cpu{'siblings'}/$cpu{'cores'} == 1 ){
|
||||||
|
$b_intel = 0;
|
||||||
|
$b_ht = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$cpu_cores = ($cpu{'siblings'}/2);
|
||||||
|
$b_ht = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# ryzen is made out of blocks of 8 core dies
|
# ryzen is made out of blocks of 8 core dies
|
||||||
if ($b_ryzen){
|
elsif ($b_ryzen){
|
||||||
$cpu_cores = $cpu{'cores'};
|
$cpu_cores = $cpu{'cores'};
|
||||||
# note: posix ceil isn't present in Perl for some reason, deprecated?
|
# note: posix ceil isn't present in Perl for some reason, deprecated?
|
||||||
my $working = $cpu_cores / 8;
|
my $working = $cpu_cores / 8;
|
||||||
|
@ -6525,7 +6528,8 @@ sub cpu_properties {
|
||||||
#print "prc: $processors_count phc: $phyical_count coc: $core_count cpc: $cpu_cores\n";
|
#print "prc: $processors_count phc: $phyical_count coc: $core_count cpc: $cpu_cores\n";
|
||||||
if (!$b_arm && $processors_count == $phyical_count*$core_count && $cpu_cores > $core_count){
|
if (!$b_arm && $processors_count == $phyical_count*$core_count && $cpu_cores > $core_count){
|
||||||
$b_ht = 0;
|
$b_ht = 0;
|
||||||
$b_xeon = 0;
|
#$b_xeon = 0;
|
||||||
|
$b_intel = 0;
|
||||||
$cpu_cores = 1;
|
$cpu_cores = 1;
|
||||||
$core_count = 1;
|
$core_count = 1;
|
||||||
$cpu{'siblings'} = 1;
|
$cpu{'siblings'} = 1;
|
||||||
|
@ -6537,16 +6541,16 @@ sub cpu_properties {
|
||||||
# if > 1 processor && processor id (physical id) != core id then Multi-Core Processors (MCP)
|
# if > 1 processor && processor id (physical id) != core id then Multi-Core Processors (MCP)
|
||||||
# if > 1 processor && processor ids (physical id) > 1 then Symmetric Multi Processing (SMP)
|
# if > 1 processor && processor ids (physical id) > 1 then Symmetric Multi Processing (SMP)
|
||||||
# if = 1 processor then single core/processor Uni-Processor (UP)
|
# if = 1 processor then single core/processor Uni-Processor (UP)
|
||||||
if ( $processors_count > 1 || ( $b_xeon && $cpu{'siblings'} > 0 ) ) {
|
if ( $processors_count > 1 || ( $b_intel && $cpu{'siblings'} > 0 ) ) {
|
||||||
# non-multicore MT
|
# non-multicore MT
|
||||||
if ($processors_count == ($phyical_count * $cpu_cores * 2)){
|
if ($processors_count == ($phyical_count * $cpu_cores * 2)){
|
||||||
#print "mt:1\n";
|
#print "mt:1\n";
|
||||||
$cpu_type .= 'MT';
|
$cpu_type .= 'MT';
|
||||||
}
|
}
|
||||||
elsif ($b_xeon && $cpu{'siblings'} > 1){
|
# elsif ($b_xeon && $cpu{'siblings'} > 1){
|
||||||
#print "mt:2\n";
|
# #print "mt:2\n";
|
||||||
$cpu_type .= 'MT';
|
# $cpu_type .= 'MT';
|
||||||
}
|
# }
|
||||||
elsif ($cpu{'siblings'} > 1 && ($cpu{'siblings'} == 2 * $cpu_cores )){
|
elsif ($cpu{'siblings'} > 1 && ($cpu{'siblings'} == 2 * $cpu_cores )){
|
||||||
#print "mt:3\n";
|
#print "mt:3\n";
|
||||||
$cpu_type .= 'MT';
|
$cpu_type .= 'MT';
|
||||||
|
@ -6573,15 +6577,8 @@ sub cpu_properties {
|
||||||
if ($phyical_count > 1){
|
if ($phyical_count > 1){
|
||||||
$cpu_layout = $phyical_count . 'x ';
|
$cpu_layout = $phyical_count . 'x ';
|
||||||
}
|
}
|
||||||
if (!$bsd_type){
|
$cpu_layout .= count_alpha($cpu_cores) . 'Core';
|
||||||
$cpu_layout .= count_alpha($cpu_cores) . 'Core';
|
$cpu_layout .= ' (' . $cpu{'dies'}. '-Die)' if !$bsd_type && $cpu{'dies'} > 1;
|
||||||
if ($cpu{'dies'} > 1){
|
|
||||||
$cpu_layout .= ' (' . $cpu{'dies'}. '-Die)';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$cpu_layout .= count_alpha($cpu_cores) . ' Core';
|
|
||||||
}
|
|
||||||
# the only possible change for bsds is if we can get phys counts in the future
|
# the only possible change for bsds is if we can get phys counts in the future
|
||||||
if ($bsd_type){
|
if ($bsd_type){
|
||||||
$cache = $cpu{'l2-cache'} * $phyical_count;
|
$cache = $cpu{'l2-cache'} * $phyical_count;
|
||||||
|
@ -9735,6 +9732,7 @@ sub create_output {
|
||||||
$dev_type = 'raid';
|
$dev_type = 'raid';
|
||||||
$dev = $row{'dev-base'};
|
$dev = $row{'dev-base'};
|
||||||
}
|
}
|
||||||
|
# note: I have seen this: beta:data/ for sshfs path
|
||||||
elsif ($row{'dev-base'} =~ /^\/\/|:\//){
|
elsif ($row{'dev-base'} =~ /^\/\/|:\//){
|
||||||
$dev_type = 'remote';
|
$dev_type = 'remote';
|
||||||
$dev = $row{'dev-base'};
|
$dev = $row{'dev-base'};
|
||||||
|
@ -9798,14 +9796,13 @@ sub partition_data {
|
||||||
# in freebsd. However since most use is from linux, we make that default
|
# in freebsd. However since most use is from linux, we make that default
|
||||||
if (!$bsd_type){
|
if (!$bsd_type){
|
||||||
@partitions_working = main::grabber("df -P -T -k 2>/dev/null");
|
@partitions_working = main::grabber("df -P -T -k 2>/dev/null");
|
||||||
if (-d '/dev/disk/mapper'){
|
if (-d '/dev/mapper'){
|
||||||
@mapper = main::globber('/dev/mapper/*');
|
@mapper = main::globber('/dev/mapper/*');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# this is missing the file system data
|
# this is missing the file system data
|
||||||
if ($bsd_type ne 'darwin'){
|
if ($bsd_type ne 'darwin'){
|
||||||
$cols = 5;
|
|
||||||
@partitions_working = main::grabber("df -T -k 2>/dev/null");
|
@partitions_working = main::grabber("df -T -k 2>/dev/null");
|
||||||
}
|
}
|
||||||
#Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
|
#Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
|
||||||
|
@ -9817,6 +9814,7 @@ sub partition_data {
|
||||||
if (!@partitions_working){
|
if (!@partitions_working){
|
||||||
@partitions_working = main::grabber("df -k 2>/dev/null");
|
@partitions_working = main::grabber("df -k 2>/dev/null");
|
||||||
$b_fs = 0;
|
$b_fs = 0;
|
||||||
|
$cols = 5 if $bsd_type ne 'darwin';
|
||||||
if (my $path = main::check_program('mount')){
|
if (my $path = main::check_program('mount')){
|
||||||
@mount = main::grabber("$path 2>/dev/null");
|
@mount = main::grabber("$path 2>/dev/null");
|
||||||
}
|
}
|
||||||
|
@ -10045,7 +10043,7 @@ sub set_lsblk {
|
||||||
$b_lsblk = 1;
|
$b_lsblk = 1;
|
||||||
my (@temp,@working);
|
my (@temp,@working);
|
||||||
if (my $program = main::check_program('lsblk')){
|
if (my $program = main::check_program('lsblk')){
|
||||||
@working = main::grabber("$program -bP --output NAME,TYPE,RM,FSTYPE,SIZE 2>/dev/null");
|
@working = main::grabber("$program -bP --output NAME,TYPE,RM,FSTYPE,SIZE,LABEL,UUID,MOUNTPOINT 2>/dev/null");
|
||||||
foreach (@working){
|
foreach (@working){
|
||||||
my ($name,$type,$rm,$fstype,$size) = ('','','','','');
|
my ($name,$type,$rm,$fstype,$size) = ('','','','','');
|
||||||
if (/NAME="([^"]*)"\s+TYPE="([^"]*)"\s+RM="([^"]*)"\s+FSTYPE="([^"]*)"\s+SIZE="([^"]*)"/){
|
if (/NAME="([^"]*)"\s+TYPE="([^"]*)"\s+RM="([^"]*)"\s+FSTYPE="([^"]*)"\s+SIZE="([^"]*)"/){
|
||||||
|
@ -10062,7 +10060,6 @@ sub set_lsblk {
|
||||||
}
|
}
|
||||||
# print Data::Dumper::Dumper \@lsblk;
|
# print Data::Dumper::Dumper \@lsblk;
|
||||||
main::log_data('dump','@lsblk',\@lsblk) if $b_log;
|
main::log_data('dump','@lsblk',\@lsblk) if $b_log;
|
||||||
shift @lsblk if @lsblk; # get rid of row headers
|
|
||||||
eval $end if $b_log;
|
eval $end if $b_log;
|
||||||
}
|
}
|
||||||
sub check_lsblk {
|
sub check_lsblk {
|
||||||
|
@ -10079,7 +10076,8 @@ sub check_lsblk {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eval $start if $b_log;
|
main::log_data('dump','%part',\%part) if $b_log;
|
||||||
|
eval $end if $b_log;
|
||||||
return %part;
|
return %part;
|
||||||
}
|
}
|
||||||
sub get_label {
|
sub get_label {
|
||||||
|
@ -14261,6 +14259,7 @@ sub set_xprop {
|
||||||
if (my $program = main::check_program('xprop')){
|
if (my $program = main::check_program('xprop')){
|
||||||
@xprop = main::grabber("xprop -root $display_opt 2>/dev/null");
|
@xprop = main::grabber("xprop -root $display_opt 2>/dev/null");
|
||||||
if (@xprop){
|
if (@xprop){
|
||||||
|
# add wm / de as required, but only add what is really tested for above
|
||||||
my $pattern = 'blackbox_pid|enlightenment|^_gnome|herbstluftwm|';
|
my $pattern = 'blackbox_pid|enlightenment|^_gnome|herbstluftwm|';
|
||||||
$pattern .= '^i3_|icewm|_marco|_muffin|openbox_pid|^windowmaker|^_wm2|xfce';
|
$pattern .= '^i3_|icewm|_marco|_muffin|openbox_pid|^windowmaker|^_wm2|xfce';
|
||||||
# let's only do these searches once
|
# let's only do these searches once
|
||||||
|
@ -14269,7 +14268,7 @@ sub set_xprop {
|
||||||
$b_xprop = 1 if scalar @xprop > 0;
|
$b_xprop = 1 if scalar @xprop > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#print "@xprop\n";
|
# print "@xprop\n";
|
||||||
eval $end if $b_log;
|
eval $end if $b_log;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14283,7 +14282,7 @@ sub get_display_manager {
|
||||||
# explicitly, not -e
|
# explicitly, not -e
|
||||||
my @dms = qw(entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid
|
my @dms = qw(entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid
|
||||||
lightdm.pid lxdm.pid mdm.pid nodm.pid sddm.pid sddm slim.lock
|
lightdm.pid lxdm.pid mdm.pid nodm.pid sddm.pid sddm slim.lock
|
||||||
tint2.pid wdm.pid xdm.pid);
|
tint2.pid wdm.pid xdm.pid xenodm.pid);
|
||||||
# this is the only one I know of so far that has --version
|
# this is the only one I know of so far that has --version
|
||||||
# lightdm outputs to stderr, so it has to be redirected
|
# lightdm outputs to stderr, so it has to be redirected
|
||||||
my @dms_version = qw(lightdm);
|
my @dms_version = qw(lightdm);
|
||||||
|
@ -14818,15 +14817,16 @@ sub get_memory_data_bsd {
|
||||||
my $memory = '';
|
my $memory = '';
|
||||||
my ($avail,$total,$free_mem,$real_mem) = (0,0,0,0);
|
my ($avail,$total,$free_mem,$real_mem) = (0,0,0,0);
|
||||||
my (@data,$message);
|
my (@data,$message);
|
||||||
|
my $arg = ($bsd_type ne 'openbsd') ? '-H' : '';
|
||||||
if (my $program = check_program('vmstat')){
|
if (my $program = check_program('vmstat')){
|
||||||
# see above, it's the last line. -H makes it hopefully all in kB so no need
|
# see above, it's the last line. -H makes it hopefully all in kB so no need
|
||||||
# for K/M/G tests
|
# for K/M/G tests
|
||||||
my $row = (grabber('vmstat -H 2>/dev/null','\n','strip'))[-1];
|
my $row = (grabber("vmstat $arg 2>/dev/null",'\n','strip'))[-1];
|
||||||
if ( $row ){
|
if ( $row ){
|
||||||
@data = split /\s+/, $row;
|
@data = split /\s+/, $row;
|
||||||
# dragonfly can have 0 avg, but they may fix that so make test dynamic
|
# dragonfly can have 0 avg, but they may fix that so make test dynamic
|
||||||
if ($data[3] != 0){
|
if ($data[3] != 0){
|
||||||
$avail = sprintf ('%.1f',$data[3]/1024);
|
$avail = ($bsd_type ne 'openbsd') ? sprintf ('%.1f',$data[3]/1024) : $data[3];
|
||||||
}
|
}
|
||||||
elsif ($data[4] != 0){
|
elsif ($data[4] != 0){
|
||||||
$free_mem = sprintf ('%.1f',$data[4]);
|
$free_mem = sprintf ('%.1f',$data[4]);
|
||||||
|
@ -14919,17 +14919,19 @@ sub get_module_version {
|
||||||
sub get_partition_extra_data {
|
sub get_partition_extra_data {
|
||||||
eval $start if $b_log;
|
eval $start if $b_log;
|
||||||
$b_partition_extra = 1;
|
$b_partition_extra = 1;
|
||||||
if (!$bsd_type){
|
if ( $show{'unmounted'} || $show{'label'} || $show{'uuid'} ){
|
||||||
if (-d '/dev/disk/by-label'){
|
if (!$bsd_type){
|
||||||
@labels = main::globber('/dev/disk/by-label/*');
|
if (-d '/dev/disk/by-label'){
|
||||||
|
@labels = main::globber('/dev/disk/by-label/*');
|
||||||
|
}
|
||||||
|
if (-d '/dev/disk/by-uuid'){
|
||||||
|
@uuids = main::globber('/dev/disk/by-uuid/*');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (-d '/dev/disk/by-uuid'){
|
else {
|
||||||
@uuids = main::globber('/dev/disk/by-uuid/*');
|
if ( my $path = main::check_program('gpart')){
|
||||||
}
|
@gpart = main::grabber("$path list 2>/dev/null",'strip');
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if ( ($show{'unmounted'} || $show{'label'} || $show{'uuid'} ) && (my $path = main::check_program('gpart'))){
|
|
||||||
@gpart = main::grabber("$path list 2>/dev/null",'strip');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eval $end if $b_log;
|
eval $end if $b_log;
|
||||||
|
|
19
inxi.1
19
inxi.1
|
@ -1,17 +1,17 @@
|
||||||
.TH INXI 1 "2018\-04\-17" inxi "inxi manual"
|
.TH INXI 1 "2018\-04\-18" inxi "inxi manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
inxi \- Command line system information script for console and IRC
|
inxi \- Command line system information script for console and IRC
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBinxi\fR \- Display a short system summary.
|
\fBinxi\fR
|
||||||
|
|
||||||
\fBinxi \fR[\fB\-AbBCdDfFGhiIlmMnNopPrRsSuUVwzZ\fR]
|
\fBinxi\fR [\fB\-AbBCdDfFGhiIlmMnNopPrRsSuUVwzZ\fR]
|
||||||
|
|
||||||
\fBinxi \fR[\fB\-c NUMBER\fR] [\fB\-t c|m|cm|mc [NUMBER]\fR] \fR[\fB\-v NUMBER\fR]
|
\fBinxi\fR [\fB\-c NUMBER\fR] [\fB\-t [\fBc\fR|\fBm\fR|\fBcm\fR|\fBmc\fR]
|
||||||
[\fB\-W LOCATION\fR] [\fB\-y WIDTH\fR]
|
[\fBNUMBER\fR]] \fR[\fB\-v NUMBER\fR] [\fB\-W LOCATION\fR] [\fB\-y WIDTH\fR]
|
||||||
|
|
||||||
\fBinxi \fR[\fB\-\-recommends\fR] \fR[\fB\-\-slots\fR] \fR[\fB\-\-usb\fR]
|
\fBinxi\fR [\fB\-\-recommends\fR] \fR[\fB\-\-slots\fR] \fR[\fB\-\-usb\fR]
|
||||||
|
|
||||||
\fBinxi \fB\-x\fR|\fB\-xx\fR|\fB\-xxx\fR \fB\-OPTION(s) \fR
|
\fBinxi\fB \-x\fR|\fB\-xx\fR|\fB\-xxx\fR \fB\-OPTION(s) \fR
|
||||||
|
|
||||||
All options have long form variants \- see below for these and more advanced options.
|
All options have long form variants \- see below for these and more advanced options.
|
||||||
|
|
||||||
|
@ -1065,8 +1065,9 @@ RAM \fB\-m\fR option.
|
||||||
AntiX users and admins, who have helped greatly with testing and debugging,
|
AntiX users and admins, who have helped greatly with testing and debugging,
|
||||||
particularly for the 3.0.0 release.
|
particularly for the 3.0.0 release.
|
||||||
|
|
||||||
ArcherSeven (Max) and Iotaka, who always manage to find the weirdest or most extreme
|
ArcherSeven (Max), Brett Bohnenkamper (aka KittyKatt), and Iotaka, who always
|
||||||
hardware and setups that help make inxi much more robust.
|
manage to find the weirdest or most extreme hardware and setups that help make
|
||||||
|
inxi much more robust.
|
||||||
|
|
||||||
For the vastly underrated skill of output error/glitch catching, Pete Haddow. His
|
For the vastly underrated skill of output error/glitch catching, Pete Haddow. His
|
||||||
patience and focus in going through inxi repeatedly to find errors and inconsistencies
|
patience and focus in going through inxi repeatedly to find errors and inconsistencies
|
||||||
|
|
|
@ -1,3 +1,29 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 3.0.07
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2018-04-17
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, new man. Bug fixes. BSD fixes.
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
1. CPU: MT/HT was wrong for old xeon, made mt detection more robust and hopefully
|
||||||
|
more reliable, removed all explicit b_xeon based tests.
|
||||||
|
2. fixed /dev/mapper glitch, that make /dev/mapper links fail to get id'ed.
|
||||||
|
3. openbsd: fixed memory handler; fixed cpu flags, fixed partitions handling.
|
||||||
|
4. freebsd: fixed similar partition bugs, these were caused by the darwin patch.
|
||||||
|
5. man page: fixed top synopis syntax, thanks ESR.
|
||||||
|
6. partitions fs: fixed possible failures with lsblk fs. lsblk: added debuggers
|
||||||
|
so we can track down this failure in the future.
|
||||||
|
7. added sshfs filter for disk used output, note, there is a possible syntax for
|
||||||
|
remote fs that isn't handled: AAA:BBB that is, no :/, only the :. This makes
|
||||||
|
explicit detection of still unknown remote fs very difficult since : is a legal
|
||||||
|
nix filename character.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Wed, 18 Apr 2018 19:29:02 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 3.0.06
|
Version: 3.0.06
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue