diff --git a/inxi b/inxi index fdfe549..a3f003e 100755 --- a/inxi +++ b/inxi @@ -36,8 +36,8 @@ use POSIX qw(uname strftime ttyname); ## INXI INFO ## my $self_name='inxi'; -my $self_version='2.9.03'; -my $self_date='2018-03-21'; +my $self_version='2.9.04'; +my $self_date='2018-03-22'; my $self_patch='00'; ## END INXI INFO ## @@ -1372,13 +1372,19 @@ sub disk_data { ['df', '-k -T -P'], ['df', '-P'], ['lsblk', '-fs'], - ['lsblk', '-rfs'], + ['lsblk', '-fsr'], ['lsblk', '-a'], - ['lsblk', '-ra'], + ['lsblk', '-ar'], + ['lsblk', '-p'], + ['lsblk', '-pr'], + ['lsblk', '-pP'], + ['lsblk', '-r'], ['lsblk', '-r --output TYPE,NAME,RM,FSTYPE'], ['lsblk', '-r --output TYPE,NAME,RM,FSTYPE,SIZE'], ['lsblk', '-br --output TYPE,NAME,RM,FSTYPE,SIZE'], ['lsblk', '-Pb --output TYPE,NAME,RM,FSTYPE,SIZE'], + ['lsblk', '-r --output NAME,TYPE,RM,FSTYPE,SIZE'], + ['lsblk', '-P --output NAME,TYPE,RM,FSTYPE,SIZE'], ['gpart', 'list'], ['gpart', 'show'], ['gpart', 'status'], @@ -1948,7 +1954,7 @@ sub download_file { if ($dl{'dl'} eq 'tiny' ){ $cmd = "Using tiny: type: $type \nurl: $url \nfile: $file"; $result = get_file($type, $url, $file); - $debug_data = $result; + $debug_data = ($type ne 'stdout') ? $result : 'Success: stdout data not null.'; } # But: 0 is success, and 1 is false for these # when strings are returned, they will be taken as true @@ -1957,7 +1963,7 @@ sub download_file { $args = $dl{'stdout'}; $cmd = "$dl{'dl'} $dl{'no-ssl-opt'} $timeout $args $url $dl{'null'}"; $result = qx($cmd); - $debug_data = 'Success: stdout data not null.' + $debug_data = ($result) ? 'Success: stdout data not null.' : 'Download resulted in null data!'; } elsif ($type eq 'file') { $args = $dl{'file'}; @@ -3123,6 +3129,9 @@ sub get_defaults { 'inxi-main' => 'https://github.com/smxi/inxi/raw/master/', 'inxi-pinxi' => 'https://github.com/smxi/inxi/raw/inxi-perl/', 'inxi-man' => "https://smxi.org/in/$self_name.1.gz", + 'inxi-man-gh' => "https://github.com/smxi/inxi/raw/master/$self_name.1", + 'pinxi-man' => "https://smxi.org/in/$self_name.1.gz", + 'pinxi-man-gh' => "https://github.com/smxi/inxi/raw/inxi-perl/$self_name.1", ); if ( exists $defaults{$type}){ return $defaults{$type}; @@ -3159,7 +3168,7 @@ sub update_me { print $output; $output = ''; $self_download = "$self_download/$self_name"; - $file_contents=download_file('stdout', $self_download); + $file_contents = download_file('stdout', $self_download); # then do the actual download if ( $file_contents ){ @@ -3179,7 +3188,7 @@ sub update_me { print $output; $output = ''; if ($b_man){ - update_man(); + update_man($download_id); } else { print "Skipping man download because branch version is being used.\n"; @@ -3198,12 +3207,12 @@ sub update_me { } sub update_man { - my $man_file_url=get_defaults('inxi-man'); + my ($download_id) = @_; my $man_file_location=set_man_location(); - my $man_file_path="$man_file_location/$self_name.1.gz" ; - my $output = ''; + my $man_file_path="$man_file_location/$self_name.1" ; + my ($man_file_url,$output) = ('',''); - my $b_downloaded = 1; + my $b_downloaded = 0; if ( ! -d $man_file_location ){ print "The required man directory was not detected on your system.\n"; print "Unable to continue: $man_file_location\n"; @@ -3221,27 +3230,38 @@ sub update_man { system( 'mandb' ); } } -# if ( $dl{'dl'} =~ /^(wget)$/){ -# print "Checking Man page download URL...\n"; -# $b_downloaded = download_file('spider', $man_file_url); -# } - if ( $b_downloaded ){ -# if ( $dl{'dl'} =~ /^(wget)$/){ -# print "Man file download URL verified: $man_file_url\n"; -# } - print "Downloading Man page file now.\n"; - # returns perl, 1 for true, 0 for false, even when using shell tool returns - $b_downloaded = download_file('file', $man_file_url, $man_file_path ); - if ( !$b_downloaded ){ - print "Oh no! Something went wrong downloading the Man file at: $man_file_url\n"; - print "Check the error messages for what happened. Error: $b_downloaded\n"; - } - else { - print "Download/install of man page successful.\nCheck to make sure it works: man inxi\n"; + # first choice is inxi.1/pinxi.1 from gh, second gz from smxi.org + if ( $download_id ne 'dev server' && (my $program = check_program('gzip'))){ + $man_file_url=get_defaults($self_name . '-man-gh'); + print "Downloading Man page file...\n"; + $b_downloaded = download_file('file', $man_file_url, $man_file_path); + if ($b_downloaded){ + print "Download successful. Compressing file...\n"; + system("$program -9 -f $man_file_path > $man_file_path.gz"); + my $err = $?; + if ($err > 0){ + print "Oh no! Something went wrong compressing the manfile:\n"; + print "Local path: $man_file_path Error: $err\n"; + } + else { + print "Download and install of man page successful.\nCheck to make sure it works: man $self_name\n"; + } } } else { - print "Man file download URL failed, unable to continue: $man_file_url\n"; + $man_file_url = get_defaults($self_name . '-man'); + # used to use spider tests, but only wget supports that, so no need + print "Downloading Man page file gz...\n"; + $man_file_path .= '.gz'; + # returns perl, 1 for true, 0 for false, even when using shell tool returns + $b_downloaded = download_file('file', $man_file_url, $man_file_path ); + if ($b_downloaded) { + print "Download and install of man page successful.\nCheck to make sure it works: man $self_name\n"; + } + } + if ( !$b_downloaded ){ + print "Oh no! Something went wrong downloading the Man file at:\n$man_file_url\n"; + print "Try -U with --dbg 1 for more information on the failure.\n"; } } @@ -3307,7 +3327,7 @@ sub get_options{ eval $start if $b_log; my (@args) = @_; $show{'short'} = 1; - my ($b_downloader,$b_recommends,$b_updater,$b_version,$help_type, + my ($b_downloader,$b_recommends,$b_updater,$b_version,$b_use_man,$help_type, $self_download, $download_id); GetOptions ( 'A|audio' => sub { @@ -3680,6 +3700,8 @@ sub get_options{ $help_type = 'standard'; }, 'H|help-full' => sub { $help_type = 'full'; }, + 'man' => sub { + $b_use_man = 1; }, 'output:s' => sub { my ($opt,$arg) = @_; if ($arg =~ /^(json|screen|xml)$/){ @@ -3714,11 +3736,12 @@ sub get_options{ if ( $b_update ){ $b_updater = 1; if (!$arg && $self_name eq 'pinxi'){ + $b_man = 1; $download_id = 'inxi-perl branch'; $self_download = get_defaults('inxi-pinxi'); } elsif ($arg && $arg eq '3'){ - $b_man = 1 if $self_name eq 'inxi'; + $b_man = 1; $download_id = 'dev server'; $self_download = get_defaults('inxi-dev'); } @@ -3726,7 +3749,8 @@ sub get_options{ if (!$arg){ $download_id = 'main branch'; $self_download = get_defaults('inxi-main'); - $b_man = 1 + $b_man = 1; + $b_use_man = 1; } elsif ( $arg =~ /^[12]$/){ $download_id = "branch $arg"; @@ -3756,6 +3780,7 @@ sub get_options{ set_downloader() if $b_downloader; show_version() if $b_version; show_options($help_type) if $help_type; + $b_man = 0 if !$b_use_man; update_me( $self_download, $download_id ) if $b_updater; if ($output_type){ if ($output_type ne 'screen' && ! $output_file){ @@ -3865,7 +3890,7 @@ sub show_options { $self_name version." ], ['1', '-l', '--label', "$partition_string_u labels. Default: short $partition_string -P. For full -p output, use: -pl (or -plu)." ], - ['1', '-m', '--memory', "Memory (RAM) data. Physical system memory array(s), capacity, + ['1', '-m', '--memory', "Memory (RAM) data. Requires root. Physical system memory array(s), capacity, how many devices (slots) supported, and individual memory devices (sticks of memory etc). For devices, shows device locator, size, speed, type (like: DDR3). If neither -I nor -tm are selected, also shows @@ -3888,7 +3913,7 @@ sub show_options { show, but without extra data). Shows, if detected: / /boot /home /opt /tmp /usr /var /var/log /var/tmp . Use -p to see all mounted ${partition_string}s." ], - ['1', '-r', '--repos', "Distro repository data. Supported repo types: APK; APT; PACMAN; + ['1', '-r', '--repos', "Distro repository data. Supported repo types: APK; APT; EOPKG; PACMAN; PISI; PORTAGE; PORTS (BSDs); SLACKPKG; URPMQ; YUM; ZYPP." ], ['1', '-R', '--raid', "RAID data. Shows RAID devices, states, levels, and components, and extra data with -x/-xx. md-raid: If device is resyncing, shows resync @@ -3896,7 +3921,7 @@ sub show_options { ['1', '-s', '--sensors', "Sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detected fan speeds. Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens." ], - ['1', '', '--slots', "Show PCI slots, type, speed, status." ], + ['1', '', '--slots', "Show PCI slots, type, speed, status. Requires root. " ], ['1', '-S', '--system', "System information: host name, kernel, desktop environment (if in X), distro" ], ['1', '-t', '--processes', "Processes. Requires extra options: c^(cpu) m^(memory) cm^(cpu+memory). @@ -3909,7 +3934,7 @@ sub show_options { For full -p output, use: -pu (or -plu)." ], ['1', '-v', '--verbosity', "Script verbosity levels. Verbosity level number is required. Should not be used with -b or -F" ], - ['1', '', '', "Supported levels: 0-7 Example: $self_name^-v^4" ], + ['1', '', '', "Supported levels: 0-8 Example: $self_name^-v^4" ], ['2', '0', '', "Short output, same as: $self_name" ], ['2', '1', '', "Basic verbose, -S + basic CPU + -G + basic Disk + -I." ], ['2', '2', '', "Networking card (-N), Machine (-M) data, if present, Battery (-B), @@ -3958,24 +3983,25 @@ sub show_options { ['2', '-I', '', "System GCC, default. With -xx, also show other installed GCC versions. If running in console, not in IRC client, shows shell version number, if detected. Init/RC Type and runlevel (if available)." ], - ['2', '-m', '', "Manufacteror and Part number; Max memory module size (if available)." ], + ['2', '-m', '', "Max memory module size (if available)." ], ['2', '-N -A', '', "Version/port(s)/driver version (if available) for Network/Audio;" ], ['2', '-N -A -G', '', "Network, audio, graphics, shows PCI Bus ID/Usb ID number of card." ], ['2', '-R', '', "md-raid: Resync line, shows blocks synced/total blocks." ], ['2', '-S', '', "Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version" ], - ['2', '-t', '', "Memory use output to cpu (-xt c), and cpu use to memory (-xt m)." ], + ['2', '-t', '', "Add memory use output to cpu (-xt c), and cpu use to memory + (-xt m)." ], ['2', '--usb', '', "For Devices, show USB speed." ], ); push @data, @rows; if ( $b_weather ){ - @rows = (['2', '-w -W', '', "Wind speed and time zone (-w only)." ]); + @rows = (['2', '-w -W', '', "Wind speed, humidity, pressusre, and time zone (-w only)." ]); push @data, @rows; } @rows = ( - ['1', '-xx', '--extra 2', "Show extra, extra data (only works with verbose or line output, - not short form):" ], + ['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." ], ['2', '-B', '', "serial number, voltage (if available)." ], ['2', '-C', '', "Minimum CPU speed, if available." ], @@ -3986,11 +4012,11 @@ sub show_options { ['2', '-I', '', "Other detected installed gcc versions (if present). System default runlevel. Adds parent program (or tty) for shell info if not in IRC (like Konsole or Gterm). Adds Init/RC (if found) version number." ], - ['2', '-m', '', "Manufacterer, part number; Single/double bank (if found)." ], + ['2', '-m', '', "Manufacturer, part number; Single/double bank (if found)." ], ['2', '-M', '', "Chassis information, bios rom size (dmidecode only), if data for either is available." ], ['2', '-N', '', "Chip vendor:product ID for each nic." ], - ['2', '-R', '', "md-raid: Superblock (if present); algorythm. Adds + ['2', '-R', '', "md-raid: Superblock (if present); algorithm. Adds system info line (kernel support,read ahead, raid events). If resync, shows progress bar." ], ['2', '-S', '', "Display manager (dm) in desktop output, if in X @@ -4000,7 +4026,7 @@ sub show_options { ); push @data, @rows; if ( $b_weather ){ - @rows = (['2', '-w -W', '', "Humidity, barometric pressure." ]); + @rows = (['2', '-w -W', '', "Shows windchill, dew poinnt, heat index, if available." ]); push @data, @rows; } @rows = ( @@ -4018,8 +4044,7 @@ sub show_options { push @data, @rows; if ( $b_weather ){ @rows = (['2', '-w -W', '', "Location (uses -z/irc filter), weather - observation time, wind chill, heat index, dew point (shows extra lines - for data where relevant)." ] ); + observation time, altitude (shows extra lines for data where relevant)." ] ); push @data, @rows; } @rows = ( @@ -4086,19 +4111,20 @@ sub show_options { ['2', '32', '', "Turns on hostname in output." ], ['2', '33', '', "Forces use of dmidecode data instead of /sys where relevant (-M)." ], - ['2', '34', '', "Skips SSL certificate checks for all downloader activies + ['2', '34', '', "Skips SSL certificate checks for all downloader activities (wget/fetch/curl only)." ], ['2', '40', '', "Bypass Perl as a downloader option." ], ['2', '41', '', "Bypass Curl as a downloader option." ], ['2', '42', '', "Bypass Fetch as a downloader option." ], ['2', '43', '', "Bypass Wget as a downloader option." ], - ['2', '44', '', "Bypass Curl, Fetch, and Wget as a downloader options. Forces + ['2', '44', '', "Bypass Curl, Fetch, and Wget as downloader options. Forces Perl if HTTP::Tiny present." ], ['1', '', '--display', "Will try to get display data out of X. Default gets it from display 0. If you use this format: --display 1 it would get it from display 1 instead, or any display you specify" ], ['1', '', '--downloader', "Force $self_name to use [curl|fetch|perl|wget] for downloads." ], ['1', '', '--limit', "[-1 - x] -1 removes limit. Raise or lower max output limit of IP addresses for -i." ], + ['1', '', '--man', "Installs correct man versino for dev branch (-U 3) or pinxi using -U." ], ['1', '', '--output', "Change data output type. Options: [json|screen|xml]. Requires --output-file [path|print]." ], ['1', '', '--output-file', "[Full path for output file|print] for --output." ], ['1', '', '--sleep', "[0-x.x] - Usually in decimals. Change CPU sleep time for -C (current: $cpu_sleep). Sleep is used to let system catch up and show a more accurate CPU use. Example:^$self_name^-Cxxx^--sleep^0.15" ], @@ -5081,6 +5107,8 @@ sub show_version { $working_path = readlink "$working_path/$self_name"; $working_path =~ s/[^\/]+$//; } + # strange output /./ ending, but just trim it off, I don't know how it happens + $working_path =~ s%/\./%/%; @row = [ 0, '', '', "$self_name $self_version-$self_patch ($self_date)"]; push @data, @row; if ( ! $b_irc ){ @@ -5092,9 +5120,9 @@ sub show_version { push @data, @row; } @rows = ( - [ 0, '', '', "Website:^https://github.com/smxi/inxi^or^http://smxi.org/" ], + [ 0, '', '', "Website:^https://github.com/smxi/inxi^or^https://smxi.org/" ], [ 0, '', '', "IRC:^irc.oftc.net channel:^#smxi" ], - [ 0, '', '', "Forums:^http://techpatterns.com/forums/forum-33.html" ], + [ 0, '', '', "Forums:^https://techpatterns.com/forums/forum-33.html" ], [ 0, '', '', " " ], [ 0, '', '', "$self_name - the universal, portable, system information tool for console and irc." ], @@ -5110,7 +5138,7 @@ sub show_version { [ 0, '', '', "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - (http://www.gnu.org/licenses/gpl.html)" ] + (https://www.gnu.org/licenses/gpl.html)" ] ); push @data, @rows; } @@ -5193,7 +5221,7 @@ sub card_data { $num++ . "#driver" => $driver, },); @rows = (@rows,@data); - if ($extra > 1 && !$bsd_type){ + if ($extra > 0 && !$bsd_type){ if ($row[9] ){ my $version = main::get_module_version($row[9]); $rows[$j]{$num++ . "#v"} = $version if $version; @@ -5479,7 +5507,7 @@ sub create_output { $condition ||= 'N/A'; $j = scalar @rows; @data = ({ - $num++ . "#$key" => '', + $num++ . "#ID" => $key, $num++ . "#charge" => $charge, $num++ . "#condition" => $condition, },); @@ -5550,7 +5578,6 @@ sub battery_data_sys { $b_ma = 0; $id = $item; $id =~ s%/sys/class/power_supply/|\/$%%g; - $id =~ s/(BAT|CMB)/$1-/; $battery{$id} = ({}); foreach $file (@items){ $path = "$item$file"; @@ -5587,6 +5614,12 @@ sub battery_data_sys { $value = $value/1000000; $b_ma = 1; } + elsif ($file eq 'manufacturer'){ + $value = main::dmi_cleaner($value); + } + elsif ($file eq 'model_name'){ + $value = main::dmi_cleaner($value); + } } $battery{$id}{$file} = $value; # print "$battery{$id}{$file}\n"; @@ -5636,7 +5669,7 @@ sub battery_data_dmi { my @ref = @$_; # Portable Battery if ($ref[0] == 22){ - $id = "BAT-$i"; + $id = "BAT$i"; $i++; $battery{$id} = ({}); # skip first three row, we don't need that data @@ -5645,10 +5678,10 @@ sub battery_data_dmi { my @value = split /:\s+/, $item; next if !$value[0]; if ($value[0] eq 'Location') {$battery{$id}{'location'} = $value[1] } - elsif ($value[0] eq 'Manufacturer') {$battery{$id}{'manufacturer'} = $value[1] } + elsif ($value[0] eq 'Manufacturer') {$battery{$id}{'manufacturer'} = main::dmi_cleaner($value[1]) } elsif ($value[0] =~ /Chemistry/) {$battery{$id}{'technology'} = $value[1] } elsif ($value[0] =~ /Serial Number/) {$battery{$id}{'serial_number'} = $value[1] } - elsif ($value[0] =~ /^Name/) {$battery{$id}{'model_name'} = $value[1] } + elsif ($value[0] =~ /^Name/) {$battery{$id}{'model_name'} = main::dmi_cleaner($value[1]) } elsif ($value[0] eq 'Design Capacity') { $value[1] =~ s/\s*mwh$//i; $battery{$id}{'energy_full_design'} = sprintf( "%.1f", $value[1]/1000); @@ -5746,7 +5779,7 @@ sub create_output_full { my $arch = $cpu{'arch'}; $arch ||= 'N/A'; $rows[$j]{$num++ . "#arch"} = $arch; - if ($extra > 1 && $arch ne 'N/A' && $cpu{'rev'} ){ + if ( $arch ne 'N/A' && $cpu{'rev'} ){ $rows[$j]{$num++ . "#rev"} = $cpu{'rev'}; } } @@ -7797,12 +7830,14 @@ sub gl_data(){ @row = ({ $num++ . "#OpenGL" => '', $num++ . "#renderer" => $renderer, - $num++ . "#version" => $version, + $num++ . "#v" => $version, }); if ($b_compat && $extra > 1 && $compat_version){ $row[0]{$num++ . "#compat-v"} = $compat_version; } - $row[0]{$num++ . "#direct render"} = $direct_render; + if ($extra > 0){ + $row[0]{$num++ . "#direct render"} = $direct_render; + } } else { @row = ({ @@ -7894,7 +7929,7 @@ sub x_drivers { } } my $sep = ''; - foreach (keys %drivers){ + foreach (sort keys %drivers){ if ($drivers{$_} eq 'loaded') { $sep = ($loaded) ? ',' : ''; $loaded .= $sep . $_; @@ -9453,6 +9488,7 @@ sub create_output { my $num = 0; my $j = 0; my (@data,@data2,%part,@rows,$dev,$dev_type,$fs); + @partitions = sort { $a->{'id'} cmp $b->{'id'} } @partitions; foreach my $ref (@partitions){ my %row = %$ref; next if $row{'type'} eq 'secondary' && $show{'partition'}; @@ -9487,10 +9523,10 @@ sub create_output { } %part = check_lsblk($row{'dev-base'},0) if (@lsblk && $row{'dev-base'} && $dev_type eq 'dev'); if (%part){ - $fs = $part{'fs'}; + $fs = lc($part{'fs'}); } elsif (defined $row{'fs'}){ - $fs = $row{'fs'}; + $fs = lc($row{'fs'}); } else { $fs = 'N/A'; @@ -9940,6 +9976,7 @@ sub mem_processes { my @b = split(/\s+/,$b); $b[5] <=> $a[5] } @ps_aux; @rows = splice @rows,0,$count; + #print Data::Dumper::Dumper \@rows; @processes = main::memory_data_full('process') if !$b_mem; $cpu_mem = ' - CPU: % used' if $extra > 0; $j = scalar @rows; @@ -9956,9 +9993,7 @@ sub mem_processes { my $decimals = ($row[5]/1024 > 10 ) ? 1 : 2; $mem = ($row[5]) ? sprintf( "%.${decimals}f", $row[5]/1024 ) . ' MiB' : 'N/A'; my @command = process_starter(scalar @row, $row[10],$row[11]); - if ($extra > 0){ - $mem .= " (" . $row[2] . "%)"; - } + $mem .= " (" . $row[3] . "%)"; @data = ( { $num++ . "#" . $i++ => '', @@ -11008,16 +11043,16 @@ sub process_size { return 'N/A' if ( ! $size ); return $size if $size =~ /\D/; if ( $size < 1024 ){ - $unit='MB'; + $unit='MiB'; } elsif ( $size < 1024000 ){ $size = $size / 1024; - $unit='GB'; + $unit='GiB'; $b_trim = 1; } elsif ( $size < 1024000000 ){ $size = $size / 1024000; - $unit='TB'; + $unit='TiB'; $b_trim = 1; } # we only want a max 2 decimal places, and only when it's @@ -11615,42 +11650,42 @@ sub repo_builder { my ($file,$type,$search,$split,$count) = @_; my (@content,@data,$missing,$key); my %unfound = ( - 'apk' => 'No APK repos found in', - 'apt' => 'No apt repos found in', + 'apk' => 'No active APK repos in', + 'apt' => 'No active apt repos in', 'bsd-package' => 'No enabled BSD pkg servers in', 'eopkg' => 'No active eopkg repos found', - 'pacman' => 'No Pacman repos found in', + 'pacman' => 'No active pacman repos in', 'pisi' => 'No active pisi repos found', 'portage' => 'No enabled portage sources in', - 'portsnap' => 'No ports servers found in', - 'freebsd' => 'No FreeBSD update servers found in', - 'freebsd-pkg' => 'No FreeBSD default pkg server found in', - 'openbsd' => 'No OpenBSD pkg mirrors found in', - 'netbsd' => 'No NetBSD pkg servers found in', - 'slackpkg' => 'No slackpkg sources found in', - 'slackpkg+' => 'No slackpkg+ sources found in', - 'yum' => 'No yum sources found in', - 'zypp' => 'No zypp sources found in', + 'portsnap' => 'No ports servers in', + 'freebsd' => 'No FreeBSD update servers in', + 'freebsd-pkg' => 'No FreeBSD default pkg server in', + 'openbsd' => 'No OpenBSD pkg mirrors in', + 'netbsd' => 'No NetBSD pkg servers in', + 'slackpkg' => 'No active slackpkg repos in', + 'slackpkg+' => 'No active slackpkg+ repos in', + 'yum' => 'No active yum repos in', + 'zypp' => 'No active zypp repos in', ); $missing = $unfound{$type}; return $missing if $file eq 'missing'; my %keys = ( 'apk' => 'APK repo', - 'apt' => 'Active apt sources in', + 'apt' => 'Active apt repos in', 'bsd-package' => 'BSD enabled pkg servers in', 'eopkg' => 'Active eopkg repo', 'freebsd' => 'FreeBSD update server', 'freebsd-pkg' => 'FreeBSD default pkg server', - 'pacman' => 'Active Pacman repo servers in', + 'pacman' => 'Active pacman repo servers in', 'pisi' => 'Active pisi repo', 'portage' => 'Enabled portage sources in', 'portsnap' => 'BSD ports server', 'openbsd' => 'OpenBSD pkg mirror', 'netbsd' => 'NetBSD pkg servers', - 'slackpkg' => 'slackpkg sources', - 'slackpkg+' => 'slackpkg+ sources', - 'yum' => 'Active yum sources in', - 'zypp' => 'Active zypp sources in', + 'slackpkg' => 'slackpkg repos in', + 'slackpkg+' => 'slackpkg+ repos in', + 'yum' => 'Active yum repos in', + 'zypp' => 'Active zypp repos in', ); $key = $keys{$type}; return $key if $file eq 'active'; @@ -11772,7 +11807,7 @@ sub create_output { if (!@fan_main && !@fan_default){ $fan_def = 'N/A'; } - $rows[$j]{$num++ . '#Fan Speeds (in RPM)'} = $fan_def; + $rows[$j]{$num++ . '#Fan Speeds (RPM)'} = $fan_def; my $b_cpu = 0; for (my $i = 0; $i < scalar @fan_main; $i++){ next if $i == 0;# starts at 1, not 0 @@ -12518,7 +12553,7 @@ sub create_output { my @data2 = main::get_size($row{'size'}) if (defined $row{'size'}); my $size = (@data2) ? $data2[0] . ' ' . $data2[1]: 'N/A'; if ($row{'fs'}){ - $fs = $row{'fs'}; + $fs = lc($row{'fs'}); } else { if (main::check_program('file')){ @@ -14447,6 +14482,9 @@ sub get_shell_source { } #print "shell parent 2: $shell_parent\n"; } + # to work around a ps -p or gnome-terminal bug, which returns + # gnome-terminal- trim - off end + $shell_parent =~ s/-$//; } if ($b_log){ $self_parent ||= ''; diff --git a/inxi.1 b/inxi.1 index ce84b36..e42742d 100644 --- a/inxi.1 +++ b/inxi.1 @@ -1,4 +1,4 @@ -.TH INXI 1 "2018\-03\-21" inxi "inxi manual" +.TH INXI 1 "2018\-03\-22" inxi "inxi manual" .SH NAME inxi \- Command line system information script for console and IRC .SH SYNOPSIS @@ -271,6 +271,8 @@ Show distro repository data. Currently supported repo types: \fBAPT\fR (Debian, Ubuntu + derived versions) +\fBEOPKG\fR (Solus) + \fBPACMAN\fR (Arch Linux + derived versions) \fBPISI\fR (Pardus + derived versions) @@ -285,8 +287,8 @@ Show distro repository data. Currently supported repo types: \fBYUM/ZYPP\fR (Fedora, Redhat, Suse + derived versions) -(as distro data is collected more will be added. If your's is missing please -show us how to get this information and we'll try to add it.) +As distro data is collected more will be added. If your's is missing please +show us how to get this information and we'll try to add it. .TP .B \-R\fR,\fB \-\-raid\fR Show RAID data. Shows RAID devices, states, levels, and components, and @@ -370,7 +372,7 @@ inxi version information. Prints information then exits. Script verbosity levels. Verbosity level number is required. Should not be used with \fB\-b\fR or \fB\-F\fR. -Supported levels: \fB0\-7\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR +Supported levels: \fB0\-8\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR .TP .B \-v 0 \- Short output, same as: \fBinxi\fR @@ -539,14 +541,9 @@ versions. (if available). .TP .B \-x \-m\fR -\- Shows memory device Part Number (\fBpart:\fR). Useful to order new or -replacement memory sticks etc. Usually part numbers are unique, particularly -if you use the word \fBmemory\fR in the search as well. With \fB\-xx\fR, -shows Serial Number and Manufactorer as well. -.TP -.B \-x \-m\fR \- If present, shows maximum memory module/device size in the Array line. -Only some systems will have this data available. +Only some systems will have this data available. Shows estimate it if can +generate one. .TP .B \-x \-N\fR \- Adds version/port(s)/driver version (if available) for each Network card; @@ -563,13 +560,19 @@ bitmap (if present). Resync line, shows blocks synced/total blocks. .TP .B \-x \-t\fR \- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory -(\fB\-xt m\fR). For \fB\-xt c\fR will also show system Used/Total ram data +(\fB\-xt m\fR). +.TP +.B \-x \-t\fR +For \fB\-xt c\fR will also show system Used/Total ram data if \fB\-t m\fR (memory) is not used AND \fB\-I\fR is not triggered. .TP -.B \-\-usb\fR +.B \-x \-\-usb\fR \- For Devices, show USB speed. .TP .B \-x \-w\fR,\fB \-W\fR +\- Adds humidity and barometric pressure. +.TP +.B \-x \-w\fR,\fB \-W\fR \- Adds wind speed and time zone (\fB\-w\fR only), and makes output go to two lines. .TP @@ -617,7 +620,13 @@ that case, if present, it will use the data from \fB/etc/inittab\fR. information. .TP .B \-xx \-m\fR -\- Shows memory device Manufacturer and Serial Number. +\- Shows memory device Manufacturer. +.TP +.B \-xx \-m\fR +\- Shows memory device Part Number (\fBpart:\fR). Useful to order new or +replacement memory sticks etc. Usually part numbers are unique, particularly +if you use the word \fBmemory\fR in the search as well. With \fB\-xxx\fR, +shows Serial Number as well. .TP .B \-xx \-m\fR \- Single/double bank memory, if data is found. Note, this may not be 100% right @@ -632,7 +641,7 @@ rom size if using dmidecode. \- Adds vendor:product ID of each Network card. .TP .B \-xx \-R\fR -\- md--raid: Superblock (if present); algorythm.. If resync, +\- md--raid: Superblock (if present); algorithm.. If resync, shows progress bar. .TP .B \-xx \-S\fR @@ -647,7 +656,7 @@ slim, lightdm, or mdm. \- Show vendor:chip id. .TP .B \-xx \-w\fR,\fB \-W\fR -\- Adds humidity and barometric pressure. +\- Adds wind chill, heat index, or dew point are available, if available. .TP .B \-xxx \-B\fR \- Adds battery chemistry (like: \fBLi\-ion\fR), cycles (NOTE: there appears to @@ -672,6 +681,9 @@ present. If no total width data is found, then inxi will not show that item. \- If present, will add memory module voltage. Only some systems will have this data available. .TP +.B \-xxx \-m\fR +\- Shows Serial Number. +.TP .B \-xxx \-R\fR \- md\-raid: Adds system mdraid support types (kernel support,read ahead, raid events) @@ -684,7 +696,7 @@ lxde\-panel, and others. Added mainly for Mint support. .TP .B \-xxx \-w\fR,\fB \-W\fR \- Adds location (city state country), weather observation time, altitude of system. -If wind chill, heat index, or dew point are available, shows that data as well. + .SH ADVANCED OPTIONS .TP .B \-\-alt 31\fR @@ -720,8 +732,12 @@ Curl, Wget, Fetch, OpenBSD only: ftp Bypass \fBFetch\fR as a downloader option. Priority is: Perl (HTTP::Tiny), Curl, Wget, Fetch, OpenBSD only: ftp -.TP .B \-\-alt 43\fR +Bypass \fBwget\fR as a downloader option. Priority is: Perl (HTTP::Tiny), +Curl, Wget, Fetch, OpenBSD only: ftp + +.TP +.B \-\-alt 44\fR Bypass \fBCurl\fR, \fBFetch\fR, and \fBWget\fR as downloader options. This basically forces the downloader selection to use \fBPerl 5.x\fR \fBHTTP::Tiny\fR, which is in general slower than \fBCurl\fR or \fBWget\fR but it may help bypass @@ -752,11 +768,15 @@ Force inxi to use [curl|fetch|perl|wget] for downloads. .B \-\-limit [\-1 \- x]\fR \fB\-1\fR removes limit. Raise or lower max output limit of IP addresses for \fB\-i\fR. +.TP +.B \-\-man\fR +Updates / installs man page with -U if pinxi or using \-U 3 dev branch. + .TP .B \-\-output [json|screen|xml]\fR Change data output type. Requires \-\-output\-file [full path|print] if not 'screen'. - .TP +.TP .B \-\-output\-file [full path to output file|print]\fR The directory path given must exist. The directory path given must exist, and the file will be created, unless it is printing to stdout (print). @@ -780,12 +800,12 @@ For the active debugger options. These change depending on debug requirements, so there's no point in listing those options here in the man page. .TP -.B \-\-debug [1\-21]\fR +.B \-\-debug [20\-22]\fR Debugger output generator. .TP .B \-\-debug [1\-3]\fR -\- On screen debugger output. +\- On screen debugger output. [not used currently] .TP .B \-\-debug 10\fR diff --git a/inxi.changelog b/inxi.changelog index 4f220f7..7e29cef 100644 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,143 @@ +===================================================================================== +Version: 2.9.04 +Patch Version: 00 +Script Date: 2018-03-22 +----------------------------------- +Changes: +----------------------------------- + +New version, new man. Big update, corrects many small typos, adds some good new +features. + +So now inxi and pinxi will grab the inxi.1 or pinxi.1 man file and install it on +systems that do not have -U blocked. The -U block of course remains the same. + +New features: + +1. now does not require root or 'file' to get unmounted fs type. Also, for many +mounted partitions, rather than showing the meaningless fuseblock it will usually +get the filesystem right. + +2. -U now works with optional --man option to download man page for pinxi +and -U 3 dev server updates. This gets around the fact I had to remove the gz files +from master to get the size small enough to make maintainers happy. Non branch +inxi master works as before, updates both from github or from dev server, depending +on your selection. + +3. Thanks very much to the people who have been contributing in a positve way, +helping to make inxi better. The untold number of small and large new features, +small glitches, etc, that have been fixed this week are simply too many too list. +Many to most were inxi bugs or weaknesses, now corrected. + +4. binxi branch has now been made fully operational, though I do not plan on doing +any work beyond the mothballing of that venerable program (gawk->bash inxi), it's +fully operational, it updates, it gets its man page, but all as binxi, so you can, +as with pinxi, run all of them separately. This officially terminates my support +for Gawk/Bash inxi, which can be found as binxi in the inxi-legacy branch. + +5. pinxi has been promoted to permanent development branch, where bug fixes, new +features, etc, will be tested, along with man page updates etc. This will help +reduce the number of commits to master branch. + +6. Audio / Network usb cards now show the true driver(s). There are often more +than one for audio, that's a nice enancement. + +7. inxi outputs to json / xml, which will probably interest some developers +eventually, well it already did, that was going to wait, but someone wanted it. + +8. Apt repo handler now supports DEB822 format, which is not an easy format to +parse. + +========================================================== + +MAINTAINERS: + +Note the following: despite my strong dislike for tags, every commit that touches +either inxi or inxi.1 man page will be tagged if I think they would be something +relevant to distro packagers. While github insists on calling my tags releases, +I want to be crystal clear: inxi has one and only one 'release', the current master +branch version. The tagged commits that github calls releases are NOT releases, +they are just tagged commits. The version I release tomorrow will be the current +master, and all previous versions will be obsolete and will not be supported. + +The .gz files have been removed from the master branch history, thus shrinking it +a lot. I have removed for this reason the master-plain branch, which mirrored +master and provided a gz free branch, but apparently this was simply ignored so +there's no reason to keep it going. If you insist on grabbing all the branches and +find more data in there, then please correct your practices, you are only getting +the data from the master branch. + +inxi is rolling release software and has no releases, so the tags are supposed +to create some illusion that a tag actually means something. Since it doesn't, +I decided to take the path of least resistance and just add an auto tagging tool +to my commit scripts and use it when it seems appropriate, like on this commit. + +All development work now will happen via the pinxi branch, so that makes the process +a lot cleaner, since I can now basically beta test all new commmits to master. +pinxi and binxi are both standalone versions of inxi, they have their own config +and data directories, config files, man pages, etc. + +----------------------------------------------------- + +New Perl inxi is already way ahead of Gawk/Bash inxi, more features, more accurate, +and most bugs being fixed now are because a lot of people are contributing eyes and +testing, and are finding stuff that was wrong, or simply missing, on old inxi as +well as on Perl inxi. Fixes to Perl inxi (>2.9) will not be rolled into to binxi +since the entire reason I spent over 4 months on this project was to never have to +touch Gawk/Bash inxi again. + +Most imporant, however, is that the simple fact was, Gawk/Bash inxi has been +nearly impossible to work on despite my following rigorous practices in coding, +and I simply won't work with that type of stuff anymore. Perl 5.x is a true delight +in comparison, and makes adding new features, enhancing others, far easier, or +even possible, where it wasn't before. + +On a technical level, I have tested Perl inxi heavily, and it will run on all +Perl 5.x versions back to 5.008, which is the cutoff point. This was not that +hard to do, which is why I picked Perl 5.x as the language. This means that +you can drop, just as with binxi, Perl inxi onto a 10 year old system, or +older, and it will run fine, albeit a touch slowly, but must faster than binxi. + +----------------------------------------------------- + +So far users are really liking the new one, it's usually faster in most cases, +the output is cleaner, there's more data, more options, and basically it's +gotten the thumbs up from all the testers, and there have been a LOT, who have +helped. I want to give a special thanks to the following distros for their +exceptional support and testing: + +0. the people who hang out on irc.oftc.net #smxi. Very patient, will test things +with astounding patience, so thanks to them. Archerseven, iotaka and KittyKatt +have been been incredibly helpful when it comes to testing and debugging, and +finding corner cases that I would never have found. + +1. AntiX: they were the first to beta test pinxi, and found massive numbers of +bugs, and stuck with the testing for a long time. They made testing possible for +the next wave of testers, my hats off to them, I've always liked them. + +2. Manjaro also was very helpful, and found more issues and enhancements. + +3. Ubuntu forums users found more, and helped enhance many faetures + +4. Mint users have been very helpful, and were the impetus for some nifty +new features, ilke switching all color codes off when output is piped or sent +to file. They have reminded me of how valuable people's views can be who may not +share the same tech world view as you, but are still very talented and observant +individuals. + +5. Slackware users provided some very thoughtful feedback, which was no surprise +but welcome nonetheless, thanks. + +6. Same with Debian forums, again, some very useful and constructive ideas and +observations, and some very arcane and odd hardware that exposed even more corner +case bugs. + +And several other distros were also helpful, each in their own way. Solus for +example now has their package manager added in repos. + +----------------------------------- +-- Harald Hope - Thu, 22 Mar 2018 22:18:24 -0700 + ===================================================================================== Version: 2.9.03 Patch Version: 00