New version. Bug fixes, updates.

Bugs:
1. Issue #185 exposed a small long standing bug in ram max module size logic.
Was not retaining the value each loop iteration, which could lead to way off
max module size guesses. Note that this could lead to a VERY wrong max module size
report.
2. Issue #185 also exposed a rarely seen undefined value for ram reports, was
not tested for undefined, now is.

Fixes:
1. cleanup of comments in start client debugger that made it unclear.
2. Got rid of all the legacy development modules that were in inxi-perl/modules.
These were totally out of date and pointless to retain.

Enhancements:
1. Added eoan ubuntu 19-10 release name
2. Added zen cpu model ID.
3. Disk vendors and new vendor IDs added. Thanks linuxlite hardware database.
4. Made a backend tool to check for new unhandled disks, this makes updating
disk/vendor IDs a lot easier.
5. Updated inxi-perl/docs with new links etc.
This commit is contained in:
Harald Hope 2019-07-15 19:56:44 -07:00
parent 24667eb49e
commit 0757b3a816
3 changed files with 106 additions and 60 deletions

129
inxi
View file

@ -31,8 +31,8 @@ use POSIX qw(uname strftime ttyname);
## INXI INFO ## ## INXI INFO ##
my $self_name='inxi'; my $self_name='inxi';
my $self_version='3.0.34'; my $self_version='3.0.35';
my $self_date='2019-04-30'; my $self_date='2019-07-15';
my $self_patch='00'; my $self_patch='00';
## END INXI INFO ## ## END INXI INFO ##
@ -142,9 +142,10 @@ sub main {
# print Dumper \@ARGV; # print Dumper \@ARGV;
eval $start if $b_log; eval $start if $b_log;
initialize(); initialize();
## use for start client debugging ## Uncomment these two values for start client debugging
# $debug = 10; # 3 prints timers # $debug = 10; # 3 prints timers
# set_debugger(); # for debugging of konvi issues # set_debugger(); # for debugging of konvi and other start client issues
## legacy method
#my $ob_start = StartClient->new(); #my $ob_start = StartClient->new();
#$ob_start->get_client_data(); #$ob_start->get_client_data();
StartClient::get_client_data(); StartClient::get_client_data();
@ -7877,7 +7878,7 @@ sub cpu_arch {
} }
elsif ($family eq '17'){ elsif ($family eq '17'){
if ( $model =~ /^(1|11)$/ ) {$arch = 'Zen'} if ( $model =~ /^(1|11)$/ ) {$arch = 'Zen'}
elsif ( $model =~ /^(8)$/ ) {$arch = 'Zen+'} elsif ( $model =~ /^(8|18)$/ ) {$arch = 'Zen+'}
elsif ( $model =~ /^2[0123456789ABCDEF]$/ ) {$arch = 'Zen 2'} elsif ( $model =~ /^2[0123456789ABCDEF]$/ ) {$arch = 'Zen 2'}
else {$arch = 'Zen'} else {$arch = 'Zen'}
} }
@ -8738,41 +8739,41 @@ sub device_vendor {
## These go first because they are the most likely and common ## ## These go first because they are the most likely and common ##
['(Crucial|^(FC)?CT|-CT|^M4\b)','Crucial','Crucial',''], ['(Crucial|^(FC)?CT|-CT|^M4\b)','Crucial','Crucial',''],
['^(INTEL|SSD(PAM|SA2))','^INTEL','Intel',''], ['^(INTEL|SSD(PAM|SA2))','^INTEL','Intel',''],
['(KINGSTON|DataTraveler|DT\s?(DUO|Microduo|101)|^SMS|^SHS|^SUV|^Ultimate CF)','KINGSTON','Kingston',''], # maybe SHS: SHSS37A SKC SUV ['(KINGSTON|DataTraveler|DT\s?(DUO|Microduo|101)|^SMS|^SHS|^SUV|^Ultimate CF|HyperX|^S[AV][34]00)','KINGSTON','Kingston',''], # maybe SHS: SHSS37A SKC SUV
# must come before samsung MU. NOTE: toshiba can have: TOSHIBA_MK6475GSX: mush: MKNSSDCR120GB_ # must come before samsung MU. NOTE: toshiba can have: TOSHIBA_MK6475GSX: mush: MKNSSDCR120GB_
['(^MKN|Mushkin)','Mushkin','Mushkin',''], # MKNS ['(^MKN|Mushkin)','Mushkin','Mushkin',''], # MKNS
# MU = Multiple_Flash_Reader too risky: |M[UZ][^L] HD103SI HD start risky # MU = Multiple_Flash_Reader too risky: |M[UZ][^L] HD103SI HD start risky
# HM320II HM320II # HM320II HM320II
['(SAMSUNG|^MCG[0-9]+GC|^MCC|^[GS]2 Portable|^DUO\b|^P3|^(HM|SP)[0-9]{2})','SAMSUNG','Samsung',''], # maybe ^SM, ^HM ['(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
# Android UMS Composite? # Android UMS Composite?
['(SanDisk|^SDS[S]?[DQ]|^SL([0-9]+)G|^AFGCE|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme)','SanDisk','SanDisk',''], ['(SanDisk|^SDS[S]?[DQ]|^SL([0-9]+)G|^AFGCE|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme)','SanDisk','SanDisk',''],
['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test ['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test
# real, SSEAGATE Backup+; XP1600HE30002 | 024 HN (spinpoint) # real, SSEAGATE Backup+; XP1600HE30002 | 024 HN (spinpoint)
['(^ST[^T]|[S]?SEAGATE|^X[AFP]|^5AS|^BUP|Expansion Desk|FreeAgent|GoFlex|Backup(\+|\s?Plus)\s?Hub)','[S]?SEAGATE','Seagate',''], ['(^ST[^T]|[S]?SEAGATE|^X[AFP]|^5AS|^BUP|Expansion Desk|FreeAgent|GoFlex|Backup(\+|\s?Plus)\s?(Hub)?|OneTouch)','[S]?SEAGATE','Seagate',''],
['^(WD|WL[0]9]|Western Digital|My (Book|Passport)|\d*LPCX|Elements|M000|EARX|EFRX|\d*EAVS|0JD|JPVX|[0-9]+(BEV|(00)?AAK|AAV|AZL))','(^WDC|Western\s?Digital)','Western Digital',''], ['^(WD|WL[0]9]|Western Digital|My (Book|Passport)|\d*LPCX|Elements|M000|EARX|EFRX|\d*EAVS|0JD|JPVX|[0-9]+(BEV|(00)?AAK|AAV|AZL|EA[CD]S))','(^WDC|Western\s?Digital)','Western Digital',''],
## Then better known ones ## ## Then better known ones ##
['^(A-DATA|ADATA|AXN|CH11)','^(A-DATA|ADATA)','A-Data',''], ['^(A-DATA|ADATA|AXN|CH11|HV[1-9])','^(A-DATA|ADATA)','A-Data',''],
['^ADTRON','^(ADTRON)','Adtron',''], ['^ADTRON','^(ADTRON)','Adtron',''],
['^ASUS','^ASUS','ASUS',''], ['^ASUS','^ASUS','ASUS',''],
['^ATP','^ATP[\s\-]','ATP',''], ['^ATP','^ATP[\s\-]','ATP',''],
# Force MP500 # Force MP500
['^(Corsair|Force\s|Voyager)','^Corsair','Corsair',''], ['^(Corsair|Force\s|(Flash\s*)?Voyager)','^Corsair','Corsair',''],
['^(FUJITSU|MH[VY]|MP)','^FUJITSU','Fujitsu',''], ['^(FUJITSU|MH[TVWYZ][0-9]|MP|MAP[0-9])','^FUJITSU','Fujitsu',''],
# note: 2012: wdc bought hgst # note: 2012: wdc bought hgst
['^(HGST|Touro|5450)','^HGST','HGST (Hitachi)',''], # HGST HUA ['^(HGST|Touro|5450)','^HGST','HGST (Hitachi)',''], # HGST HUA
['^(Hitachi|HD[ST]|DK[0-9]|IC|HT|HU)','^Hitachi','Hitachi',''], ['^(Hitachi|HD[ST]|DK[0-9]|IC|HT|HU)','^Hitachi','Hitachi',''],
# vb: VB0250EAVER but clashes with vbox; HP_SSD_S700_120G ;GB0500EAFYL GB starter too generic? # vb: VB0250EAVER but clashes with vbox; HP_SSD_S700_120G ;GB0500EAFYL GB starter too generic?
['^(HP\b|MB0|G[BJ]0|v[0-9]{3}[ow])','^HP','HP',''], ['^(HP\b|MB0|G[BJ]0|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; ['^(LSD|Lexar|JumpDrive|JD\s?Firefly)','^Lexar','Lexar',''], # mmc-LEXAR_0xb016546c; JD Firefly;
# OCZSSD2-2VTXE120G is OCZ-VERTEX2_3.5 # OCZSSD2-2VTXE120G is OCZ-VERTEX2_3.5
['^(OCZ|APOC|D2|DEN|DEN|DRSAK|EC188|FTNC|GFGC|MANG|MMOC|NIMC|NIMR|PSIR|TALOS2|TMSC|TRSAK)','^OCZ[\s\-]','OCZ',''], ['^(OCZ|APOC|D2|DEN|DEN|DRSAK|EC188|FTNC|GFGC|MANG|MMOC|NIMC|NIMR|PSIR|RALLY2|TALOS2|TMSC|TRSAK)','^OCZ[\s\-]','OCZ',''],
['^OWC','^OWC[\s\-]','OWC',''], ['^OWC','^OWC[\s\-]','OWC',''],
['^Philips','^Philips','Philips',''], ['^Philips','^Philips','Philips',''],
['^PIONEER','^PIONEER','Pioneer',''], ['^PIONEER','^PIONEER','Pioneer',''],
['^PNY','^PNY\s','PNY','','^PNY'], ['^PNY','^PNY\s','PNY','','^PNY'],
# note: get rid of: M[DGK] becasue mushkin starts with MK # note: get rid of: M[DGK] becasue mushkin starts with MK
# note: seen: KXG50ZNV512G NVMe TOSHIBA 512GB | THNSN51T02DUK NVMe TOSHIBA 1024GB # note: seen: KXG50ZNV512G NVMe TOSHIBA 512GB | THNSN51T02DUK NVMe TOSHIBA 1024GB
['(^[S]?TOS|^THN|TOSHIBA|TransMemory)','[S]?TOSHIBA','Toshiba',''], # scsi-STOSHIBA_STOR.E_EDITION_ ['(^[S]?TOS|^THN|TOSHIBA|TransMemory|^M[KQ][0-9])','[S]?TOSHIBA','Toshiba',''], # scsi-STOSHIBA_STOR.E_EDITION_
## These go last because they are short and could lead to false ID, or are unlikely ## ## These go last because they are short and could lead to false ID, or are unlikely ##
# unknown: AL25744_12345678; ADP may be usb 2.5" adapter; udisk unknown: Z1E6FTKJ 00AAKS # unknown: AL25744_12345678; ADP may be usb 2.5" adapter; udisk unknown: Z1E6FTKJ 00AAKS
# SSD2SC240G726A10 MRS020A128GTS25C EHSAJM0016GB # SSD2SC240G726A10 MRS020A128GTS25C EHSAJM0016GB
@ -8793,6 +8794,7 @@ sub device_vendor {
['^BIWIN','^BIWIN','BIWIN',''], ['^BIWIN','^BIWIN','BIWIN',''],
['^BUFFALO','^BUFFALO','Buffalo',''], ['^BUFFALO','^BUFFALO','Buffalo',''],
['^Centerm','^Centerm','Centerm',''], ['^Centerm','^Centerm','Centerm',''],
['^Centon','^Centon','Centonm',''],
['^CHN\b','','Zheino',''], ['^CHN\b','','Zheino',''],
['^Clover','^Clover','Clover',''], ['^Clover','^Clover','Clover',''],
['^Colorful\b','^Colorful','Colorful',''], ['^Colorful\b','^Colorful','Colorful',''],
@ -8808,20 +8810,23 @@ sub device_vendor {
['^DREVO\b','^DREVO','Drevo',''], ['^DREVO\b','^DREVO','Drevo',''],
['^(Eaget|V8$)','^Eaget','Eaget',''], ['^(Eaget|V8$)','^Eaget','Eaget',''],
['^EDGE','^EDGE','EDGE',''], ['^EDGE','^EDGE','EDGE',''],
['^Elecom','^ElecomE','Elecom',''],
['^EXCELSTOR','^EXCELSTOR( TECHNO(LOGY)?)?','ExcelStor',''], ['^EXCELSTOR','^EXCELSTOR( TECHNO(LOGY)?)?','ExcelStor',''],
['^EZLINK','^EZLINK','EZLINK',''], ['^EZLINK','^EZLINK','EZLINK',''],
['^Fantom','^Fantom( Drive[s]?)?','Fantom Drives',''], ['^Fantom','^Fantom( Drive[s]?)?','Fantom Drives',''],
['^Faspeed','^Faspeed','Faspeed',''], ['^Faspeed','^Faspeed','Faspeed',''],
['^FASTDISK','^FASTDISK','FASTDISK',''], ['^FASTDISK','^FASTDISK','FASTDISK',''],
# FK0032CAAZP/FB160C4081 FK or FV can be HP but can be other things
['^FORESEE','^FORESEE','Foresee',''], ['^FORESEE','^FORESEE','Foresee',''],
['^GALAX\b','^GALAX','GALAX',''], ['^GALAX\b','^GALAX','GALAX',''],
['^Galaxy\b','^Galaxy','Galaxy',''], ['^Galaxy\b','^Galaxy','Galaxy',''],
['^(Garmin|Fenix)','^Garmin','Garmin',''],
['^Geil','^Geil','Geil',''], ['^Geil','^Geil','Geil',''],
['^Generic','^Generic','Generic',''], ['^Generic','^Generic','Generic',''],
['^Gigabyte','^Gigabyte','Gigabyte',''], # SSD ['^Gigabyte','^Gigabyte','Gigabyte',''], # SSD
['^Gigastone','^Gigastone','Gigastone',''], ['^Gigastone','^Gigastone','Gigastone',''],
['^Gloway','^Gloway','Gloway',''], ['^Gloway','^Gloway','Gloway',''],
['^(GOODRAM|IR SSD)','^GOODRAM','GOODRAM',''], ['^(GOODRAM|GOODDRIVE|IR SSD)','^GOODRAM','GOODRAM',''],
# supertalent also has FM: |FM # supertalent also has FM: |FM
['^(G[\.]?SKILL)','^G[\.]?SKILL','G.SKILL',''], ['^(G[\.]?SKILL)','^G[\.]?SKILL','G.SKILL',''],
['^HDC','^HDC\b','HDC',''], ['^HDC','^HDC\b','HDC',''],
@ -8834,8 +8839,9 @@ sub device_vendor {
['^(InnoDisk|Innolite)','^InnoDisk( Corp.)?','InnoDisk',''], ['^(InnoDisk|Innolite)','^InnoDisk( Corp.)?','InnoDisk',''],
['^Innostor','^Innostor','Innostor',''], ['^Innostor','^Innostor','Innostor',''],
['^Innovation','^Innovation','Innovation',''], ['^Innovation','^Innovation','Innovation',''],
['^Innovera','^Innovera','Innovera',''],
['^(INM|Integral|V\s?Series)','^Integral(\s?Memory)?','Integral Memory',''], ['^(INM|Integral|V\s?Series)','^Integral(\s?Memory)?','Integral Memory',''],
['^(Intenso|(Alu|Mobile|Rainbow|Speed) Line)','^Intenso','Intenso',''], ['^(Intenso|(Alu|Basic|Business|Micro|Mobile|Rainbow|Speed|Twister) Line|Rainbow)','^Intenso','Intenso',''],
['^(Iomega|ZIP\b)','^Iomega','Iomega',''], ['^(Iomega|ZIP\b)','^Iomega','Iomega',''],
['^JingX','^JingX','JingX',''], #JingX 120G SSD - not confirmed, but guessing ['^JingX','^JingX','JingX',''], #JingX 120G SSD - not confirmed, but guessing
# NOTE: ITY2 120GB hard to find # NOTE: ITY2 120GB hard to find
@ -8844,17 +8850,20 @@ sub device_vendor {
['^Kingfast','^Kingfast','Kingfast',''], ['^Kingfast','^Kingfast','Kingfast',''],
['^KingMAX','^KingMAX','KingMAX',''], ['^KingMAX','^KingMAX','KingMAX',''],
['^KINGSHARE','^KINGSHARE','KingShare',''], ['^KINGSHARE','^KINGSHARE','KingShare',''],
['^KingSpec','^KingSpec','KingSpec',''], ['^(KingSpec|ACSC)','^KingSpec','KingSpec',''],
# kingwin docking, not actual drive # kingwin docking, not actual drive
['^(EZD|EZ-Dock)','','Kingwin Docking Station',''], ['^(EZD|EZ-Dock)','','Kingwin Docking Station',''],
['^KLEVV','^KLEVV','KLEVV',''],
['^(Lacie|P92)','^Lacie','Lacie',''],
['^LDLC','^LDLC','LDLC',''], ['^LDLC','^LDLC','LDLC',''],
['^Lenovo','^Lenovo','Lenovo',''], ['^Lenovo','^Lenovo','Lenovo',''],
['^RPFT','','Lenovo O.E.M.',''], ['^RPFT','','Lenovo O.E.M.',''],
['^LG\b','^LG','LG',''],
['^(LITE[\-\s]?ON[\s\-]?IT)','^LITE[\-]?ON[\s\-]?IT','LITE-ON IT',''], # LITEONIT_LSS-24L6G ['^(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 ['^(LITE[\-\s]?ON|PH[1-9])','^LITE[\-]?ON','LITE-ON',''], # PH6-CE240-L
['^M-Systems','^M-Systems','M-Systems',''], ['^M-Systems','^M-Systems','M-Systems',''],
['^(MAXTOR|Atlas)','^MAXTOR','Maxtor',''], # note M2 M3 is usually maxtor, but can be samsung ['^(MAXTOR|Atlas|TM[0-9]{4})','^MAXTOR','Maxtor',''], # note M2 M3 is usually maxtor, but can be samsung
['^Memorex','^Memorex','Memorex',''], ['^(Memorex|TravelDrive)','^Memorex','Memorex',''],
# note: C300/400 can be either micron or crucial, but C400 is M4 from crucial # note: C300/400 can be either micron or crucial, but C400 is M4 from crucial
['(^MT|^M5|^Micron|00-MT|C[34]00)','^Micron','Micron',''],# C400-MTFDDAK128MAM ['(^MT|^M5|^Micron|00-MT|C[34]00)','^Micron','Micron',''],# C400-MTFDDAK128MAM
['^MARSHAL\b','^MARSHAL','Marshal',''], ['^MARSHAL\b','^MARSHAL','Marshal',''],
@ -8865,6 +8874,7 @@ sub device_vendor {
['^Morebeck','^Morebeck','Morebeck',''], ['^Morebeck','^Morebeck','Morebeck',''],
['^Motorola','^Motorola','Motorola',''], ['^Motorola','^Motorola','Motorola',''],
['^MTRON','^MTRON','MTRON',''], ['^MTRON','^MTRON','MTRON',''],
['^MXSSD','^Mach\s*Xtreme','Mach Xtreme',''],
['^Netac','^Netac','Netac',''], ['^Netac','^Netac','Netac',''],
['^OOS[1-9]','','Utania',''], ['^OOS[1-9]','','Utania',''],
['^OWC','^OWC\b','OWC',''], ['^OWC','^OWC\b','OWC',''],
@ -8890,7 +8900,7 @@ sub device_vendor {
['^(Silicon\s?Power|SP[CP]C|Silicon|Diamond|Haspeed)','Silicon\s?Power','Silicon Power',''], ['^(Silicon\s?Power|SP[CP]C|Silicon|Diamond|Haspeed)','Silicon\s?Power','Silicon Power',''],
['Smartbuy','\s?Smartbuy','Smartbuy',''], # SSD Smartbuy 60GB; mSata Smartbuy 3 ['Smartbuy','\s?Smartbuy','Smartbuy',''], # SSD Smartbuy 60GB; mSata Smartbuy 3
# HFS128G39TND-N210A; seen nvme with name in middle # HFS128G39TND-N210A; seen nvme with name in middle
['(SK\s?HYNIX|^HFS)','\s?SK\s?HYNIX','SK Hynix',''], ['(SK\s?HYNIX|^HF[MS])','\s?SK\s?HYNIX','SK Hynix',''],
['hynix','hynix','Hynix',''],# nvme middle of string, must be after sk hynix ['hynix','hynix','Hynix',''],# nvme middle of string, must be after sk hynix
['^SH','','Smart Modular Tech.',''], ['^SH','','Smart Modular Tech.',''],
['^Skill','^Skill','Skill',''], ['^Skill','^Skill','Skill',''],
@ -8901,7 +8911,7 @@ sub device_vendor {
['^SUNEAST','^SUNEAST','SunEast',''], ['^SUNEAST','^SUNEAST','SunEast',''],
# NOTE: F[MNETU] not reliable, g.skill starts with FM too: # NOTE: F[MNETU] not reliable, g.skill starts with FM too:
# Seagate ST skips STT. # Seagate ST skips STT.
['^(STT)','','Super Talent',''], ['^(STT|FHM[0-9])','','Super Talent',''],
['^(SF|Swissbit)','^Swissbit','Swissbit',''], ['^(SF|Swissbit)','^Swissbit','Swissbit',''],
# ['^(SUPERSPEED)','^SUPERSPEED','SuperSpeed',''], # superspeed is a generic term # ['^(SUPERSPEED)','^SUPERSPEED','SuperSpeed',''], # superspeed is a generic term
['^TANDBERG','^TANDBERG','Tanberg',''], ['^TANDBERG','^TANDBERG','Tanberg',''],
@ -8915,7 +8925,6 @@ sub device_vendor {
['^TopSunligt','^TopSunligt','TopSunligt',''], # is this a typo? hard to know ['^TopSunligt','^TopSunligt','TopSunligt',''], # is this a typo? hard to know
['^TopSunlight','^TopSunlight','TopSunlight',''], ['^TopSunlight','^TopSunlight','TopSunlight',''],
['^(TS|Transcend|JetFlash)','^Transcend','Transcend',''], ['^(TS|Transcend|JetFlash)','^Transcend','Transcend',''],
# Twister Line but if we slice out Twister it would just say Line
['^(TrekStor|DS maxi)','^TrekStor','TrekStor',''], ['^(TrekStor|DS maxi)','^TrekStor','TrekStor',''],
['^UDinfo','^UDinfo','UDinfo',''], ['^UDinfo','^UDinfo','UDinfo',''],
['^USBTech','^USBTech','USBTech',''], ['^USBTech','^USBTech','USBTech',''],
@ -8927,14 +8936,14 @@ sub device_vendor {
['^VMware','^VMware','VMware',''], ['^VMware','^VMware','VMware',''],
['^(Vseky|Vaseky)','^Vaseky','Vaseky',''], # ata-Vseky_V880_350G_ ['^(Vseky|Vaseky)','^Vaseky','Vaseky',''], # ata-Vseky_V880_350G_
['^(YUCUN|R880)','^YUCUN','YUCUN',''], ['^(YUCUN|R880)','^YUCUN','YUCUN',''],
['^(Zheino|CHN[0-9])','^Zheino','Zheino',''],
['^ZTC','^ZTC','ZTC',''], ['^ZTC','^ZTC','ZTC',''],
['^(ASMT|2115)','^ASMT','ASMT (case)',''], ['^(ASMT|2115)','^ASMT','ASMT (case)',''],
); );
foreach my $ref (@vendors){ foreach my $row (@vendors){
my @row = @$ref; if ($model =~ /$row->[0]/i || ($row->[3] && $serial && $serial =~ /$row->[3]/)){
if ($model =~ /$row[0]/i || ($row[3] && $serial && $serial =~ /$row[3]/)){ $vendor = $row->[2];
$vendor = $row[2]; $model =~ s/$row->[1]//i if $row->[1] && lc($model) ne lc($row->[1]);
$model =~ s/$row[1]//i if $row[1] && lc($model) ne lc($row[1]);
$model =~ s/^[\s\-_]+|[\s\-_]+$//g; $model =~ s/^[\s\-_]+|[\s\-_]+$//g;
$model =~ s/\s\s/ /g; $model =~ s/\s\s/ /g;
@data = ($vendor,$model); @data = ($vendor,$model);
@ -9723,12 +9732,11 @@ sub display_compositor {
['westford','westford','','westford'], ['westford','westford','','westford'],
['xcompmgr','xcompmgr','','xcompmgr'], ['xcompmgr','xcompmgr','','xcompmgr'],
); );
foreach my $ref (@compositors){ foreach my $item (@compositors){
my @item = @$ref;
# no need to use check program with short list of ps_gui # no need to use check program with short list of ps_gui
# if (main::check_program($item[0]) && (grep {/^$item[1]$/} @ps_gui ) ){ # if (main::check_program($item[0]) && (grep {/^$item[1]$/} @ps_gui ) ){
if (grep {/^$item[1]$/} @ps_gui){ if (grep {/^$item->[1]$/} @ps_gui){
$compositor = $item[3]; $compositor = $item->[3];
last; last;
} }
} }
@ -12790,6 +12798,7 @@ sub create_output {
} }
$rows[$j]{main::key($num++,'use')} = $ref{'use'} if $b_non_system; $rows[$j]{main::key($num++,'use')} = $ref{'use'} if $b_non_system;
$rows[$j]{main::key($num++,'slots')} = $ref{'slots'}; $rows[$j]{main::key($num++,'slots')} = $ref{'slots'};
$ref{'eec'} ||= 'N/A';
$rows[$j]{main::key($num++,'EC')} = $ref{'eec'}; $rows[$j]{main::key($num++,'EC')} = $ref{'eec'};
if ($extra > 0 && (!$b_non_system || if ($extra > 0 && (!$b_non_system ||
( main::is_numeric($ref{'max-module-size'}) && $ref{'max-module-size'} > 10 ) ) ){ ( main::is_numeric($ref{'max-module-size'}) && $ref{'max-module-size'} > 10 ) ) ){
@ -12857,8 +12866,8 @@ sub dmidecode_data {
my ($i,$j,$k) = (0,0,0); my ($i,$j,$k) = (0,0,0);
foreach (@dmi){ foreach (@dmi){
my @ref = @$_; my @ref = @$_;
($derived_module_size,$max_cap_5,$max_cap_16,$max_module_size) = (0,0,0,0); ## NOTE: do NOT reset these values, that causes failures
# Portable Battery # ($derived_module_size,$max_cap_5,$max_cap_16,$max_module_size) = (0,0,0,0);
if ($ref[0] == 5){ if ($ref[0] == 5){
$ram[$k] = ({}) if !$ram[$k]; $ram[$k] = ({}) if !$ram[$k];
foreach my $item (@ref){ foreach my $item (@ref){
@ -12891,7 +12900,6 @@ sub dmidecode_data {
next if ! $temp[1]; next if ! $temp[1];
if ($temp[0] eq 'Installed Size'){ if ($temp[0] eq 'Installed Size'){
# get module size # get module size
$size = calculate_size($temp[1],0); $size = calculate_size($temp[1],0);
# get data after module size # get data after module size
$temp[1] =~ s/ Connection\)?//; $temp[1] =~ s/ Connection\)?//;
@ -12915,6 +12923,7 @@ sub dmidecode_data {
$ram[$handle] = $ram[$k] if $ram[$k]; $ram[$handle] = $ram[$k] if $ram[$k];
$ram[$k] = undef; $ram[$k] = undef;
$ram[$handle] = ({}) if !$ram[$handle]; $ram[$handle] = ({}) if !$ram[$handle];
# ($derived_module_size,$max_cap_16) = (0,0);
foreach my $item (@ref){ foreach my $item (@ref){
@temp = split /:\s*/, $item; @temp = split /:\s*/, $item;
next if ! $temp[1]; next if ! $temp[1];
@ -13071,7 +13080,6 @@ sub data_processor {
my $b_debug = 0; my $b_debug = 0;
my (@return,@temp); my (@return,@temp);
my $est = 'est.'; my $est = 'est.';
foreach (@ram){ foreach (@ram){
# because we use the actual array handle as the index, # because we use the actual array handle as the index,
# there will be many undefined keys # there will be many undefined keys
@ -13080,11 +13088,13 @@ sub data_processor {
my ($max_cap,$max_mod_size) = (0,0); my ($max_cap,$max_mod_size) = (0,0);
my ($alt_cap,$est_cap,$est_mod,$unit) = (0,'','',''); my ($alt_cap,$est_cap,$est_mod,$unit) = (0,'','','');
$max_cap = $ref{'max-capacity-16'}; $max_cap = $ref{'max-capacity-16'};
$max_cap ||= 0;
# make sure they are integers not string if empty # make sure they are integers not string if empty
$ref{'slots-5'} ||= 0; $ref{'slots-5'} ||= 0;
$ref{'slots-16'} ||= 0; $ref{'slots-16'} ||= 0;
$ref{'max-capacity-5'} ||= 0; $ref{'max-capacity-5'} ||= 0;
$ref{'max-module-size'} ||= 0; $ref{'max-module-size'} ||= 0;
$ref{'used-capacity'} ||= 0;
#$ref{'max-module-size'} = 0;# debugger #$ref{'max-module-size'} = 0;# debugger
# 1: if max cap 1 is null, and max cap 2 not null, use 2 # 1: if max cap 1 is null, and max cap 2 not null, use 2
if ($b_debug){ if ($b_debug){
@ -13186,11 +13196,14 @@ sub data_processor {
elsif ($ref{'slots-5'} && $ref{'slots-5'} > $ref{'slots-16'}){ elsif ($ref{'slots-5'} && $ref{'slots-5'} > $ref{'slots-16'}){
$slots = $ref{'slots-5'}; $slots = $ref{'slots-5'};
} }
# print "slots: $slots\n" if $b_debug;
if ($ref{'derived-module-size'} * $slots > $max_cap){ if ($ref{'derived-module-size'} * $slots > $max_cap){
$ref{'max-module-size'} = $ref{'derived-module-size'}; $ref{'max-module-size'} = $ref{'derived-module-size'};
print "H\n" if $b_debug;
} }
else { else {
$ref{'max-module-size'} = sprintf("%.f",$max_cap/$slots); $ref{'max-module-size'} = sprintf("%.f",$max_cap/$slots);
print "J\n" if $b_debug;
} }
$est_mod = $est; $est_mod = $est;
} }
@ -13201,7 +13214,7 @@ sub data_processor {
if (!$est_cap && $ref{'max-module-size'} > 0){ if (!$est_cap && $ref{'max-module-size'} > 0){
if ($max_cap > ( $ref{'max-module-size'} * $ref{'slots-16'})){ if ($max_cap > ( $ref{'max-module-size'} * $ref{'slots-16'})){
$est_cap = 'check'; $est_cap = 'check';
print "H\n" if $b_debug; print "K\n" if $b_debug;
} }
} }
} }
@ -13271,11 +13284,12 @@ sub calculate_size {
$data = $1/1024; $data = $1/1024;
#print "d3:$data\n"; #print "d3:$data\n";
} }
#print "d1a: $data s1: $size\n";
if (main::is_numeric($data) && $data > $size ) { if (main::is_numeric($data) && $data > $size ) {
#if ($data =~ /^[0-9][0-9]+$/ && $data > $size ) { #if ($data =~ /^[0-9][0-9]+$/ && $data > $size ) {
$size=$data; $size = $data;
} }
#print "d1: $data s1: $size\n"; #print "d1b: $data s1: $size\n";
} }
else { else {
$size = 0; $size = 0;
@ -16249,18 +16263,17 @@ sub get_env_de_data {
[0,'manokwari','manokwari','manokwari',1,0], [0,'manokwari','manokwari','manokwari',1,0],
[1,'ukui','ukui','ukui-session',0,1], [1,'ukui','ukui','ukui-session',0,1],
); );
foreach my $ref (@desktops){ foreach my $item (@desktops){
my @item = @$ref; # Check if in xdg_desktop OR desktop_session OR if in $item->[6] and in ps_gui
# Check if in xdg_desktop OR desktop_session OR if in $item[6] and in ps_gui if ( (($item->[0] && ($xdg_desktop eq $item->[1] || $desktop_session eq $item->[1] )) ||
if ( (($item[0] && ($xdg_desktop eq $item[1] || $desktop_session eq $item[1] )) || (!$item->[0] && ($xdg_desktop =~ /$item->[1]/ || $desktop_session =~ /$item->[1]/ )) ) ||
(!$item[0] && ($xdg_desktop =~ /$item[1]/ || $desktop_session =~ /$item[1]/ )) ) || ($item->[6] && @ps_gui && (grep {/$item->[6]/} @ps_gui) ) ){
($item[6] && @ps_gui && (grep {/$item[6]/} @ps_gui) ) ){ @data = main::program_values($item->[2]);
@data = main::program_values($item[2]);
$desktop[0] = $data[3]; $desktop[0] = $data[3];
$b_gtk = $item[4]; $b_gtk = $item->[4];
$b_qt = $item[5]; $b_qt = $item->[5];
if ($data[1] && $data[2]){ if ($data[1] && $data[2]){
$desktop[1] = main::program_version($item[3],$data[0],$data[1],$data[2],$data[5],$data[6]); $desktop[1] = main::program_version($item->[3],$data[0],$data[1],$data[2],$data[5],$data[6]);
} }
last; last;
} }
@ -16399,11 +16412,10 @@ sub get_xprop_de_data {
['openbox','openbox_pid','openbox','openbox'], ['openbox','openbox_pid','openbox','openbox'],
['amiwm','amiwm','amiwm','amiwm'], ['amiwm','amiwm','amiwm','amiwm'],
); );
foreach my $ref (@desktops){ foreach my $item (@desktops){
my @item = @$ref; if (main::check_program($item->[0]) && main::awk(\@xprop,$item->[1]) &&
if (main::check_program($item[0]) && main::awk(\@xprop,$item[1]) && (!$item->[4] || (@ps_gui && (grep {/$item->[4]/} @ps_gui ))) ){
(!$item[4] || (@ps_gui && (grep {/$item[4]/} @ps_gui ))) ){ @data = main::program_data($item->[2],$item->[3],0);
@data = main::program_data($item[2],$item[3],0);
$desktop[0] = $data[0]; $desktop[0] = $data[0];
$desktop[1] = $data[1]; $desktop[1] = $data[1];
last; last;
@ -16466,12 +16478,11 @@ sub get_ps_de_data {
['wmx','wmx','wmx','wmx'], ['wmx','wmx','wmx','wmx'],
['xmonad','xmonad','xmonad','xmonad'], ['xmonad','xmonad','xmonad','xmonad'],
); );
foreach my $ref (@desktops){ foreach my $item (@desktops){
my @item = @$ref;
# no need to use check program with short list of ps_gui # no need to use check program with short list of ps_gui
# if ( main::check_program($item[0]) && (grep {/^$item[1]$/} @ps_gui)){ # if ( main::check_program($item[0]) && (grep {/^$item[1]$/} @ps_gui)){
if (grep {/^$item[1]$/} @ps_gui){ if (grep {/^$item->[1]$/} @ps_gui){
@data = main::program_data($item[2],$item[3],0); @data = main::program_data($item->[2],$item->[3],0);
$desktop[0] = $data[0]; $desktop[0] = $data[0];
$desktop[1] = $data[1]; $desktop[1] = $data[1];
last; last;
@ -17213,6 +17224,7 @@ sub ubuntu_id {
$codename = lc($codename); $codename = lc($codename);
my ($id) = (''); my ($id) = ('');
my %codenames = ( my %codenames = (
'eoan' => '19.10',
'disco' => '19.04', 'disco' => '19.04',
'cosmic' => '18.10', 'cosmic' => '18.10',
'bionic' => '18.04 LTS', 'bionic' => '18.04 LTS',
@ -18574,6 +18586,7 @@ sub set_dmidecode_data {
# my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-loki-1.txt"; # my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-loki-1.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-t41-1.txt"; #my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-t41-1.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-mint-20180106.txt"; #my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-mint-20180106.txt";
#my $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-vmware-ram-1.txt";
#open my $fh, '<', $file or die "can't open $file: $!"; #open my $fh, '<', $file or die "can't open $file: $!";
#chomp(@data = <$fh>); #chomp(@data = <$fh>);
} }

4
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2019\-04\-30" inxi "inxi manual" .TH INXI 1 "2019\-07\-15" inxi "inxi manual"
.SH NAME .SH NAME
inxi \- Command line system information script for console and IRC inxi \- Command line system information script for console and IRC
.SH SYNOPSIS .SH SYNOPSIS
@ -1008,7 +1008,7 @@ lists, or if you have problems making a connection for any reason. Works with
.TP .TP
.B \-\-output [json|screen|xml]\fR .B \-\-output [json|screen|xml]\fR
Change data output type. Requires \-\-output\-file if not fBscreen\fR. Change data output type. Requires \-\-output\-file if not \fBscreen\fR.
.TP .TP
.B \-\-output\-file [full path to output file|print]\fR .B \-\-output\-file [full path to output file|print]\fR

View file

@ -1,3 +1,36 @@
=====================================================================================
Version: 3.0.35
Patch: 00
Date: 2019-07-15
-----------------------------------
Changes:
-----------------------------------
New version. Bug fixes, updates.
Bugs:
1. Issue #185 exposed a small long standing bug in ram max module size logic.
Was not retaining the value each loop iteration, which could lead to way off
max module size guesses. Note that this could lead to a VERY wrong max module size
report.
2. Issue #185 also exposed a rarely seen undefined value for ram reports, was
not tested for undefined, now is.
Fixes:
1. cleanup of comments in start client debugger that made it unclear.
2. Got rid of all the legacy development modules that were in inxi-perl/modules.
These were totally out of date and pointless to retain.
Enhancements:
1. Added eoan ubuntu 19-10 release name
2. Added zen cpu model ID.
3. Disk vendors and new vendor IDs added. Thanks linuxlite hardware database.
4. Made a backend tool to check for new unhandled disks, this makes updating
disk/vendor IDs a lot easier.
5. Updated inxi-perl/docs with new links etc.
-----------------------------------
-- Harald Hope - Mon, 15 Jul 2019 19:48:45 -0700
===================================================================================== =====================================================================================
Version: 3.0.34 Version: 3.0.34
Patch: 00 Patch: 00