mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 08:11:39 +00:00
New version, new man. Options changes
To get rid of some non-intuitive options, I've changed some of the --alt values to more obvious argument names; --dmidecode --no-ssl --no-host --host This makes them easier to remember, hopefully. Updated help, man pages to cover this change as well. Added some more lsblk debugger output to try to start building enough information to really figure out dm/encrypted/lvm and how those are actually handled internally in the system in terms of partitions, filesystems, etc.
This commit is contained in:
parent
24296838a8
commit
51da186c9d
61
inxi
61
inxi
|
@ -36,8 +36,8 @@ use POSIX qw(uname strftime ttyname);
|
|||
|
||||
## INXI INFO ##
|
||||
my $self_name='inxi';
|
||||
my $self_version='2.9.04';
|
||||
my $self_date='2018-03-22';
|
||||
my $self_version='2.9.05';
|
||||
my $self_date='2018-03-24';
|
||||
my $self_patch='00';
|
||||
## END INXI INFO ##
|
||||
|
||||
|
@ -759,6 +759,7 @@ sub get_config_item {
|
|||
elsif ($key eq 'OUTPUT_TYPE') {$output_type = $val if $val =~ /^json|screen|xml/}
|
||||
elsif ($key eq 'PS_COUNT') {$ps_count = int($val) }
|
||||
elsif ($key eq 'SENSORS_CPU_NO') {$sensors_cpu_nu = int($val)}
|
||||
elsif ($key eq 'SHOW_HOST' || $key eq 'B_SHOW_HOST') { $show{'host'} = int($val)}
|
||||
# layout
|
||||
elsif ($key eq 'CONSOLE_COLOR_SCHEME') {$colors{'console'} = int($val)}
|
||||
elsif ($key eq 'GLOBAL_COLOR_SCHEME') {$colors{'global'} = int($val)}
|
||||
|
@ -1158,12 +1159,6 @@ sub log_data {
|
|||
}
|
||||
}
|
||||
|
||||
# args: dbg arg, 1-xx
|
||||
sub process_dbg {
|
||||
my ($arg) = @_;
|
||||
if ($arg == 20) {$b_arm = 1}
|
||||
}
|
||||
|
||||
sub set_debugger {
|
||||
if ( $debug < 10 || $debug > 12){
|
||||
$end = '';
|
||||
|
@ -1379,12 +1374,11 @@ sub disk_data {
|
|||
['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'],
|
||||
['lsblk', '-r --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
||||
['lsblk', '-br --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
||||
['lsblk', '-Pb --output TYPE,NAME,PKNAME,RM,FSTYPE,SIZE'],
|
||||
['lsblk', '-r --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE'],
|
||||
['lsblk', '-P --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE'],
|
||||
['gpart', 'list'],
|
||||
['gpart', 'show'],
|
||||
['gpart', 'status'],
|
||||
|
@ -2084,7 +2078,7 @@ sub set_downloader {
|
|||
else {
|
||||
$dl{'dl'} = '';
|
||||
}
|
||||
# no-ssl-opt is set to 1 with --alt 34, so it is true, then assign
|
||||
# no-ssl-opt is set to 1 with --no-ssl, so it is true, then assign
|
||||
$dl{'no-ssl-opt'} = $dl{'no-ssl'} if $dl{'no-ssl-opt'};
|
||||
eval $end if $b_log;
|
||||
}
|
||||
|
@ -3602,12 +3596,7 @@ sub get_options{
|
|||
## Start non data options
|
||||
'alt:i' => sub {
|
||||
my ($opt,$arg) = @_;
|
||||
if ($arg == 30) {$b_irc = 0}
|
||||
elsif ($arg == 31) {$show{'host'} = 0}
|
||||
elsif ($arg == 32) {$show{'host'} = 1}
|
||||
elsif ($arg == 33) {$b_dmidecode_force=1}
|
||||
elsif ($arg == 34) {$dl{'no-ssl-opt'}=1}
|
||||
elsif ($arg == 40) {
|
||||
if ($arg == 40) {
|
||||
$dl{'tiny'} = 0;
|
||||
$b_downloader = 1;}
|
||||
elsif ($arg == 41) {
|
||||
|
@ -3627,6 +3616,8 @@ sub get_options{
|
|||
else {
|
||||
error_handler('bad-arg', $opt, $arg);
|
||||
}},
|
||||
'arm' => sub {
|
||||
$b_arm = 1 },
|
||||
'bsd:s' => sub {
|
||||
my ($opt,$arg) = @_;
|
||||
if ($arg =~ /^dragonfly|freebsd|openbsd|netbsd$/i){
|
||||
|
@ -3640,7 +3631,6 @@ sub get_options{
|
|||
my ($opt,$arg) = @_;
|
||||
if ($arg > 0) {
|
||||
$test[$arg] = 1;
|
||||
process_dbg($arg);
|
||||
}
|
||||
else {
|
||||
error_handler('bad-arg', $opt, $arg);
|
||||
|
@ -3666,6 +3656,8 @@ sub get_options{
|
|||
else {
|
||||
error_handler('bad-arg', $opt, $arg);
|
||||
} },
|
||||
'dmidecode' => sub {
|
||||
$b_dmidecode_force = 1 },
|
||||
'downloader:s' => sub {
|
||||
my ($opt,$arg) = @_;
|
||||
$arg = lc($arg);
|
||||
|
@ -3700,6 +3692,10 @@ sub get_options{
|
|||
$help_type = 'standard'; },
|
||||
'H|help-full' => sub {
|
||||
$help_type = 'full'; },
|
||||
'hostname' => sub {
|
||||
$show{'host'} = 1 },
|
||||
'irc' => sub {
|
||||
$b_irc = 1; },
|
||||
'man' => sub {
|
||||
$b_use_man = 1; },
|
||||
'output:s' => sub {
|
||||
|
@ -3715,6 +3711,10 @@ sub get_options{
|
|||
else {
|
||||
error_handler('bad-arg', $opt, $arg);
|
||||
}},
|
||||
'no-hostname' => sub {
|
||||
$show{'host'} = 0 },
|
||||
'no-ssl' => sub {
|
||||
$dl{'no-ssl-opt'}=1 },
|
||||
'output-file:s' => sub {
|
||||
my ($opt,$arg) = @_;
|
||||
if ($arg){
|
||||
|
@ -4105,14 +4105,6 @@ sub show_options {
|
|||
[0, '', '', "$line" ],
|
||||
[0, '', '', "Advanced Options:" ],
|
||||
[1, '', '--alt', "Trigger for various advanced options:" ],
|
||||
# ['2', '0', '', "Overrides defective or corrupted data." ],
|
||||
['2', '31', '', "Turns off hostname in output. Useful if showing output from
|
||||
servers etc." ],
|
||||
['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 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." ],
|
||||
|
@ -4123,8 +4115,15 @@ sub show_options {
|
|||
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', '', '--dmidecode', "Forces use of dmidecode data instead of /sys where
|
||||
relevant (-M)." ],
|
||||
['1', '', '--hostname', "Turns on hostname in output." ],
|
||||
['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', '', '--no-hostname', "Turns off hostname in output. Useful if showing output from
|
||||
servers etc." ],
|
||||
['1', '', '--no-ssl', "Skips SSL certificate checks for all downloader activities
|
||||
(wget/fetch/curl only)." ],
|
||||
['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" ],
|
||||
|
@ -4639,7 +4638,7 @@ sub row_defaults {
|
|||
'dmesg-boot-missing' => 'dmesg.boot not found',
|
||||
'IP' => "No $id data found. Connected to the web? SSL issues?",
|
||||
'machine-data' => "No machine data: try newer kernel.",
|
||||
'machine-data-alt-33' => "No machine data: try newer kernel. Is dmidecode installed? Try -M --alt 33.",
|
||||
'machine-data-alt-33' => "No machine data: try newer kernel. Is dmidecode installed? Try -M --dmidecode.",
|
||||
'machine-data-dmidecode' => "No machine data: try newer kernel, or install dmidecoce.",
|
||||
'optical-data' => "No Optical or Floppy data was found.",
|
||||
'optical-data-bsd' => "No floppy or optical data found for this BSD system.",
|
||||
|
|
42
inxi.1
42
inxi.1
|
@ -1,4 +1,4 @@
|
|||
.TH INXI 1 "2018\-03\-22" inxi "inxi manual"
|
||||
.TH INXI 1 "2018\-03\-23" inxi "inxi manual"
|
||||
.SH NAME
|
||||
inxi \- Command line system information script for console and IRC
|
||||
.SH SYNOPSIS
|
||||
|
@ -698,24 +698,6 @@ lxde\-panel, and others. Added mainly for Mint support.
|
|||
\- Adds location (city state country), weather observation time, altitude of system.
|
||||
|
||||
.SH ADVANCED OPTIONS
|
||||
.TP
|
||||
.B \-\-alt 31\fR
|
||||
Turns off hostname in System line. Useful, with \fB\-z\fR, for anonymizing your
|
||||
inxi output for posting on forums or IRC.
|
||||
.TP
|
||||
.B \-\-alt 32\fR
|
||||
Turns on hostname in System line. Overrides inxi config file value (if set):
|
||||
B_SHOW_HOST='false'.
|
||||
.TP
|
||||
.B \-\-alt 33\fR
|
||||
Force use of \fBdmidecode\fR. This will override \fB/sys\fR data in some lines,
|
||||
like \fB\-M\fR.
|
||||
.TP
|
||||
.B \-\-alt 34\fR
|
||||
Skip SSL certificate checks for all downloader actions (\fB\-U\fR, \fB\-w\fR,
|
||||
\fB\-W\fR, \fB\-i\fR). Use if your system does not have current SSL certificate
|
||||
lists, or if you have problems making a connection for any reason. \fBwget\fR,
|
||||
\fBcurl\fR, and \fBfetch\fR only.
|
||||
|
||||
.TP
|
||||
.B \-\-alt 40\fR
|
||||
|
@ -760,10 +742,20 @@ You can test this easily by running this command out of X/display server:
|
|||
|
||||
If it hangs, \fB\-\-display\fR will not work.
|
||||
|
||||
.TP
|
||||
.B \-\-dmidecode\fR
|
||||
Force use of \fBdmidecode\fR. This will override \fB/sys\fR data in some lines,
|
||||
like \fB\-M\fR or \fB\-B\fR.
|
||||
|
||||
.TP
|
||||
.B \-\-downloader [curl|fetch|perl|wget]\fR
|
||||
Force inxi to use [curl|fetch|perl|wget] for downloads.
|
||||
|
||||
.TP
|
||||
.B \-\-hostname\fR
|
||||
Turns on hostname in System line. Overrides inxi config file value (if set):
|
||||
SHOW_HOST='false'.
|
||||
|
||||
.TP
|
||||
.B \-\-limit [\-1 \- x]\fR
|
||||
\fB\-1\fR removes limit. Raise or lower max output limit of IP addresses for \fB\-i\fR.
|
||||
|
@ -772,6 +764,18 @@ Force inxi to use [curl|fetch|perl|wget] for downloads.
|
|||
.B \-\-man\fR
|
||||
Updates / installs man page with -U if pinxi or using \-U 3 dev branch.
|
||||
|
||||
.TP
|
||||
.B \-\-no\-hostname\fR
|
||||
Turns off hostname in System line. Useful, with \fB\-z\fR, for anonymizing your
|
||||
inxi output for posting on forums or IRC.
|
||||
|
||||
.TP
|
||||
.B \-\-no\-ssl\fR
|
||||
Skip SSL certificate checks for all downloader actions (\fB\-U\fR, \fB\-w\fR,
|
||||
\fB\-W\fR, \fB\-i\fR). Use if your system does not have current SSL certificate
|
||||
lists, or if you have problems making a connection for any reason. \fBwget\fR,
|
||||
\fBcurl\fR, and \fBfetch\fR only.
|
||||
|
||||
.TP
|
||||
.B \-\-output [json|screen|xml]\fR
|
||||
Change data output type. Requires \-\-output\-file [full path|print] if not 'screen'.
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
=====================================================================================
|
||||
Version: 2.9.05
|
||||
Patch Version: 00
|
||||
Script Date: 2018-03-24
|
||||
-----------------------------------
|
||||
Changes:
|
||||
-----------------------------------
|
||||
|
||||
New version, new man. Options changes
|
||||
|
||||
To get rid of some non-intuitive options, I've changed some of the --alt values
|
||||
to more obvious argument names; --dmidecode --no-ssl --no-host --host
|
||||
|
||||
This makes them easier to remember, hopefully.
|
||||
|
||||
Updated help, man pages to cover this change as well.
|
||||
|
||||
Added some more lsblk debugger output to try to start building enough information to
|
||||
really figure out dm/encrypted/lvm and how those are actually handled internally in
|
||||
the system in terms of partitions, filesystems, etc.
|
||||
|
||||
-----------------------------------
|
||||
-- Harald Hope - Sat, 24 Mar 2018 02:08:42 -0700
|
||||
|
||||
=====================================================================================
|
||||
Version: 2.9.04
|
||||
Patch Version: 00
|
||||
|
|
Loading…
Reference in a new issue