New version, man page, exciting changes!!

Bugs:
1. issue #200 - forgot to add all variants for -p, now works with --partition-full
and --partitions-full
2. issue #199 - another one, forgot to add --disk to -D for long version. Thanks
adrian15 for both of these, he was testing something and discovered these were
missing.
3. Issue #187 an issue with RAID syntax not being handled in a certain case,
thanks EnochTheWise for following through on this one. This turned out to be
a bad copy paste, a test pattern did not match the match pattern.

Fixes:
1. Fixed some docs typos.
2. Issue #188 fixed protections and filters for some glxinfo output handlers.
3. Issue #195, for Elbrus bit detection.
4. Added filter to cpu data, was not skipping if arm, so Model string
was treated numerically.

Enhancements:
1. Added rescatux to Debian system base detections. This closes issue #202, again
from adrian15, thanks.
2. For cpu architecture, updated for latest AMD ryzen and other families, like
Zen 3, which is just coming out re available data. Also latest Intel, which are
trickier to ID right now, but I think I got the latest ones right,
That's things like coffee lake, amber lake, comet lake, etc.
3. Huge one, full (hopefully out of the box) Russian Elbrus CPU support. Thanks
to the alt-linux and the others who helped provide data and feedback to get support.
Note that this was also part of correcting 64 bit detection for e2k type, which
is how Elbrus IDs internally. See issue #197 which I've left open for the time
being for more information on this CPU and how it's now handled by inxi.
Note all available data should now work for Elbrus, including physical cpu/core
counts etc. Elbrus do not show flag information, nor do they use min/max speed,
so that data isn't available, but everything else seems to work well.
4. Eternal disk vendors. Thanks linux lite hardware database, you continue to
help make the disk vendor feature work by supplying every known vendor ever seen.
5. To close debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942194
Note that the fix is simply to give the user the option to disable this behavior
with the new --no-sudo and NO_SUDO configuration file options. This issue should
never have been filed as a bug since even the poster admitted it was a wishlist
item, but because of how debian bug tracker works, it's hard to get rid of
invalid bugs. Note that this is the internal use of sudo for hddtemp and file,
not starting inxi with sudo, so using this option or configuration item just
removes sudo from the command. Note that because the user did not do as
requested, and never actually filed a github wishlist issue, and since his
request was vague and basically pointless, the fix is just to let you switch
off sudo, that's all.
This commit is contained in:
Harald Hope 2019-11-19 20:42:21 -08:00
parent c75d037aba
commit f2cfb7edfb
3 changed files with 234 additions and 42 deletions

205
inxi
View file

