diff --git a/inxi b/inxi index 0265d1b..f99631a 100755 --- a/inxi +++ b/inxi @@ -1,6 +1,6 @@ #!/usr/bin/env perl ## infobash: Copyright (C) 2005-2007 Michiel de Boer aka locsmif -## inxi: Copyright (C) 2008-2020 Harald Hope +## inxi: Copyright (C) 2008-2021 Harald Hope ## Additional features (C) Scott Rogers - kde, cpu info ## Further fixes (listed as known): Horst Tritremmel ## Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch @@ -40,8 +40,8 @@ use POSIX qw(uname strftime ttyname); ## INXI INFO ## my $self_name='inxi'; -my $self_version='3.2.01'; -my $self_date='2020-12-17'; +my $self_version='3.2.02'; +my $self_date='2021-01-10'; my $self_patch='00'; ## END INXI INFO ## @@ -132,7 +132,7 @@ my %size = ( # Default indentation level. NOTE: actual indent is 1 greater to allow for # spacing 'indent' => 11, -'indent-min' => 90, +'wrap-max' => 90, 'irc' => 100, # shorter because IRC clients have nick lists etc 'max' => 0, 'no-display' => 130, @@ -455,9 +455,8 @@ sub set_os { } } -# This data is hard set top of program but due to a specific project's -# foolish idea that ignoring the FSH totally is somehow a positive step -# forwards for free software, we also have to padd the results with PATH. +# Sometimes users will have more PATHs local to their setup, so we want those +# too. sub set_path { # Extra path variable to make execute failures less likely, merged below my (@path); @@ -1176,7 +1175,7 @@ sub get_config_item { elsif ($key eq 'COLS_MAX_IRC') {$size{'irc'} = $val if is_int($val)} elsif ($key eq 'COLS_MAX_NO_DISPLAY') {$size{'no-display'} = $val if is_int($val)} elsif ($key eq 'INDENT') {$size{'indent'} = $val if is_int($val)} - elsif ($key eq 'INDENT_MIN') {$size{'indent-min'} = $val if is_int($val)} + elsif ($key eq 'WRAP_MAX' || $key eq 'INDENT_MIN') {$size{'wrap-max'} = $val if is_int($val)} # print "mc: key: $key val: $val\n"; # print Dumper (keys %size) . "\n"; } @@ -1685,9 +1684,9 @@ sub display_data { 'clutter-backend' => $ENV{'CLUTTER_BACKEND'}, 'sdl-videodriver' => $ENV{'SDL_VIDEODRIVER'}, # program display values - 'size-indent' => $size{'indent'}, - 'size-indent-min' => $size{'indent-min'}, 'size-cols-max' => $size{'max'}, + 'size-indent' => $size{'indent'}, + 'size-wrap-width' => $size{'wrap-max'}, ); write_data(\%data,'display'); my @cmds = ( @@ -4516,7 +4515,7 @@ sub get_options { $b_skip_dig = 0; }, 'display:s' => sub { my ($opt,$arg) = @_; - if ($arg =~ /^:?([0-9]+)?$/){ + if ($arg =~ /^:?([0-9\.]+)?$/){ $display=$arg; $display ||= ':0'; $display = ":$display" if $display !~ /^:/; @@ -4576,14 +4575,6 @@ sub get_options { $show{'no-host'} = 0}, 'html-wan' => sub { $b_no_html_wan = 0; }, - 'indent-min:i' => sub { - my ($opt,$arg) = @_; - if ($arg =~ /^\d+$/){ - $size{'indent-min'} = $arg; - } - else { - error_handler('bad-arg', $opt, $arg); - }}, 'irc' => sub { $b_irc = 1; }, 'man' => sub { @@ -4710,6 +4701,14 @@ sub get_options { }}, 'wm' => sub { $b_wmctrl = 1 }, + 'wrap-max|indent-min:i' => sub { + my ($opt,$arg) = @_; + if ($arg =~ /^\d+$/){ + $size{'wrap-max'} = $arg; + } + else { + error_handler('bad-arg', $opt, $arg); + }}, '<>' => sub { my ($opt) = @_; error_handler('unknown-option', "$opt", "" ); } @@ -4815,37 +4814,8 @@ sub show_options { ['0', '', '', "Examples:^$self_name^-v4^-c6 OR $self_name^-bDc^6 OR $self_name^-FzjJxy^80" ], ['0', '', '', $line ], - ['0', '', '', "Output Control Options:" ], - ['1', '-a', '--admin', "Adds advanced sys admin data (only works with - verbose or line output, not short form); check man page for explanations!; - also sets --extra=3:" ], - ['2', '-A', '', "If available: list of alternate kernel modules/drivers - for device(s)." ], - ['2', '-C', '', "If available: CPU socket type, base/boost speeds - (dmidecode+root/sudo required); CPU vulnerabilities (bugs); - family, model-id, stepping - format: hex (decimal) if greater - than 9, otherwise hex; microcode - format: hex." ], - ['2', '-d,-D', '', "If available: logical and physical block sizes; drive family; - maj:min, USB drive specifics; SMART report." ], - ['2', '-G', '', "If available: Xorg Display ID, Screens total, default Screen, - current Screen; per X Screen: resolution, dpi, size, diagonal; per Monitor: - resolution; hz; dpi; size; diagonal; list of alternate kernel modules/drivers - for device(s)." ], - ['2', '-I', '', "As well as per package manager counts, also adds total - number of lib files found for each package manager if not -r." ], - ['2', '-j,-p,-P', '', "For swap (if available): swappiness and vfs cache - pressure, and if values are default or not." ], - ['2', '-L', '', "LV, Crypto, devices, components: add maj:min; show - full device/components report (speed, mapped names)." ], - ['2', '-n,-N', '', "If available: list of alternate kernel modules/drivers - for device(s)." ], - ['2', '-o', '', "If available: maj:min of device." ], - ['2', '-p,-P', '', "If available: raw size of ${partition_string}s, maj:min, - percent available for user, block size of file system (root required)." ], - ['2', '-r', '', "Packages, see -Ia." ], - ['2', '-R', '', "mdraid: device maj:min; per component: size, maj:min, state." ], - ['2', '-S', '', "If available: kernel boot parameters." ], - ['1', '-A', '--audio', "Audio/sound card(s), driver, sound server." ], + ['0', '', '', "Output Control Options (see Extra Data Options to extend output):" ], + ['1', '-A', '--audio', "Audio/sound devices(s), driver, sound server." ], ['1', '-b', '--basic', "Basic output, short form. Same as $self_name^-v^2." ], ['1', '-B', '--battery', "System battery info, including charge and condition, plus extra info (if battery present)." ], @@ -4872,7 +4842,7 @@ sub show_options { ['1', '-F', '--full', "Full output. Includes all Upper Case line letters except -W, plus --swap, -s and -n. Does not show extra verbose options such as -d -f -i -l -m -o -p -r -t -u -x, unless specified." ], - ['1', '-G', '--graphics', "Graphics info (card(s), driver, display protocol + ['1', '-G', '--graphics', "Graphics info (devices(s), drivers, display protocol (if available), display server/Wayland compositor, resolution, renderer, OpenGL version)." ], ['1', '-i', '--ip', "WAN IP address and local interfaces (requires ifconfig @@ -4897,9 +4867,9 @@ sub show_options { VM etc.), motherboard, BIOS and, if present, system builder (e.g. Lenovo). Shows UEFI/BIOS/UEFI [Legacy]. Older systems/kernels without the required /sys data can use dmidecode instead, run as root. Dmidecode can be forced with --dmidecode" ], - ['1', '-n', '--network-advanced', "Advanced Network card info. Triggers -N. Shows + ['1', '-n', '--network-advanced', "Advanced Network device info. Triggers -N. Shows interface, speed, MAC id, state, etc. " ], - ['1', '-N', '--network', "Network card(s), driver." ], + ['1', '-N', '--network', "Network device(s), driver." ], ['1', '-o', '--unmounted', "Unmounted $partition_string info (includes UUID and Label if available). Shows file system type if you have lsblk installed (Linux) or, for BSD/GNU Linux, if 'file' installed and you are root or if @@ -4968,6 +4938,49 @@ sub show_options { ); } push(@data, + ['1', '-y', '--width', "Output line width max (integer >= 80). Overrides IRC/Terminal + settings or actual widths. If no integer give, defaults to 80. -1 removes line lengths. + 1 switches output to 1 key/value pair per line. Example:^inxi^-y^130" ], + ['1', '-z', '--filter', "Adds security filters for IP/MAC addresses, serial numbers, + location (-w), user home directory name, host name. Default on for IRC clients." ], + ['1', '', '--filter-label', "Filters out ${partition_string} labels in -j, + -o, -p, -P, -Sa." ], + ['1', '-Z', '--filter-override', "Override for output filters. Useful for + debugging networking issues in IRC, for example." ], + ['1', '', '--filter-uuid', "Filters out ${partition_string} UUIDs in -j, + -o, -p, -P, -Sa." ], + ['0', '', '', "$line" ], + ['0', '', '', "Extra Data Options:" ], + ['1', '-a', '--admin', "Adds advanced sys admin data (only works with + verbose or line output, not short form); check man page for explanations!; + also sets --extra=3:" ], + ['2', '-A', '', "If available: list of alternate kernel modules/drivers + for device(s)." ], + ['2', '-C', '', "If available: CPU socket type, base/boost speeds + (dmidecode+root/sudo required); CPU vulnerabilities (bugs); + family, model-id, stepping - format: hex (decimal) if greater + than 9, otherwise hex; microcode - format: hex." ], + ['2', '-d,-D', '', "If available: logical and physical block sizes; drive family; + maj:min, USB drive specifics; SMART report." ], + ['2', '-G', '', "If available: Xorg Display ID, Screens total, default Screen, + current Screen; per X Screen: resolution, dpi, size, diagonal; per Monitor: + resolution; hz; dpi; size; diagonal; list of alternate kernel modules/drivers + for device(s)." ], + ['2', '-I', '', "As well as per package manager counts, also adds total + number of lib files found for each package manager if not -r." ], + ['2', '-j,-p,-P', '', "For swap (if available): swappiness and vfs cache + pressure, and if values are default or not." ], + ['2', '-L', '', "LV, Crypto, devices, components: add maj:min; show + full device/components report (speed, mapped names)." ], + ['2', '-n,-N', '', "If available: list of alternate kernel modules/drivers + for device(s)." ], + ['2', '-o', '', "If available: maj:min of device." ], + ['2', '-p,-P', '', "If available: raw size of ${partition_string}s, maj:min, + percent available for user, block size of file system (root required)." ], + ['2', '-r', '', "Packages, see -Ia." ], + ['2', '-R', '', "mdraid: device maj:min; per component: size, maj:min, state." ], + ['2', '-S', '', "If available: kernel boot parameters." ], + ['0', '', '', ''], ['1', '-x', '--extra', "Adds the following extra data (only works with verbose or line output, not short form):" ], ['2', '-A', '', "Specific vendor/product information (if relevant); @@ -5011,10 +5024,11 @@ sub show_options { ); if ( $use{'weather'} ){ push(@data, - ['2', '-w -W', '', "Wind speed and direction, humidity, pressure, + ['2', '-w,-W', '', "Wind speed and direction, humidity, pressure, and time zone, if available." ]); } push(@data, + ['0', '', '', ''], ['1', '-xx', '--extra 2', "Show extra, extra data (only works with verbose or line output, not short form):" ], ['2', '-A', '', "Chip vendor:product ID for each audio device." ], @@ -5050,11 +5064,12 @@ sub show_options { ); if ( $use{'weather'} ){ push(@data, - ['2', '-w -W', '', "Snow, rain, precipitation, (last observed hour), + ['2', '-w,-W', '', "Snow, rain, precipitation, (last observed hour), cloud cover, wind chill, dew point, heat index, if available." ] ); } push(@data, + ['0', '', '', ''], ['1', '-xxx', '--extra 3', "Show extra, extra, extra data (only works with verbose or line output, not short form):" ], ['2', '-A', '', "Serial number." ], @@ -5079,22 +5094,11 @@ sub show_options { ); if ( $use{'weather'} ){ push(@data, - ['2', '-w -W', '', "Location (uses -z/irc filter), weather observation + ['2', '-w,-W', '', "Location (uses -z/irc filter), weather observation time, altitude, sunrise/sunset, if available." ] ); } push(@data, - ['1', '-y', '--width', "Output line width max (integer >= 80). Overrides IRC/Terminal - settings or actual widths. If no integer give, defaults to 80. -1 removes line lengths. - 1 switches output to 1 key/value pair per line. Example:^inxi^-y^130" ], - ['1', '-z', '--filter', "Adds security filters for IP/MAC addresses, serial numbers, - location (-w), user home directory name, host item. Default on for IRC clients." ], - ['1', '', '--filter-label', "Filters out ${partition_string} labels in -j, - -o, -p, -P, -Sa." ], - ['1', '-Z', '--filter-override', "Override for output filters. Useful for - debugging networking issues in IRC, for example." ], - ['1', '', '--filter-uuid', "Filters out ${partition_string} UUIDs in -j, - -o, -p, -P, -Sa." ], [0, '', '', "$line" ], [0, '', '', "Additional Options:" ], ['1', '-h', '--help', "This help menu." ], @@ -5135,7 +5139,6 @@ sub show_options { ['1', '', '--hddtemp', "Force use of hddtemp for disk temps." ], ['1', '', '--host', "Turn on hostname for -S." ], ['1', '', '--html-wan', "Overrides configuration item NO_HTML_WAN (resets to default)." ], - ['1', '', '--indent-min', "Set point where $self_name autowraps line starters." ], ['1', '', '--limit', "[-1; 1-x] Set max output limit of IP addresses for -i (default 10; -1 removes limit)." ], ); @@ -5146,7 +5149,8 @@ sub show_options { } push(@data, ['1', '', '--no-dig', "Skip dig for WAN IP checks, use downloader program." ], - ['1', '', '--no-host', "Turn off hostname for -S. Useful if showing output from servers etc." ], + ['1', '', '--no-host', "Turn off hostname for -S. Useful if showing output from servers etc. + -z triggers --no-host." ], ['1', '', '--no-html-wan', "Skip HTML IP sources for WAN IP checks, use dig only, or nothing if --no-dig." ], ); @@ -5184,6 +5188,8 @@ sub show_options { URL output must end in the IP address. See man. Example:^$self_name^-i^--wan-ip-url^https://yoursite.com/ip.php" ], ['1', '', '--wm', "Force wm: to use wmctrl as data source. Default uses ps." ], + ['1', '', '--wrap-max', "Set maximum width where $self_name autowraps line starters + (previously --indent-min). Current: $size{'wrap-max'}" ], ['0', '', '', $line ], ['0', '', '', "Debugging Options:" ], ['1', '', '--dbg', "Specific debuggers, change often. Only 1 is constant:" ], @@ -5994,7 +6000,7 @@ sub generate_json { eval $start if $b_log; my ($data) = @_; my ($json); - my $b_debug = 1; + my $b_debug = 0; my ($b_cpanel,$b_valid); error_handler('not-in-irc', 'help') if $b_irc; print Dumper $data if $b_debug; @@ -6160,7 +6166,7 @@ sub print_data { my ($b_container,$indent_use,$indentx) = (0,0,0); # $size{'max'} = 88; # NOTE: indent < 11 would break the output badly in some cases - if ($size{'max'} < $size{'indent-min'} || $size{'indent'} < 11 ){ + if ($size{'max'} < $size{'wrap-max'} || $size{'indent'} < 11 ){ $indent = 2; } #foreach my $key1 (sort { (split('#', $a))[0] <=> (split('#', $b))[0] } keys %$data) { @@ -6191,6 +6197,7 @@ sub print_data { 'Device' => 1, 'Floppy' => 1, 'Hardware' => 1, # hardware raid report + 'Hub' => 1, 'ID' => 1, 'IF-ID' => 1, 'LV' => 1, @@ -9930,35 +9937,38 @@ sub set_vendors { ['(^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|^MCBOE|\bEVO\b|^[GS]2 Portable|^DS20|^[DG]3 Station|^DUO\b|^P3|^BGN|^[CD]JN|^BJ[NT]|^[BC]WB|^(HM|SP)[0-9]{2}|^MZMPC|^HD[0-9]{3}[A-Z]{2}$)','SAMSUNG','Samsung',''], # maybe ^SM, ^HM + ['(SAMSUNG|^MCG[0-9]+GC|^MCC|^MCBOE|\bEVO\b|^[GS]2 Portable|^DS20|^[DG]3 Station|^DUO\b|^P3|^[BC]GN|^[CD]JN|^BJ[NT]|^[BC]WB|^(HM|SP)[0-9]{2}|^MZMPC|^HD[0-9]{3}[A-Z]{2}$|SV[0-9])','SAMSUNG','Samsung',''], # maybe ^SM, ^HM # Android UMS Composite? - ['(SanDisk|^SDS[S]?[DQ]|^D[AB]4|^SL([0-9]+)G|^AFGCE|^ABLCD|^SDW[1-9]|^U3\b|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme|iXpand)','SanDisk','SanDisk',''], - ['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test + ['(SanDisk|^SDS[S]?[DQ]|^D[AB]4|^SL([0-9]+)G|^AFGCE|^ABLCD|^SDW[1-9]|^U3\b|^SU[0-9]|^DX[1-9]|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme|iXpand)','SanDisk','SanDisk',''], + # these are HP/Sandisk cobranded. DX110064A5xnNMRI ids as HP and Sandisc + ['(^DX[1-9])','^(HP\b|SANDDISK)','Sandisk/HP',''], # ssd drive, must come before seagate ST test # real, SSEAGATE Backup+; XP1600HE30002 | 024 HN (spinpoint) ['(^ST[^T]|[S]?SEAGATE|^X[AFP]|^5AS|^BUP|Expansion Desk|^Expansion|FreeAgent|GoFlex|Backup(\+|\s?Plus)\s?(Hub)?|OneTouch)','[S]?SEAGATE','Seagate',''], - ['^(WD|WL[0]9]|Western Digital|My (Book|Passport)|\d*LPCX|Elements|easystore|MD0|M000|EARX|EFRX|\d*EAVS|0JD|JPVX|[0-9]+(BEV|(00)?AAK|AAV|AZL|EA[CD]S)|3200[AB]|2500[BJ]|5000[AB]|6400[AB]|7500[AB]|i HTS|00[ABL][A-Z]{2})','(^WDC|Western\s?Digital)','Western Digital',''], + ['^(WD|WL[0]9]|Western Digital|My (Book|Passport)|\d*LPCX|Elements|easystore|MD0|M000|EARX|EFRX|\d*EAVS|0JD|JP[CV]|[0-9]+(BEV|(00)?AAK|AAV|AZL|EA[CD]S)|3200[AB]|2500[BJ]|5000[AB]|6400[AB]|7500[AB]|i HTS|00[ABL][A-Z]{2})','(^WDC|Western\s?Digital)','Western Digital',''], + # rare cases WDC is in middle of string + ['(\bWDC\b)','','Western Digital',''], ## THEN BETTER KNOWN ONESs ## - ['^(A-DATA|ADATA|AX[MN]|CH11|HV[1-9]|IM2)','^(A-DATA|ADATA)','A-Data',''], + ['^(A-DATA|ADATA|AX[MN]|CH11|HV[1-9]|IM2|HD[1-9])','^(A-DATA|ADATA)','A-Data',''], ['^ASUS','^ASUS','ASUS',''], # ATCS05 can be hitachi travelstar but not sure ['^ATP','^ATP\b','ATP',''], # Force MP500 - ['^(Corsair|Force\s|(Flash\s*)?(Survivor|Voyager))','^Corsair','Corsair',''], - # MAB3045SP shows as HP or Fujitsu, probably HP branded fujitsu + ['^(Corsair|Force\s|(Flash\s*)?(Survivor|Voyager))','^surge Corsair','Corsair',''], ['^(FUJITSU|MJA|MH[TVWYZ][0-9]|MP|MAP[0-9])','^FUJITSU','Fujitsu',''], + # MAB3045SP shows as HP or Fujitsu, probably HP branded fujitsu + ['^(MAB[0-9])','^(HP\b|FUJITSU)','Fujitsu/HP',''], # note: 2012: wdc bought hgst ['^(HGST|Touro|54[15]0|7250)','^HGST','HGST (Hitachi)',''], # HGST HUA - ['^(Hitachi|HCS|HD[PST]|DK[0-9]|IC|HT|HU|HMS)','^Hitachi','Hitachi',''], + ['^(Hitachi|HCS|HD[PST]|DK[0-9]|IC|HT|HU|HMS|HDE|0G[0-9])','^Hitachi','Hitachi',''], # vb: VB0250EAVER but clashes with vbox; HP_SSD_S700_120G ;GB0500EAFYL GB starter too generic? - # DX110064A5xnNMRI ids as HP and Sandisc, same ID, made by sandisc for hp? not sure - ['^(HP\b|[MV]B[0-6]|G[BJ][01]|DF|0-9]|FK|0-9]|PSS|XR[0-9]{4}|v[0-9]{3}[bgorw]$|x[0-9]{3}[w]$)','^HP','HP',''], + ['^(HP\b|[MV]B[0-6]|G[BJ][0-9]|DF[0-9]|F[BK]|0-9]|PSS|XR[0-9]{4}|v[0-9]{3}[bgorw]$|x[0-9]{3}[w]$)','^HP','HP',''], ['^(Lexar|LSD|JumpDrive|JD\s?Firefly|WorkFlow)','^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',''], ['^OWC','^OWC\b','OWC',''], ['^(Philips|GoGear)','^Philips','Philips',''], ['^PIONEER','^PIONEER','Pioneer',''], - ['^(PNY|Hook\s?Attache|SSD2SC)','^PNY\s','PNY','','^PNY'], + ['^(PNY|Hook\s?Attache|SSD2SC|(SSD7?)?EP7)','^PNY\s','PNY','','^PNY'], # note: get rid of: M[DGK] becasue mushkin starts with MK # note: seen: KXG50ZNV512G NVMe TOSHIBA 512GB | THNSN51T02DUK NVMe TOSHIBA 1024GB ['(^[S]?TOS|^THN|TOSHIBA|TransMemory|^M[GKQ][0-9]|KBG4)','[S]?TOSHIBA','Toshiba',''], # scsi-STOSHIBA_STOR.E_EDITION_ @@ -9970,6 +9980,7 @@ sub set_vendors { ['^Acasis','^Acasis','Acasis (hub)',''], ['^Acclamator','^Acclamator','Acclamator',''], ['^Addlink','^Addlink','Addlink',''], + ['^(ADplus|SuperVer\b)','^ADplus','ADplus',''], ['^ADTRON','^(ADTRON)','Adtron',''], ['^(Advantech|SQF)','^Advantech','Advantech',''], ['^Aireye','^Aireye','Aireye',''], @@ -9999,6 +10010,7 @@ sub set_vendors { ['^(BUFFALO|BSC)','^BUFFALO','Buffalo',''], # usb: BSCR05TU2 ['^Bulldozer','^Bulldozer','Bulldozer',''], ['^BUSlink','^BUSlink','BUSlink',''], + ['^(STMicro|SMI|CBA)','^(STMicroelectronics|SMI)','SMI (STMicroelectronics)',''], ['^Centerm','^Centerm','Centerm',''], ['^Centon','^Centon','Centon',''], ['^(Chipsbank|CHIPSBNK)','^Chipsbank','Chipsbank',''], @@ -10022,6 +10034,8 @@ sub set_vendors { ['^DGM','^DGM\b','DGM',''], ['^Digifast','^Digifast','Digifast',''], ['^DIGITAL\s?FILM','DIGITAL\s?FILM','Digital Film',''], + ['^(Disney|PIX[\s]?JR)','^Disney','Disney',''], + ['^(Doggo|DQ-|Sendisk|Shenchu)','^(doggo|Sendisk(.?Shenchu)?|Shenchu(.?Sendisk)?)','Doggo (SENDISK/Shenchu)',''], ['^(Dogfish|Shark)','^Dogfish(\s*Technology)?','Dogfish Technolgy',''], ['^DragonDiamond','^DragonDiamond','DragonDiamond',''], ['^DREVO\b','^DREVO','Drevo',''], @@ -10034,21 +10048,24 @@ sub set_vendors { ['^Emtec','^Emtec','Emtec',''], ['^Energy','^Energy','Energy',''], ['^Epson','^Epson','Epson',''], + ['^(Etelcom|SSD051)','^Etelcom','Etelcom',''], + # NOTE: ESA3... may be IBM PCIe SAD card/drives ['^EXCELSTOR','^EXCELSTOR( TECHNO(LOGY)?)?','ExcelStor',''], ['^EZLINK','^EZLINK','EZLINK',''], ['^Fantom','^Fantom( Drive[s]?)?','Fantom Drives',''], ['^Faspeed','^Faspeed','Faspeed',''], ['^FASTDISK','^FASTDISK','FASTDISK',''], + ['^Festtive','^Festtive','Festtive',''], ['^FiiO','^FiiO','FiiO',''], ['^Fordisk','^Fordisk','Fordisk',''], # FK0032CAAZP/FB160C4081 FK or FV can be HP but can be other things - ['^FORESEE','^FORESEE','Foresee',''], + ['^FORESEE','^FORESEE','ForeseSU04Ge',''], ['^(FOXLINE|FLD)','^FOXLINE','Foxline',''], # russian vendor? ['^(GALAX\b|Gamer\s?L)','^GALAX','GALAX',''], ['^Galaxy\b','^Galaxy','Galaxy',''], ['^(Garmin|Fenix|Nuvi|Zumo)','^Garmin','Garmin',''], ['^Geil','^Geil','Geil',''], - ['^Generic','^Generic','Generic',''], + ['^Generic','^Generic','GeneriSU04Gc',''], ['^Gigabyte','^Gigabyte','Gigabyte',''], # SSD ['^Gigastone','^Gigastone','Gigastone',''], ['^Gloway','^Gloway','Gloway',''], @@ -10092,17 +10109,19 @@ sub set_vendors { ['^KingDian','^KingDian','KingDian',''], ['^Kingfast','^Kingfast','Kingfast',''], ['^KingMAX','^KingMAX','KingMAX',''], - ['^Kingrich','^Kingrich','Kingrich',''], + ['^Kingrich','^Kingrich','KingrSU04Gich',''], ['^KING\s?SHARE','^KING\s?SHARE','KingShare',''], - ['^(KingSpec|ACSC)','^KingSpec','KingSpec',''], + ['^(KingSpec|ACSC|KS[DQ]|NT-[0-9]|P4\b|PA18)','^KingSpec','KingSpec',''], ['^KingSSD','^KingSSD','KingSSD',''], # kingwin docking, not actual drive ['^(EZD|EZ-Dock)','','Kingwin Docking Station',''], ['(KIOXIA|^K[BX]G[0-9])','KIOXIA','KIOXIA',''], # company name comes after product ID ['^KLEVV','^KLEVV','KLEVV',''], ['^Kodak','^Kodak','Kodak',''], + ['^KUNUP','^KUNUP','KUNUP',''], ['^(Lacie|P92|itsaKey|iamaKey)','^Lacie','LaCie',''], ['^LANBO','^LANBO','LANBO',''], + ['^LANTIC','^LANTIC','Lantic',''], ['^LDLC','^LDLC','LDLC',''], # LENSE30512GMSP34MEAT3TA / UMIS RPITJ256PED2MWX ['^(LEN|UMIS)','^Lenovo','Lenovo',''], @@ -10115,7 +10134,7 @@ sub set_vendors { ['^M-Systems','^M-Systems','M-Systems',''], ['^(Mach\s*Xtreme|MXSSD|MXU)','^Mach\s*Xtreme','Mach Xtreme',''], ['^Maximus','^Maximus','Maximus',''], - ['^(MAXTOR|Atlas|TM[0-9]{4})','^MAXTOR','Maxtor',''], # note M2 M3 is usually maxtor, but can be samsung + ['^(MAXTOR|Atlas|TM[0-9]{4}|[KL]0[1-9])','^MAXTOR','Maxtor',''], # note M2 M3 is usually maxtor, but can be samsung ['^(Memorex|TravelDrive|TD\s?Classic)','^Memorex','Memorex',''], # 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 @@ -10128,12 +10147,15 @@ sub set_vendors { ['^Medion','^Medion','Medion',''], ['^(MEDIAMAX|WL[0-9]{2})','^MEDIAMAX','MediaMax',''], ['^Mengmi','^Mengmi','Mengmi',''], + ['^(Microsoft|S31)','^Microsoft','Microsoft',''], ['^MidasForce','^MidasForce','MidasForce',''], + ['^(Mimoco|Mimobot)','^Mimoco','Mimoco',''], ['^MINIX','^MINIX','MINIX',''], ['^Miracle','^Miracle','Miracle',''], # Monster MONSTER DIGITAL - ['^(Monster\s)+Digital','^(Monster\s)+Digital','Monster Digital',''], + ['^(Monster\s)+(Digital)?|OD[\s-]?ADVANCE','^(Monster\s)+(Digital)?','Monster Digital',''], ['^Morebeck','^Morebeck','Morebeck',''], + ['^(Motile|SSM[0-9])','^Motile','Motile',''], ['^(Motorola|XT[0-9]{4})','^Motorola','Motorola',''], ['^Moweek','^Moweek','Moweek',''], #MRMAD4B128GC9M2C @@ -10143,22 +10165,24 @@ sub set_vendors { ['^MTRON','^MTRON','MTRON',''], ['^(Neo\s*Forza|NFS[0-9])','^Neo\s*Forza','Neo Forza',''], ['^Netac','^Netac','Netac',''], + # NGFF is a type, like msata, sata ['^Nik','^Nikimi','Nikimi',''], ['^Orico','^Orico','Orico',''], ['^OSC','^OSC\b','OSC',''], ['^OWC','^OWC\b','OWC',''], ['^oyunkey','^oyunkey','Oyunkey',''], ['^PALIT','PALIT','Palit',''], # ssd + ['^Panram','^Panram','Panram',''], # ssd ['^(Pasoul|OASD)','^Pasoul','Pasoul',''], + ['^(Patriot|PS[8F]|VPN|Viper)','^Patriot([-\s]?Memory)?','Patriot',''],#Viper M.2 VPN100 ['^PERC\b','','Dell PowerEdge RAID Card',''], # ssd - ['^(PS[8F]|Patriot)','^Patriot([-\s]?Memory)?','Patriot',''], ['PHISON[\s-]?','PHISON[\s-]?','Phison',''],# E12-256G-PHISON-SSD-B3-BB1 ['^Pioneer','Pioneer','Pioneer',''], - ['^PIX[\s]?JR','^PIX[\s]?JR','Disney',''], ['^(PLEXTOR|PX-)','^PLEXTOR','Plextor',''], ['^(PQI|Intelligent\s?Stick)','^PQI','PQI',''], ['^(Premiertek|QSSD|Quaroni)','^Premiertek','Premiertek',''], - ['^Pretec','Pretec','Pretec',''], + ['^(Pretec|UltimateGuard)','Pretec','Pretec',''], + # PS3109S9 is the result of an error condition with ssd drive ['QEMU','^[0-9]*QEMU( QEMU)?','QEMU',''], # 0QUEMU QEMU HARDDISK ['(^Quantum|Fireball)','^Quantum','Quantum',''], ['^QUMO','^QUMO','Qumo',''], @@ -10175,15 +10199,16 @@ sub set_vendors { ['^Sannobel','^Sannobel','Sannobel',''], # SATADOM can be innodisk or supermirco: dom == disk on module # SATAFIRM is an ssd failure message + ['^(Sea\s?Tech|Transformer)','^Sea\s?Tech','Sea Tech',''], ['^SigmaTel','^SigmaTel','SigmaTel',''], # 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',''], + ['(Silicon[\s-]?Power|^SP[CP]C|^Silicon|^Diamond|^HasTopSunlightpeed)','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]|^H[BC]G)','\s?SK\s?HYNIX','SK Hynix',''], - ['hynix','hynix','Hynix',''],# nvme middle of string, must be after sk hynix + ['(hynix|^HAG[0-9]|h[BC]8aP)','hynix','Hynix',''],# nvme middle of string, must be after sk hynix ['^SH','','Smart Modular Tech.',''], ['^Skill','^Skill','Skill',''], ['^(SMART( Storage Systems)?|TX)','^(SMART( Storage Systems)?)','Smart Storage Systems',''], @@ -10198,6 +10223,7 @@ sub set_vendors { ['^(Super\s*Talent|STT|F[HTZ]M[0-9]|PicoDrive|Teranova)','','Super Talent',''], ['^(SF|Swissbit)','^Swissbit','Swissbit',''], # ['^(SUPERSPEED)','^SUPERSPEED','SuperSpeed',''], # superspeed is a generic term + ['^Taisu','^Taisu','Taisu',''], ['^(TakeMS|ColorLine)','^TakeMS','TakeMS',''], ['^Tammuz','^Tammuz','Tammuz',''], ['^TANDBERG','^TANDBERG','Tanberg',''], @@ -10207,6 +10233,7 @@ sub set_vendors { ['^TEAM','^TEAM(\s*Group)?','TeamGroup',''], ['^(Teclast|CoolFlash)','^Teclast','Teclast',''], ['^Teelkoou','^Teelkoou','Teelkoou',''], + ['^Tele2','^Tele2','Tele2',''], ['^Teleplan','^Teleplan','Teleplan',''], ['^TEUTONS','^TEUTONS','TEUTONS',''], ['^Tigo','^Tigo','Tigo',''], @@ -10214,12 +10241,14 @@ sub set_vendors { ['^TKD','^TKD','TKD',''], ['^TopSunligt','^TopSunligt','TopSunligt',''], # is this a typo? hard to know ['^TopSunlight','^TopSunlight','TopSunlight',''], + ['^TOROSUS','^TOROSUS','Torosus',''], ['^([F]?TS|Transcend|JetDrive|JetFlash|USDU)','^Transcend','Transcend',''], - ['^(TrekStor|DS maxi)','^TrekStor','TrekStor',''], + ['^(TrekStor|DS maxi|DataStation)','^TrekStor','TrekStor',''], ['^UDinfo','^UDinfo','UDinfo',''], ['^USBTech','^USBTech','USBTech',''], ['^(UNIC2)','^UNIC2','UNIC2',''], ['^(UG|Unigen)','^Unigen','Unigen',''], + ['^(USBest|UT16)','^USBest','USBest',''], ['^(OOS[1-9]|Utania)','Utania','Utania',''], ['^U-TECH','U-TECH','U-Tech',''], ['^VBOX','','VirtualBox',''], @@ -10251,6 +10280,7 @@ sub set_vendors { ); eval $end if $b_log; } + # receives space separated string that may or may not contain vendor data sub device_vendor { eval $start if $b_log; @@ -10728,17 +10758,18 @@ sub display_data(){ else { $driver = $drivers[0]; } + $row[0]->{main::key($num++,1,2,'driver')} = ''; $driver ||= 'N/A'; - $row[0]->{main::key($num++,0,2,'driver')} = $driver; + $row[0]->{main::key($num++,1,3,'loaded')} = $driver; if ($driver_missing){ - $row[0]->{main::key($num++,0,3,'note')} = $driver_missing; - } - if ($drivers[2]){ - $row[0]->{main::key($num++,0,3,'FAILED')} = $drivers[2]; + $row[0]->{main::key($num++,0,4,'note')} = $driver_missing; } if ($drivers[1]){ $row[0]->{main::key($num++,0,3,'unloaded')} = $drivers[1]; } + if ($drivers[2]){ + $row[0]->{main::key($num++,0,3,'failed')} = $drivers[2]; + } if ($extra > 1 && $drivers[3]){ $row[0]->{main::key($num++,0,3,'alternate')} = $drivers[3]; } @@ -11473,8 +11504,10 @@ sub get { lvm_data() if !$b_lvm_data; if (!@lvm){ my $key = 'Message'; + # note: arch linux has a bug where lvs returns 0 if non root start + my $message = ($b_active_lvm) ? $alerts{'lvs'}->{'permissions'} : main::row_defaults('lvm-data',''); push(@rows, { - main::key($num++,0,1,$key) => main::row_defaults('lvm-data',''), + main::key($num++,0,1,$key) => $message, },); } else { @@ -11488,7 +11521,8 @@ sub get { main::key($num++,0,1,$key) => $alerts{'lvs'}->{'permissions'}, },); } - elsif (@lsblk && !$b_active_lvm && $alerts{'lvs'}->{'action'} eq 'permissions'){ + elsif (@lsblk && !$b_active_lvm && ($alerts{'lvs'}->{'action'} eq 'permissions' || + $alerts{'lvs'}->{'action'} eq 'missing')){ my $key = 'Message'; push(@rows, { main::key($num++,0,1,$key) => main::row_defaults('lvm-data',''), @@ -11617,7 +11651,7 @@ sub create_recursive_components { #print "inside: -n", Data::Dumper::Dumper $component->[$i]; $$j = scalar @$rows if $b_admin; my $id; - if ($component->[0][0] =~ /^(bcache|dm-|md)[0-9]/){ + if ($component->[0] =~ /^(bcache|dm-|md)[0-9]/){ $id = $c .'-' . $m; $m++; } @@ -11625,16 +11659,16 @@ sub create_recursive_components { $id = $p . '-' . $l; $l++; } - $$rows[$$j]->{main::key($$num++,1,$l2,$id)} = $component->[0][0]; + $$rows[$$j]->{main::key($$num++,1,$l2,$id)} = $component->[0]; if ($extra > 1){ if ($b_admin){ - $$rows[$$j]->{main::key($$num++,0,$l3,'maj-min')} = $component->[0][1]; - $$rows[$$j]->{main::key($$num++,0,$l3,'mapped')} = $component->[0][3] if $component->[0][3]; - $size = main::get_size($component->[0][2],'string','N/A'); + $$rows[$$j]->{main::key($$num++,0,$l3,'maj-min')} = $component->[1]; + $$rows[$$j]->{main::key($$num++,0,$l3,'mapped')} = $component->[3] if $component->[3]; + $size = main::get_size($component->[2],'string','N/A'); $$rows[$$j]->{main::key($$num++,0,$l3,'size')} = $size; } #next if !$component->[$i][4]; - for (my $i = 1; $i < scalar @$component; $i++){ + for (my $i = 4; $i < scalar @$component; $i++){ create_recursive_components($type,$j,$num,$rows,$component->[$i],$indent+1,$c.'c',$p.'p'); } } @@ -11802,10 +11836,10 @@ sub recursive_component_data { if ($device =~ /^(bcache|dm-|md)[0-9]+$/){ $mapped = $dmmapper{$device}; $raw_logical[1] += $part[2] if $mapped && $mapped =~ /_(cdata|cmeta)$/; - push(@components, [[$device,$mm2,$part[2],$mapped],[recursive_component_data($mm2)]]); + push(@components, [$device,$mm2,$part[2],$mapped,[recursive_component_data($mm2)]]); } else { - push(@components,[[$device,$mm2,$part[2]]]); + push(@components,[$device,$mm2,$part[2]]); } } eval $end if $b_log; @@ -14509,7 +14543,7 @@ sub create_output_md { $rows[$j]->{main::key($num++,1,2,'Components')} = ''; my $b_bump; create_components_output('mdraid','Online',\@rows,\@components_good,\$j,\$num,\$b_bump); - create_components_output('mdraid','FAILED',\@rows,\@failed,\$j,\$num,\$b_bump); + create_components_output('mdraid','Failed',\@rows,\@failed,\$j,\$num,\$b_bump); create_components_output('mdraid','Spare',\@rows,\@spare,\$j,\$num,\$b_bump); if ($row->{'recovery-percent'}){ $j = scalar @rows; @@ -14632,7 +14666,7 @@ sub create_output_zfs { $rows[$j]->{main::key($num++,1,3,'Components')} = ''; my $b_bump; create_components_output('zfs','Online',\@rows,\@components_good,\$j,\$num,\$b_bump); - create_components_output('zfs','FAILED',\@rows,\@failed,\$j,\$num,\$b_bump); + create_components_output('zfs','Failed',\@rows,\@failed,\$j,\$num,\$b_bump); create_components_output('zfs','Available',\@rows,\@spare,\$j,\$num,\$b_bump); } } @@ -18062,7 +18096,7 @@ sub unmounted_filesystem { } } -## UsbData +## UsbData$base_arch_distro$base_arch_distro { package UsbData; @@ -18869,6 +18903,7 @@ sub get_compiler_version_linux { #$result='Linux version 5.8.0-18-generic (buildd@lgw01-amd64-057) (gcc (Ubuntu 10.2.0-5ubuntu2) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35) #19-Ubuntu SMP Wed Aug 26 15:26:32 UTC 2020'; # $result='Linux version 5.8.9-fw1 (fst@x86_64.frugalware.org) (gcc (Frugalware Linux) 9.2.1 20200215, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Tue Sep 15 16:38:57 CEST 2020'; # $result='Linux version 5.8.0-2-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.0-9) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35) #1 SMP Debian 5.8.10-1 (2020-09-19)'; + $result='Linux version 5.9.0-5-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-1) 10.2.1 20201207, GNU ld (GNU Binutils for Debian) 2.35.1) #1 SMP Debian 5.9.15-1 (2020-12-17)'; if ($result =~ /(gcc|clang).*version\s([\S]+)/){ $version = $2; $version ||= 'N/A'; @@ -19825,6 +19860,10 @@ sub get_linux_distro { } } if ($extra > 0){ + my $base_arch_distro = 'anarchy|antergos|archbang|archlabs|archman|archstrike|arco|artix'; + $base_arch_distro .= '|blackarch|bluestar|chakra|ctios|endeavour|hyperbola|kaos|linhes'; + $base_arch_distro .= '|manjaor|mysys2|netrunner\s?rolling|ninja|obarun|parabola'; + $base_arch_distro .= '|puppyrus-?a|reborn|snal|talkingarch|ubos'; my $base_debian_version_distro = 'sidux'; 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 @@ -19889,6 +19928,9 @@ sub get_linux_distro { ); $system_base = $manual{$id}; } + if (!$system_base && $distro && $distro =~ /^($base_arch_distro)/i){ + $system_base = 'Arch Linux'; + } if ($distro && -d '/etc/salixtools/' && $distro =~ /Slackware/i){ $system_base = $distro; } @@ -22307,14 +22349,14 @@ sub lsusb_data { eval $start if $b_log; my (@temp); my @data = data_grabber('lsusb'); - foreach (@data){ next if /^\s*$|^Couldn't/; # expensive second call: || /UNAVAIL/ @working = split(/\s+/, $_); + next unless defined $working[1] && defined $working[3]; $working[3] =~ s/:$//; # Seen FreeBSD lsusb with: # Bus /dev/usb Device /dev/ugen0.3: ID 24ae:1003 Shenzhen Rapoo Technology Co., Ltd. - next if !main::is_numeric($working[1]) || !main::is_numeric($working[3]); + next unless main::is_numeric($working[1]) && main::is_numeric($working[3]); $addr_id = int($working[3]); $bus_id = int($working[1]); $path_id = "$bus_id-$addr_id"; @@ -22382,7 +22424,7 @@ sub usbdevs_data { $port_value = ''; $working[0] = $bus_id; $working[1] = $addr_id; - $working[2] = $path_id; + $working[2] = $path; $working[3] = ''; $working[4] = 9; $working[5] = ''; diff --git a/inxi.1 b/inxi.1 index 822e29b..953842d 100644 --- a/inxi.1 +++ b/inxi.1 @@ -1,4 +1,4 @@ -.TH INXI 1 "2020\-12\-17" inxi "inxi manual" +.TH INXI 1 "2021\-01\-10" inxi "inxi manual" .SH NAME inxi \- Command line system information script for console and IRC @@ -64,7 +64,7 @@ keep things simple. .TP .B \-A\fR,\fB \-\-audio\fR -Show Audio/sound card(s) information, including card driver. +Show Audio/sound device(s) information, including device driver. .TP .B \-b\fR,\fB \-\-basic\fR @@ -222,7 +222,8 @@ the command, e.g.: \fBinxi \-Frmxx\fR .TP .B \-G\fR,\fB \-\-graphics\fR -Show Graphic card(s) information, including details of card and card driver, +Show Graphic device(s) information, including details of device and display drivers +(\fBloaded:\fR, and, if applicable: \fBunloaded:\fR, \fBfailed:\fR), display protocol (if available), display server (and/or Wayland compositor), vendor and version number, e.g.: @@ -327,7 +328,7 @@ Sample: cc\-1: dm\-26 ppp\-1: sdj2 cc\-2: dm\-27 ppp\-1: sdk2\fR .nf -\fBLV-5: lvm_raid1 type: raid1 dm: dm\-16 size: 4.88 GiB +\fBLV\-5: lvm_raid1 type: raid1 dm: dm\-16 size: 4.88 GiB RAID: stripes: 2 sync: idle copied: 100% mismatches: 0 Components: c\-1: dm\-10 pp\-1: sdd1 c\-2: dm\-11 pp\-1: sdd1 c\-3: dm\-13 pp\-1: sde1 c\-4: dm\-15 pp\-1: sde1\fR @@ -339,17 +340,17 @@ components (cc\-1,2), dm\-26 and dm\-27. These are respectively made from physic devices (p\-1) sdj2 and sdk2. .nf -\fBDevice-10: mybackup - maj-min: 254:28 +\fBDevice\-10: mybackup + maj\-min: 254:28 type: LUKS - dm: dm-28 + dm: dm\-28 size: 6.36 GiB Components: c\-1: md1 maj\-min: 9:1 size: 6.37 GiB - cc-1: dm\-26 - maj-min: 254:26 + cc\-1: dm\-26 + maj\-min: 254:26 mapped: vg5\-level1a size: 12.28 GiB ppp\-1: sdj2 @@ -359,7 +360,7 @@ devices (p\-1) sdj2 and sdk2. maj\-min: 254:27 mapped: vg5\-level1b size: 6.38 GiB - ppp-1: sdk2 + ppp\-1: sdk2 maj\-min: 8:162 size: 12.79 GiB\fR .fi @@ -409,12 +410,12 @@ If the detected speed is logically absurd, like 1 MT/s or 69910 MT/s, adds: .nf \fBMemory: RAM: total: 31.38 GiB used: 20.65 GiB (65.8%) - Array-1: capacity: N/A slots: 4 note: check EC: N/A - Device-1: DIMM_A1 size: 8 GiB speed: 1600 MT/s (800 MHz) - Device-2: DIMM_A2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) + Array\-1: capacity: N/A slots: 4 note: check EC: N/A + Device\-1: DIMM_A1 size: 8 GiB speed: 1600 MT/s (800 MHz) + Device\-2: DIMM_A2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) actual: 61910 MT/s (30955 MHz) note: check - Device-3: DIMM_B1 size: 8 GiB speed: 1600 MT/s (800 MHz) - Device-4: DIMM_B2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) + Device\-3: DIMM_B1 size: 8 GiB speed: 1600 MT/s (800 MHz) + Device\-4: DIMM_B2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) actual: 2 MT/s (1 MHz) note: check\fR .fi @@ -452,12 +453,12 @@ blade, plus some obscure stuff that inxi is unlikely to ever run on. .TP .B \-n\fR,\fB \-\-network\-advanced\fR -Show Advanced Network card information in addition to that produced by \fB\-N\fR. +Show Advanced Network device information in addition to that produced by \fB\-N\fR. Shows interface, speed, MAC ID, state, etc. .TP .B \-N\fR,\fB \-\-network\fR -Show Network card(s) information, including card driver. With \fB\-x\fR, shows PCI BusID, +Show Network device(s) information, including device driver. With \fB\-x\fR, shows PCI BusID, Port number. .TP @@ -538,7 +539,7 @@ RAID actually can be made to give the required output. The component ID numbers work like this: mdraid: the numerator is the actual mdraid component number; ZFS: the numerator is -auto-incremented counter only. Eg. \fBOnline: 1: sdb1\fR +auto\-incremented counter only. Eg. \fBOnline: 1: sdb1\fR If hardware RAID is detected, shows basic information. Due to complexity of adding hardware RAID device disk / RAID reports, those will only be added @@ -933,7 +934,7 @@ specific vendor [product] information. \- Adds \fBmapper:\fR (the \fB/dev/mapper/\fR partitioni ID) if mapped partition. -Example: \fBID-4: /home ... dev: /dev/dm-6 mapped: ar0-home\fR +Example: \fBID\-4: /home ... dev: /dev/dm-6 mapped: ar0-home\fR .TP .B \-x \-r\fR @@ -1375,7 +1376,7 @@ Sample (with both \fBxdpyinfo\fR and \fBxrandr\fR data available): \fBinxi \-aG Graphics: .... -Display: x11 server: X.Org 1.20.6 driver: modesetting +Display: x11 server: X.Org 1.20.6 driver: loaded: modesetting display ID: :0.0 screens: 1 Screen\-1: 0 s\-res: 2560x1024 s\-dpi: 96 s\-size: 677x271mm (26.7x10.7") s\-diag: 729mm (28.7") @@ -1386,7 +1387,7 @@ size: 376x301mm (14.8x11.9") diag: 482mm (19") ....\fR .fi \- Adds, if present, possible \fBalternate:\fR kernel modules capable of driving -each \fBDevice\-x\fR (not including the current \fBdriver:\fR). If no non\-driver +each \fBDevice\-x\fR (not including the current \fBloaded:\fR). If no non\-driver modules found, shows nothing. NOTE: just because it lists a module does NOT mean it is available in the system, it's just something the kernel knows could possibly be used instead. @@ -1553,14 +1554,6 @@ Temporary override of \fBNO_HTML_WAN\fR configuration item. Only use to test w/w HTML downloaders for WAN IP. Restores default behavior for WAN IP, which is use HTML downloader if present and if dig failed. -.TP -.B \-\-indent\-min [integer]\fR -Overrides default indent minimum value. This is the value that makes inxi change from -wrapped line starters [like \fBInfo\fR] to non wrapped. If less than \fB80\fR, -no wrapping will occur. Overrides internal default value and user configuration value: - -\fBINDENT_MIN=85\fR - .TP .B \-\-limit [\-1 \- x]\fR Raise or lower max output limit of IP addresses for \fB\-i\fR. \fB\-1\fR removes limit. @@ -1581,7 +1574,7 @@ faster and more reliable in general than other methods. Turns off hostname in System line. This is default when using \fB\-z\fR, for anonymizing inxi output for posting on forums or IRC. Overrides configuration value (if set): - +indent\-min \fBSHOW_HOST='true'\fR \- Same as: \fBSHOW_HOST='false'\fR This is an absolute override, the host will not show no matter what other @@ -1674,16 +1667,16 @@ Example: \fBinxi \-sxx \-\-sensors\-exclude k10temp-pci-00c3\fR .B \-\-sensors\-use\fR Use only the (comma separated) sensor arrays for \fB\-s\fR output. Make permanent with \fBSENSORS_USE\fR configuration item. Sensor array ID value must be the exact -value shown in lm-sensors sensors output (Linux/lm-sensors only). If you only want +value shown in lm\-sensors sensors output (Linux/lm-sensors only). If you only want to exclude one (or more) sensors from the output, use \fB\-\-sensors\-exlude\fR. Can be useful if the default sensor data used by inxi is not from the right sensor array. Note that all other sensor data will be removed, which may lead to undesired -consequences. Please be aware that this can lead to many undesirable side-effects, +consequences. Please be aware that this can lead to many undesirable side\-effects, since default behavior is to use all the sensors arrays and select which values to use from them following a set sequence of rules. So if you force one to be used, you may lose data that was used from another one. - +failed Most likely best use is when one (or two) of the sensor arrays has all the sensor data you want, and you just want to make sure inxi doesn't use data from another array that has inacurate or misleading data. @@ -1728,7 +1721,7 @@ parent start program whitelist. Forces the USB data generator to use \fB/sys\fR as data source instead of \fBlsusb\fR. -.TP +.TPfailed .B \-\-usb\-tool\fR Forces the USB data generator to use \fBlsusb\fR as data source. Overrides \fBUSB_SYS\fR in user configuration file(s). @@ -1740,7 +1733,7 @@ default IP source urls. URL must start with http[s] or ftp. The IP address from the URL must be the last item on the last (non\-empty) line of the page content source code. - +failed Same as configuration value (example): \fBWAN_IP_URL='https://mysite.com/ip.php'\fR @@ -1750,6 +1743,19 @@ Same as configuration value (example): Force \fBSystem\fR item \fBwm\fR to use \fBwmctrl\fR as data source, override default \fBps\fR source. +.TP +.B \-\-wrap\-max [integer]\fR +Overrides default or configuration set line starter wrap width value. +Wrap max is the maximum width that inxi will wrap line starters (e.g. \fBInfo:\fR) +to their own lines, with data lines indented only 2 columns. If terminal/console +width or \fB\-\-width\fR is less than wrap width, wrapping of line starter occurs. +If \fB80\fR or less, no wrapping will occur. +Overrides internal default value (90) and user configuration value: + +\fBWRAP_MAX=85\fR (previously \fBINDENT_MIN\fR) + +Previously called: \fB\-\-indent\-min\fR. + .SH DEBUGGING OPTIONS .TP @@ -1920,7 +1926,8 @@ these up, and for a complete list of options: Here's a brief overview of the basic options you are likely to want to use: \fBCOLS_MAX_CONSOLE\fR The max display column width on terminal. - +If terminal/console width or \fB\-\-width\fR is less than wrap width, +wrapping of line starter occurs \fBCOLS_MAX_IRC\fR The max display column width on IRC clients. \fBCOLS_MAX_NO_DISPLAY\fR The max display column width in console, out of GUI desktop. @@ -1935,9 +1942,6 @@ See \fB\-\-recommends\fR output for more information on downloaders and Perl dow \fBFILTER_STRING\fR Default \fB\fR. Any string you prefer to see instead for filtered values. -\fBINDENT_MIN\fR The point where the line starter wrapping to its own line happens. -Overrides default. See \fB\-\-indent\-min\fR. If \fB80\fR or less, wrap will never happen. - \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. @@ -1985,6 +1989,11 @@ Same as \fB\-\-wan\-ip\-url [URL]\fR \fBWEATHER_UNIT\fR Values: [\fBm\fR|\fBi\fR|\fBmi\fR|\fBim\fR]. Same as \fB\-\-weather\-unit\fR. +\fBWRAP_MAX\fR (previously \fBINDENT_MIN\fR) The maximum width where the line starter wraps +to its own line. If terminal/console width or \fB\-\-width\fR is less than wrap width, +wrapping of line starter occurs. Overrides default. See \fB\-\-wrap\-max\fR. +If \fB80\fR or less, wrap will never happen. + .TP .B Color Options It's best to use the \fB\-c [94\-99]\fR color selector tool to set the following values @@ -2044,7 +2053,7 @@ is a fork of \fBlocsmif\fR's very clever \fBinfobash\fR script. Original infobash author and copyright holder: Copyright (C) 2005\-2007 Michiel de Boer aka locsmif -inxi version: Copyright (C) 2008\-20 Harald Hope +inxi version: Copyright (C) 2008\-2021 Harald Hope This man page was originally created by Gordon Spencer (aka aus9) and is maintained by Harald Hope (aka h2 or TechAdmin). diff --git a/inxi.changelog b/inxi.changelog index 2b1e107..6c52dae 100644 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,140 @@ +===================================================================================== +Version: 3.2.02 +Patch: 00 +Date: 2021-01-10 +----------------------------------- +Changes: +----------------------------------- +New version, man page, bug fixes, changes, adjustments and cleanups!!! + +Special thanks to mr. mazda for his ongoing suggestions, ideas, and observations. + +Bugs: +1. In certain corner cases, it appears that lsusb has blank lines, which tripped +errors in inxi output when the usb parser was trying to access split keys that did +not exist. Added in check to make sure split actually resulted in expected data. + +2. A red face bug, I'd left the output debugger switched on with json output, so +it was printing out the json data structure with Dumper, that's now switched off. +Hope this doesn't mess anyone up, but it would have mattered only if the person +was using: +--output json --output-type print +It did not effect xml output. + +Fixes: +1. Got rid of extra level of -L data structure and output handler. Not visible +to users, but still irksome, so nice to get that fixed. Recursive structures are +confusing, lol, but this extra level was pointless, but to fix it required redoing +the logic a bit for both data generator and output feature. + +2. Added in support for --display :0.0, previously it did not support the +.0 addition, but why not, if it works for people, good, if not, makes no difference. + +3. There were some missing cases for LVM missing data messages, so the following +fixes were added: + * In cases where lsblk is installed and user is non root, or lvs is not installed, + but no lvm data is present, inxi now shows the expected 'Message: No LVM data found.' + instead of the permissions or missing program error that showed before. + If lsblk is not installed, and lvm is installed (or missing), with lvs not root + readable, the permissiosn message (or missing program) will show since at that + point, inxi has no way to know if there is lvm data or not. + + * Not an inxi, but rather an Arch Linux packaging bug, the maintainer of lvm + has made lvs and vgs fail to return error number on non root start, which is + a bug (pvs does return expected error return). Rather than wait for this bug + to be fixed, inxi will just test if lvs and lsblk lvm data, it will show + permissions message, otherwse the no lvm data message as expected. + +I think these cover the last unhandled LVM cases I came across, so ideally, the +lvm data messages will be reasonably correct. + +4. Some man page lintian fixes. + +5. Changed usb data parser to use 'unless' instead of 'if' in tests since +it's easier to read unless positive tests are true than if negative or +negative etc. + +Enhancements: +1. Since I see too often things like -F --no-host -z which is redundant, the +help and man now make it more clear that -z implies --no-host. + +2. Even though it's not that pointful, I added in derived Arch Linux system +base like Ubuntu/Debian have. It's not that meaningful because unlike +Ubuntu/Debian, where you want to know what version the derived distro is +based on, Arch is rolling thus no versions, but I figured, why not, it's +easy to do, so might as well make the system base feature a bit more complete. + +Note that the way I did this requires that the distro is ID'ed as its derived +distro nanme, not Arch Linux, that will vary depending on how they did their +os-release etc, or distro files, but that's not really an inxi issue, that's +up to them. From what I've been seeing, it looks like more of the derived +distros are being ID'ed in inxi as the derived name, so those should all work +fine. Note that seeing 'base:' requires -Sx. + +3. More disk vendors!! More disk vendor IDs!!! I really dug into the stuff, +and refactored slightly the backend tools I use, so it's now a bit easier +to handle the data. Thanks linux-lite hardware database, as always, for +having users that really seemt to use every disk variant known to humanity. + +Changes: +1. In -G, made FAILED: lower case, and also moved it to be after unloaded: +It was too easy to think that the loaded driver had failed. Also to make it +more explicit, made output like this, in other words, driver: is a container +for the possible children: loaded: unloaded: failed: alternate: which should be +easier to parse and read without mixing up what belongs to what. + +driver: loaded: modesetting unloaded: nouvean,vesa alternate: nv +driver: loaded: amdgpu unloaded: vesa failed: ati + +Note that if there is no unloaded: driver, failed: would still appear to come after +loaded:, but hopefully it's more clear now. + +Basically what we found was that the presence of the uppercase FAILED: drew +the eye so much that it was sometimes not noted that it was a key: following +the driver: item, which itself because it did not list explicitly loaded: +was not as clear as it could have been. By making failed: the same as the +other key names visually, hopefully it will be less easy to think that the +loaded: driver failed: + +In a sense, this is a legacy issue, because the original use of FAILED: was for +non free video drivers, to see when xorg had failed to load them, but over +more recent years, the most frequent thing I have been seeing is odd things +like failed: ati, when xorg tries to load the legacy ati driver when amdgpu +is being used. + +2. Likewise, for RAID mdraid and zfs changed FAILED: to Failed:, again, to make it +more consistent with the other types. + +3. In help menu and man page, removed legacy 'card(s)' in -A, -G, -N, and replaced +that with 'device(s)', which is the more accurate term, since the days when these +things were only addon cards are long behind us. I had not noticed that, but it +caught me eye and I realized it was a very deprecated and obsolete syntax, which +did not match the way inxi describes devices today. + +4. It was pointed out how incoherent the naming of the item for setting wrap width, +--indent-min and config item INDENT_MIN were super confusing, since it was neither +indent or minimum, it was in fact wrap maximum, so the new options and config items +are --wrap-max and WRAP_MAX. Note that the legacy values will keep working, but +it was almost impossible in words to explain this option because the option text +was almost the exact opposite of what the option actually does. Redid the man +and help explanations to make the function of this option/config item more clear. + +5. Made -J/--usb Hub-xx: to fit with other repeating device types in inxi output, +before Hub: was not numbered, but it struck me, it should be, like all the other +auto-incremented counter line starters, like ID-xx:, Device-x:, and so on. + +6. Reorganized the main help menu to hopefully be more logical, now it shows the +primary output triggers, then after, the extra data items, -a, -x, -xx, -xxx, +separated by white space per type to make it easier to read. This also moved +the stuff that had been under the -x items back to where they should be, together +with the main output control options. For readability and usability, I think this +will help, the help menu is really long, so the more visual cues it has to make it +clear what each section is, the better I think. Previously -a was the first items, +then way further down was -x, -xx, and -xxx, then under those was -z, -Z, -y. + +----------------------------------- +-- Harald Hope - Sun, 10 Jan 2021 18:25:48 -0800 + ===================================================================================== Version: 3.2.01 Patch: 00