@ -31,8 +31,8 @@ use POSIX qw(uname strftime ttyname);
## INXI INFO ##
my $self_name='inxi';
my $self_version='3.0.36';
my $self_date='2019-08-14';
my $self_version='3.0.37';
my $self_date='2019-11-19';
my $self_patch='00';
## END INXI INFO ##
@ -70,7 +70,7 @@ my ($b_admin,$b_arm,$b_bb_ps,$b_block_tool,$b_console_irc,
$b_display,$b_dmesg_boot_check,$b_dmi,$b_dmidecode_force,
$b_fake_bsd,$b_fake_dboot,$b_fake_dmidecode,$b_fake_pciconf,$b_fake_sysctl,
$b_fake_usbdevs,$b_force_display,$b_gpudata,$b_irc,
$b_log,$b_log_colors,$b_log_full,$b_man,$b_mem,$b_mips,
$b_log,$b_log_colors,$b_log_full,$b_man,$b_mem,$b_mips,$b_no_sudo,
$b_pci,$b_pci_tool,$b_ppc,$b_proc_partitions,$b_ps_gui,
$b_root,$b_running_in_display,$b_skip_dig,
$b_slot_tool,$b_soc_audio,$b_soc_gfx,$b_soc_net,$b_soc_timer,$b_sparc,
@ -325,7 +325,7 @@ sub check_tools {
my @data = program_values('sudo');
my $version = program_version($path,$data[0],$data[1],$data[2],$data[5]);
$version =~ s/^([0-9]+\.[0-9]+).*/$1/;
$sudo = "$path -n " if is_numeric($version) && $version >= 1.7;
$sudo = "$path -n " if !$b_no_sudo && is_numeric($version) && $version >= 1.7;
}
set_fake_tools() if $b_fake_bsd;
}
@ -435,7 +435,7 @@ sub set_os {
if ($cpu_arch =~ /(armv[1-7]|32|sparc_v9)/){
$bits_sys = 32;
}
elsif ($cpu_arch =~ /(alpha|64)/){
elsif ($cpu_arch =~ /(alpha|64|e2k)/){
$bits_sys = 64;
}
if ( $os =~ /(aix|bsd|cosix|dragonfly|darwin|hp-?ux|indiana|irix|sunos|solaris|ultrix|unix)/ ){
@ -1080,6 +1080,7 @@ sub get_config_item {
elsif ($key eq 'LANGUAGE') {$language = $val if $val =~ /^(en)$/}
elsif ($key eq 'LIMIT') {$limit = $val if is_int($val)}
elsif ($key eq 'OUTPUT_TYPE') {$output_type = $val if $val =~ /^(json|screen|xml)$/}
elsif ($key eq 'NO_SUDO') {$b_no_sudo = $val if is_int($val)}
elsif ($key eq 'PARTITION_SORT') {$show{'partition-sort'} = $val if ($val =~ /^(dev-base|fs|id|label|percent-used|size|uuid|used)$/) }
elsif ($key eq 'PS_COUNT') {$ps_count = $val if is_int($val) }
elsif ($key eq 'SENSORS_CPU_NO') {$sensors_cpu_nu = $val if is_int($val)}
@ -3858,7 +3859,7 @@ sub get_options{
$show{'short'} = 0;
$show{'disk'} = 1;
$show{'optical'} = 1; },
'D' => sub {
'D|disk' => sub {
$show{'short'} = 0;
$show{'disk'} = 1; },
'f|flags|flag' => sub {
@ -3928,7 +3929,7 @@ sub get_options{
'o|unmounted' => sub {
$show{'short'} = 0;
$show{'unmounted'} = 1; },
'p|partition-full' => sub {
'p|partition-full|partitions-full' => sub {
$show{'short'} = 0;
$show{'partition'} = 0;
$show{'partition-full'} = 1; },
@ -4302,6 +4303,8 @@ sub get_options{
$b_no_man_force = 0; },
'no-ssl' => sub {
$dl{'no-ssl-opt'}=1 },
'no-sudo' => sub {
$b_no_sudo = 1; },
'output-file:s' => sub {
my ($opt,$arg) = @_;
if ($arg){
@ -4761,6 +4764,8 @@ sub show_options {
@rows = (
['1', '', '--no-ssl', "Skip SSL certificate checks for all downloader actions
(Wget/Fetch/Curl only)." ],
['1', '', '--no-sudo', "Skip internal program use of sudo features (not related
to starting $self_name with sudo)." ],
['1', '', '--output', "[json|screen|xml] Change data output type. Requires --output-file
if not screen." ],
['1', '', '--output-file', "[Full filepath|print] Output file to be used for --output." ],
@ -6907,6 +6912,13 @@ sub data_cpuinfo {
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/intel/4-6-core-xeon-no-mt-lathander.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/mips/mips-mainusg-cpuinfo.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/ppc/ppc-debian-ppc64-cpuinfo.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/1xE1C-8.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/1xE2CDSP-4.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/1xE2S4-3-monocub.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/1xMBE8C-7.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/4xEL2S4-3.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/4xE8C-7.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/cpu/elbrus/4xE2CDSP-4.txt";
my %speeds = set_cpu_speeds_sys();
my @cpuinfo = main::reader($file);
my @phys_cpus = (0);# start with 1 always
@ -6918,6 +6930,8 @@ sub data_cpuinfo {
$ids[0] = ([]);
$ids[0][0] = ([]);
my %cpu = set_cpu_data();
$cpu{'type'} = cpu_vendor($cpu_arch) if $cpu_arch =~ /e2k/; # already set to lower
#$cpu{'type'} = 'elbrus';
# note, there con be a lot of processors, 32 core HT would have 64, for example.
foreach (@cpuinfo){
next if /^\s*$/;
@ -6992,8 +7006,8 @@ sub data_cpuinfo {
elsif (!$cpu{'rev'} && $line[0] eq 'revision'){
$cpu{'rev'} = $line[1];
}
# this is hex so uc for cpu arch id
elsif (!$cpu{'model_id'} && (!$b_ppc && $line[0] eq 'model') ){
# this is hex so uc for cpu arch id. raspi 4 has Model rather than Hard
elsif (!$cpu{'model_id'} && (!$b_ppc && !$b_arm && $line[0] eq 'model') ){
$cpu{'model_id'} = uc(sprintf("%x", $line[1]));
}
elsif (!$cpu{'model_id'} && $line[0] eq 'cpu variant' ){
@ -7071,7 +7085,7 @@ sub data_cpuinfo {
}
## this is only for -C full cpu output
if ( $type eq 'full' ){
if (!$cpu{'l2-cache'} && $line[0] eq 'cache size'){
if (!$cpu{'l2-cache'} && ($line[0] eq 'cache size' || $line[0] eq 'l2 cache size' )){
if ($line[1] =~ /(\d+)\sKB$/){
$cpu{'l2-cache'} = $1;
}
@ -7079,6 +7093,19 @@ sub data_cpuinfo {
$cpu{'l2-cache'} = ($1*1024);
}
}
elsif (!$cpu{'l1-cache'} && $line[0] eq 'l1 cache size'){
if ($line[1] =~ /(\d+)\sKB$/){
$cpu{'l1-cache'} = ($1);
}
}
elsif (!$cpu{'l3-cache'} && $line[0] eq 'l3 cache size'){
if ($line[1] =~ /(\d+)\sKB$/){
$cpu{'l3-cache'} = $1;
}
elsif ($line[1] =~ /(\d+)\sMB$/){
$cpu{'l3-cache'} = ($1*1024);
}
}
if (!$cpu{'flags'} && ($line[0] eq 'flags' || $line[0] eq 'features' )){
$cpu{'flags'} = $line[1];
}
@ -7281,7 +7308,7 @@ sub data_sysctl {
sub cpu_properties {
my (%cpu) = @_;
my ($b_amd_zen,$b_epyc,$b_ht,$b_intel,$b_ryzen,$b_xeon);
my ($b_amd_zen,$b_epyc,$b_ht,$b_elbrus,$b_intel,$b_ryzen,$b_xeon);
if ($cpu{'type'} ){
if ($cpu{'type'} eq 'intel'){
$b_intel = 1;
@ -7300,6 +7327,9 @@ sub cpu_properties {
}
}
}
elsif ($cpu{'type'} eq 'elbrus') {
$b_elbrus = 1;
}
}
#my @dies = $phys[0][0];
my $ref = $cpu{'ids'};
@ -7312,7 +7342,6 @@ sub cpu_properties {
foreach (@phys) {
$phyical_count++ if $_;
}
$phyical_count ||= 1; # assume 1 if no id found, as with ARM
# count unique processors ##
# note, this fails for intel cpus at times
$ref = $cpu{'processors'};
@ -7324,6 +7353,15 @@ sub cpu_properties {
# $cpu_cores is per physical cpu
my ($cpu_layout,$cpu_type,$min_max,$min_max_key) = ('','','','');
my ($l1_cache,$l2_cache,$l3_cache,$core_count,$cpu_cores,$die_count) = (0,0,0,0,0,0);
# note: elbrus supports turning off cores, so we need to add one for cases where rounds to 0 or 1 less
if ($b_elbrus && $processors_count){
my @elbrus = elbrus_data($cpu{'model_id'},$processors_count,$cpu{'arch'});
$cpu_cores = $elbrus[0];
$phyical_count = $elbrus[1];
$cpu{'arch'} = $elbrus[2];
# print 'model id: ' . $cpu{'model_id'} . ' arch: ' . $cpu{'arch'} . " cpc: $cpu_cores phyc: $phyical_count proc: $processors_count \n";
}
$phyical_count ||= 1; # assume 1 if no id found, as with ARM
if ($extra > 1){
# note: dmidecode has one entry per cpu per cache type, so this already
# has done the arithmetic on > 1 cpus for L1 and L3.
@ -7353,16 +7391,19 @@ sub cpu_properties {
#print 'cores: ' . $core_count, "\n";
}
}
# this covers potentially cases where ARM cpus have > 1 die
$cpu{'dies'} = ($b_arm && $die_count <= 1 && $cpu{'dies'} > 1) ? $cpu{'dies'}: $die_count;
# 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 A10-5800K APU 4 core reports: cores: 2 siblings: 4
if ($cpu{'cores'} && ! $core_count || $cpu{'cores'} >= $core_count){
$cpu_cores = $cpu{'cores'};
}
elsif ($core_count > $cpu{'cores'}){
$cpu_cores = $core_count;
if (!$cpu_cores){
if ($cpu{'cores'} && ! $core_count || $cpu{'cores'} >= $core_count){
$cpu_cores = $cpu{'cores'};
}
elsif ($core_count > $cpu{'cores'}){
$cpu_cores = $core_count;
}
}
#print "cpu-c:$cpu_cores\n";
#$cpu_cores = $cpu{'cores'};
@ -7395,6 +7436,9 @@ sub cpu_properties {
$cpu_cores = $cpu{'cores'};
$cpu{'dies'} = 4;
}
# elsif ($b_elbrus){
# $cpu_cores =
# }
# final check, override the num of cores value if it clearly is wrong
# and use the raw core count and synthesize the total instead of real count
if ( $cpu_cores == 0 && ($cpu{'cores'} * $phyical_count > 1)){
@ -7732,6 +7776,34 @@ sub cpu_dies_sys {
eval $end if $b_log;
return $die_count;
}
# needed because no physical_id in cpuinfo, but > 1 cpu systems exist
# returns: 0 - per cpu cores; 1 - phys cpu count; 2 - override model defaul names
sub elbrus_data {
eval $start if $b_log;
my ($model_id,$count,$arch) = @_;
# 0: cores
my @cores;
my @return = (0,1,$arch);
$cores[1] = 1;
$cores[2] = 1;
$cores[3] = 4;
$cores[4] = 2;
$cores[6] = 1;
$cores[7] = 8;
$cores[8] = 1;
$cores[9] = 8;
$cores[10] = 12;
$cores[11] = 16;
$cores[12] = 2;
if (main::is_numeric($model_id) && $cores[$model_id]){
$return[0] = $cores[$model_id] ;
}
if ($return[0]){
$return[1] = ($count % $return[0]) ? int($count/$return[0]) + 1 : $count/$return[0];
}
eval $end if $b_log;
return @return;
}
sub cpu_flags_bsd {
eval $start if $b_log;
my ($flags,$sep) = ('','');
@ -7784,6 +7856,9 @@ sub cpu_vendor {
elsif ($string =~ /centaur/){
$vendor = "centaur"
}
elsif ($string =~ /e2k/){
$vendor = "elbrus"
}
eval $end if $b_log;
return $vendor;
}
@ -7896,7 +7971,15 @@ sub cpu_arch {
elsif ( $model =~ /^2[0123456789ABCDEF]$/ ) {$arch = 'Zen 2'}
else {$arch = 'Zen'}
}
# coming: zen 2, zen 3
elsif ($family eq '18'){
# model #s not known yet
$arch = 'Hygon Dhyana';
}
elsif ($family eq '19'){
# model #s not known yet
$arch = 'Zen 3';
}
# note: family 20 may be Zen 4 but not known for sure yet
}
elsif ( $type eq 'arm'){
if ($family ne ''){$arch="ARMv$family";}
@ -7920,6 +8003,25 @@ sub cpu_arch {
elsif ( $model =~ /^(F)$/ ) {$arch = 'Isaiah'}
}
}
elsif ( $type eq 'elbrus'){
if ($family eq '4'){
if ( $model eq '1' ) {$arch = 'Elbrus'}
elsif ( $model eq '2' ) {$arch = 'Elbrus-S'}
elsif ( $model eq '3' ) {$arch = 'Elbrus-4C'}
elsif ( $model eq '4' ) {$arch = 'Elbrus-2C+'}
elsif ( $model eq '6' ) {$arch = 'Elbrus-2CM'}
elsif ( $model eq '7' ) {
if ($stepping >= 2) {$arch = 'Elbrus-8C1';}
else {$arch = 'Elbrus-8C';}
} # note: stepping > 1 may be 8C1
elsif ( $model eq '8' ) {$arch = 'Elbrus-1C+'}
elsif ( $model eq '9' ) {$arch = 'Elbrus-8CB'}
elsif ( $model eq '10' ) {$arch = 'Elbrus-12C'}
elsif ( $model eq '11' ) {$arch = 'Elbrus-16C'}
elsif ( $model eq '12' ) {$arch = 'Elbrus-2C3'}
else {$arch = 'Elbrus-??';}
}
}
elsif ( $type eq 'intel'){
if ($family eq '4'){
if ( $model =~ /^(0|1|2|3|4|5|6|7|8|9)$/ ) {$arch = '486'}
@ -7962,17 +8064,23 @@ sub cpu_arch {
elsif ( $model =~ /^(5E)$/ ) {$arch = 'Skylake-S'}
elsif ( $model =~ /^(4C)$/ ) {$arch = 'Airmont'}
elsif ( $model =~ /^(7A)$/ ) {$arch = 'Goldmont Plus'}
elsif ( $model =~ /^(7E)$/ ) {$arch = 'Ice Lake'}
elsif ( $model =~ /^(7D|7E)$/ ) {$arch = 'Ice Lake'}
elsif ( $model =~ /^(8C)$/ ) {$arch = 'Tiger Lake'}
elsif ( $model =~ /^(8E|9E)$/ ) {
if ($stepping > 9){$arch = 'Coffee Lake'}
if ($model eq '9E' && ($stepping == 10 || $stepping == 11 || $stepping == 12 || $stepping == 13)){$arch = 'Coffee Lake'}
elsif ($model eq '8E' && $stepping == 10){$arch = 'Coffee Lake'}
elsif ($model eq '8E' && ($stepping == 11 || $stepping == 12)){$arch = 'Whiskey Lake'}
elsif ($model eq '8E' && $stepping == 9){$arch = 'Amber Lake'}
elsif ($stepping > 13){$arch = 'Comet Lake'} # guess, have not seen docs yet
elsif ($stepping > 9){$arch = 'Coffee Lake'}
else {$arch = 'Kaby Lake'} }
elsif ( $model =~ /^(9E)$/ ) {$arch = 'Coffee Lake'}
#elsif ( $model =~ /^(9E)$/ ) {$arch = 'Coffee Lake'}
elsif ( $model =~ /^(57)$/ ) {$arch = 'Knights Landing'}
elsif ( $model =~ /^(66)$/ ) {$arch = 'Cannon Lake'}
elsif ( $model =~ /^(85)$/ ) {$arch = 'Knights Mill'}
elsif ( $model =~ /^(86)$/ ) {$arch = 'Tremont'}
# coming: alder lake; amber lake; cannonlake; cascade lake; coffee lake;
# cooper lake; granite rapids; icelake; meteor lake; saphire rapids; tigerlake,
# More info: comet: shares family/model, need to find stepping numbers
# Coming: meteor lake; alder lake; cooper lake; granite rapids; meteor lake; saphire rapids;
}
# itanium 1 family 7 all recalled
elsif ($family eq 'B'){
@ -8758,7 +8866,7 @@ sub device_vendor {
['(^MKN|Mushkin)','Mushkin','Mushkin',''], # MKNS
# MU = Multiple_Flash_Reader too risky: |M[UZ][^L] HD103SI HD start risky
# HM320II HM320II
['(SAMSUNG|^MCG[0-9]+GC|^MCC|^[GS]2 Portable|^DUO\b|^P3|^(HM|SP)[0-9]{2}|^MZMPC|^HD[0-9]{3}[A-Z]{2}$)','SAMSUNG','Samsung',''], # maybe ^SM, ^HM
['(SAMSUNG|^MCG[0-9]+GC|^MCC|^MCB0E|^[GS]2 Portable|^DUO\b|^P3|^(HM|SP)[0-9]{2}|^MZMPC|^HD[0-9]{3}[A-Z]{2}$)','SAMSUNG','Samsung',''], # maybe ^SM, ^HM
# Android UMS Composite?
['(SanDisk|^SDS[S]?[DQ]|^SL([0-9]+)G|^AFGCE|^U3\b|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme)','SanDisk','SanDisk',''],
['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test
@ -8776,9 +8884,10 @@ sub device_vendor {
['^(FUJITSU|MJA|MH[TVWYZ][0-9]|MP|MAP[0-9])','^FUJITSU','Fujitsu',''],
# note: 2012: wdc bought hgst
['^(HGST|Touro|5450)','^HGST','HGST (Hitachi)',''], # HGST HUA
['^(Hitachi|HD[ST]|DK[0-9]|IC|HT|HU)','^Hitachi','Hitachi',''],
['^(Hitachi|HD[PST]|DK[0-9]|IC|HT|HU)','^Hitachi','Hitachi',''],
# vb: VB0250EAVER but clashes with vbox; HP_SSD_S700_120G ;GB0500EAFYL GB starter too generic?
['^(HP\b|MB[0-6]|G[BJ]0|v[0-9]{3}[bgorw]$|x[0-9]{3}[w]$)','^HP','HP',''],
# DX110064A5xnNMRI ids as HP and Sandisc, same ID, made by sandisc for hp? not sure
['^(HP\b|MB[0-6]|G[BJ][01]|v[0-9]{3}[bgorw]$|x[0-9]{3}[w]$)','^HP','HP',''],
['^(LSD|Lexar|JumpDrive|JD\s?Firefly)','^Lexar','Lexar',''], # mmc-LEXAR_0xb016546c; JD Firefly;
# OCZSSD2-2VTXE120G is OCZ-VERTEX2_3.5
['^(OCZ|APOC|D2|DEN|DEN|DRSAK|EC188|FTNC|GFGC|MANG|MMOC|NIMC|NIMR|PSIR|RALLY2|TALOS2|TMSC|TRSAK)','^OCZ[\s\-]','OCZ',''],
@ -8804,11 +8913,12 @@ sub device_vendor {
['^(A-?RAM|ARSSD)','^A-?RAM','A-RAM',''],
['^Asgard','^Asgard','Asgard',''],
['^(ASM|2115)','^ASM','ASMedia',''],#asm1153e
['^(AVEXIR|AVSSD)','^AVEXIR','Avexir',''],
['^Bell\b','^Bell','Packard Bell',''],
['^BHT','^BHT','BHT',''],
['^BIOSTAR','^BIOSTAR','Biostar',''],
['^BIWIN','^BIWIN','BIWIN',''],
['^BUFFALO','^BUFFALO','Buffalo',''],
['^(BUFFALO|BSC)','^BUFFALO','Buffalo',''], # usb: BSCR05TU2
['^Bulldozer','^Bulldozer','Bulldozer',''],
['^Centerm','^Centerm','Centerm',''],
['^Centon','^Centon','Centon',''],
@ -8836,6 +8946,7 @@ sub device_vendor {
['^FASTDISK','^FASTDISK','FASTDISK',''],
# FK0032CAAZP/FB160C4081 FK or FV can be HP but can be other things
['^FORESEE','^FORESEE','Foresee',''],
['^FOXLINE','^FOXLINE','Foxline',''], # russian vendor?
['^(GALAX\b|Gamer\s?L)','^GALAX','GALAX',''],
['^Galaxy\b','^Galaxy','Galaxy',''],
['^(Garmin|Fenix)','^Garmin','Garmin',''],
@ -8849,8 +8960,10 @@ sub device_vendor {
['^(G[\.]?SKILL)','^G[\.]?SKILL','G.SKILL',''],
['^HDC','^HDC\b','HDC',''],
['^Hectron','^Hectron','Hectron',''],
['^(Hikvision|HKVSN)','^Hikvision','Hikvision',''],
['^Hoodisk','^Hoodisk','Hoodisk',''],
['^HUAWEI','^HUAWEI','Huawei',''],
['^Hyundai','^Hyundai','Hyundai',''],
['^(IBM|DT)','^IBM','IBM',''],
['^IEI Tech','^IEI Tech(\.|nology)?( Corp(\.|oration)?)?','IEI Technology',''],
['^(Imation|Nano\s?Pro|HQT)','^Imation(\sImation)?','Imation',''], # Imation_ImationFlashDrive; TF20 is imation/tdk
@ -8867,7 +8980,7 @@ sub device_vendor {
['^KingDian','^KingDian','KingDian',''],
['^Kingfast','^Kingfast','Kingfast',''],
['^KingMAX','^KingMAX','KingMAX',''],
['^KINGSHARE','^KINGSHARE','KingShare',''],
['^KING\s?SHARE','^KING\s?SHARE','KingShare',''],
['^(KingSpec|ACSC)','^KingSpec','KingSpec',''],
# kingwin docking, not actual drive
['^(EZD|EZ-Dock)','','Kingwin Docking Station',''],
@ -8880,6 +8993,7 @@ sub device_vendor {
['^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
['^LONDISK','^LONDISK','LONDISK',''],
['^M-Systems','^M-Systems','M-Systems',''],
['^(Mach\s*Xtreme|MXSSD)','^Mach\s*Xtreme','Mach Xtreme',''],
['^(MAXTOR|Atlas|TM[0-9]{4})','^MAXTOR','Maxtor',''], # note M2 M3 is usually maxtor, but can be samsung
@ -8889,6 +9003,8 @@ sub device_vendor {
['^MARSHAL\b','^MARSHAL','Marshal',''],
['^MARVELL','^MARVELL','Marvell',''],
['^MDT\b','^MDT','MDT (rebuilt WD/Seagate)',''], # mdt rebuilds wd/seagate hdd
# MD1TBLSSHD, careful with this MD starter!!
['^MD[1-9]','^Max\s*Digital','MaxDigital',''],
['^Medion','^Medion','Medion',''],
['^(MEDIAMAX|WL[0-9]{2})','^MEDIAMAX','MediaMax',''],
['^Monster\s?Digital','^Monster\s?Digital','Monster Digital',''],
@ -8918,6 +9034,7 @@ sub device_vendor {
# DIAMOND_040_GB
['^(SILICON\s?MOTION|SM[0-9])','^SILICON\s?MOTION','Silicon Motion',''],
['^(Silicon\s?Power|SP[CP]C|Silicon|Diamond|Haspeed)','Silicon\s?Power','Silicon Power',''],
['^SINTECHI?','^SINTECHI?','SinTech (adapter)',''],
['Smartbuy','\s?Smartbuy','Smartbuy',''], # SSD Smartbuy 60GB; mSata Smartbuy 3
# HFS128G39TND-N210A; seen nvme with name in middle
['(SK\s?HYNIX|^HF[MS])','\s?SK\s?HYNIX','SK Hynix',''],
@ -8931,7 +9048,7 @@ sub device_vendor {
['^SUNEAST','^SUNEAST','SunEast',''],
# NOTE: F[MNETU] not reliable, g.skill starts with FM too:
# Seagate ST skips STT.
['^(STT|FHM[0-9])','','Super Talent',''],
['^(STT|F[HT]M[0-9])','','Super Talent',''],
['^(SF|Swissbit)','^Swissbit','Swissbit',''],
# ['^(SUPERSPEED)','^SUPERSPEED','SuperSpeed',''], # superspeed is a generic term
['^TANDBERG','^TANDBERG','Tanberg',''],
@ -8957,6 +9074,7 @@ sub device_vendor {
['^(Vseky|Vaseky)','^Vaseky','Vaseky',''], # ata-Vseky_V880_350G_
['^(YUCUN|R880)','^YUCUN','YUCUN',''],
['^(Zheino|CHN[0-9])','^Zheino','Zheino',''],
['^ZSPEED','^ZSPEED','ZSpeed',''],
['^ZTC','^ZTC','ZTC',''],
['^(ASMT|2115)','^ASMT','ASMT (case)',''],
);
@ -8981,8 +9099,8 @@ sub device_vendor {
eval $end if $b_log;
return @data;
}
# Normally hddtemp requires root, but you can set user rights in /etc/sudoers.
# Normally hddtemp requires root, but you can set user rights in /etc/sudoers.
# args: $1 - /dev/<disk> to be tested for
sub hdd_temp {
eval $start if $b_log;
@ -12200,7 +12318,8 @@ sub throttled {
{
package RaidData;
# debugger switches
my ($b_md,$b_zfs);
my $b_md = 0;
my $b_zfs = 0;
sub get {
eval $start if $b_log;
@ -12619,6 +12738,7 @@ sub zfs_data {
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/zpool-list-1-mirror-main-solestar.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/zpool-list-2-mirror-main-solestar.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/zpool-list-v-tank-1.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/zpool-list-v-gojev-1.txt";
#my @working = main::reader($file);$zpool = '';
my @working = main::grabber("$zpool list -v 2>/dev/null");
DiskData::set_glabel() if $bsd_type && !$b_glabel;
@ -12689,8 +12809,8 @@ sub zfs_data {
# gptid/3838f796-5c46-11e6-a931-d05099ac4dc2 - - - - - -
elsif ($row[1] =~ /^(sd[a-z]|[a-z0-9]+[0-9]+|([\S]+)\/.*)$/ &&
($row[2] eq '-' || $row[2] =~ /^[0-9\.]+[MGTP]$/ )){
$row[1] =~ /^([a-z0-9]+[0-9]+|([\S]+)\/.*)\s*(DEGRADED|FAULTED|OFFLINE)?$/;
my $working = $1;
$row[1] =~ /^(sd[a-z]|[a-z0-9]+[0-9]+|([\S]+)\/.*)\s*(DEGRADED|FAULTED|OFFLINE)?$/;
my $working = ($1) ? $1 : ''; # note: the negative case can never happen
my $state = ($3) ? $3 : '';
if ($working =~ /[\S]+\// && @glabel){
$working = DiskData::match_glabel($working);
@ -17056,7 +17176,7 @@ sub get_linux_distro {
}
if ($extra > 0){
my $base_debian_version_distro = 'sidux';
my $base_debian_version_osr = '\belive|lmde|neptune|parrot|pureos|septor|sparky|tails';
my $base_debian_version_osr = '\belive|lmde|neptune|parrot|pureos|rescatux|septor|sparky|tails';
my $base_default = 'antix-version|mx-version'; # osr has base ids
my $base_issue = 'bunsen'; # base only found in issue
my $base_manual = 'blankon|deepin|kali'; # synthesize, no direct data available
@ -17513,8 +17633,8 @@ sub get_kernel_data {
# FreeBSD; siwi.pair.com; 8.2-STABLE; FreeBSD 8.2-STABLE #0: Tue May 31 14:36:14 EDT 2016 erik5@iddhi.pair.com:/usr/obj/usr/src/sys/82PAIRx-AMD64; amd64
if (@uname){
$kernel = $uname[2];
if (check_program('uptrack-uname') && $kernel){
$ksplice = qx(uptrack-uname -rm);
if ( (my $program = check_program('uptrack-uname')) && $kernel){
$ksplice = qx($program -rm);
$ksplice = trimmer($ksplice);
$kernel = ($ksplice) ? $ksplice . ' (ksplice)' : $kernel;
}
@ -17530,7 +17650,11 @@ sub get_kernel_data {
sub get_kernel_bits {
eval $start if $b_log;
my $bits = '';
if (@uname){
if (my $program = check_program('getconf')){
$bits = (grabber("$program LONG_BIT 2>/dev/null"))[0];
}
# fallback test
if (!$bits && @uname){
$bits = $uname[-1];
$bits = ($bits =~ /64/ ) ? 64 : 32;
}
@ -19918,11 +20042,10 @@ sub generate_system_data {
);
$index = scalar(@{ $data{$data_name} } ) - 1;
if ($show{'host'}){
$data{$data_name}[$index]{main::key($num++,'Host')} = &get_hostname();
$data{$data_name}[$index]{main::key($num++,'Host')} = get_hostname();
}
$data{$data_name}[$index]{main::key($num++,'Kernel')} = &get_kernel_data();
$data{$data_name}[$index]{main::key($num++,'bits')} = &get_kernel_bits;
$data{$data_name}[$index]{main::key($num++,'Kernel')} = get_kernel_data();
$data{$data_name}[$index]{main::key($num++,'bits')} = get_kernel_bits();
if ($extra > 0){
my @compiler = get_compiler_version(); # get compiler data
if (scalar @compiler != 2){

12
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2019\-08\-14" inxi "inxi manual"
.TH INXI 1 "2019\-11\-19" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@ -1018,6 +1018,14 @@ Skip SSL certificate checks for all downloader actions (\fB\-U\fR, \fB\-w\fR,
lists, or if you have problems making a connection for any reason. Works with
\fBWget\fR, \fBCurl\fR, and \fBFetch\fR only.
.TP
.B \-\-no\-sudo\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
register errors which will then trigger admin emails in such cases, so if you want to disable
regular user use of sudo (which requires configuration to setup anyway for these options)
just use this option, or \fBNO_SUDO\fR configuration item.
.TP
.B \-\-output [json|screen|xml]\fR
Change data output type. Requires \-\-output\-file if not \fBscreen\fR.
@ -1298,6 +1306,8 @@ Overrides default. See \fB\-\-indent\-min\fR. If \fB80\fR or less, wrap will nev
\fBLIMIT\fR Overrides default of \fB10\fR IP addresses per IF. This is only of interest
to sys admins running servers with many IP addresses.
\fBNO_SUDO\fR Set to \fB1\fR or \fBtrue\fR to disable internal use of \fBsudo\fR.
\fBPARTITION_SORT\fR Overrides default partition output sort. See
\fB\-\-partition\-sort\fR for options.

View file

@ -1,3 +1,62 @@
=====================================================================================
Version: 3.0.37
Patch: 00
Date: 2019-11-19
-----------------------------------
Changes:
-----------------------------------
New version, man page, exciting changes!!
Bugs:
1. issue #200 - forgot to add all variants for -p, now works with --partition-full
and --partitions-full
2. issue #199 - another one, forgot to add --disk to -D for long version. Thanks
adrian15 for both of these, he was testing something and discovered these were
missing.
3. Issue #187 an issue with RAID syntax not being handled in a certain case,
thanks EnochTheWise for following through on this one. This turned out to be
a bad copy paste, a test pattern did not match the match pattern.
Fixes:
1. Fixed some docs typos.
2. Issue #188 fixed protections and filters for some glxinfo output handlers.
3. Issue #195, for Elbrus bit detection.
4. Added filter to cpu data, was not skipping if arm, so Model string
was treated numerically.
Enhancements:
1. Added rescatux to Debian system base detections. This closes issue #202, again
from adrian15, thanks.
2. For cpu architecture, updated for latest AMD ryzen and other families, like
Zen 3, which is just coming out re available data. Also latest Intel, which are
trickier to ID right now, but I think I got the latest ones right,
That's things like coffee lake, amber lake, comet lake, etc.
3. Huge one, full (hopefully out of the box) Russian Elbrus CPU support. Thanks
to the alt-linux and the others who helped provide data and feedback to get support.
Note that this was also part of correcting 64 bit detection for e2k type, which
is how Elbrus IDs internally. See issue #197 which I've left open for the time
being for more information on this CPU and how it's now handled by inxi.
Note all available data should now work for Elbrus, including physical cpu/core
counts etc. Elbrus do not show flag information, nor do they use min/max speed,
so that data isn't available, but everything else seems to work well.
4. Eternal disk vendors. Thanks linux lite hardware database, you continue to
help make the disk vendor feature work by supplying every known vendor ever seen.
5. To close debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942194
Note that the fix is simply to give the user the option to disable this behavior
with the new --no-sudo and NO_SUDO configuration file options. This issue should
never have been filed as a bug since even the poster admitted it was a wishlist
item, but because of how debian bug tracker works, it's hard to get rid of
invalid bugs. Note that this is the internal use of sudo for hddtemp and file,
not starting inxi with sudo, so using this option or configuration item just
removes sudo from the command. Note that because the user did not do as
requested, and never actually filed a github wishlist issue, and since his
request was vague and basically pointless, the fix is just to let you switch
off sudo, that's all.
-----------------------------------
-- Harald Hope - Tue, 19 Nov 2019 20:18:15 -0800
=====================================================================================
Version: 3.0.36
Patch: 00