1. -xtm was showing memory %, not cpu % in cpu item

2. -G compat-v was showing for nvidia, it's not supposed to, and was also wrong
for nvidia, they forgot to update one of their gl string numbers.
This commit is contained in:
Harald Hope 2018-04-17 16:53:27 -07:00
parent 92ee8c5a79
commit 4af87f849a
2 changed files with 27 additions and 7 deletions

18
inxi
View file

@ -31,7 +31,7 @@ use POSIX qw(uname strftime ttyname);
## INXI INFO ##
my $self_name='inxi';
my $self_version='3.0.05';
my $self_version='3.0.06';
my $self_date='2018-04-17';
my $self_patch='00';
## END INXI INFO ##
@ -4316,7 +4316,7 @@ sub get_client_name {
}
# gnu/linux uses last value
else {
$client_name = lc($data[scalar @data - 1]);
$client_name = lc($data[-1]);
}
$client_name =~ s/.*\|-(|)//;
$client_name =~ s/[0-9\.]+$//; # clean things like python2.7
@ -4454,7 +4454,7 @@ sub perl_python_client {
# this is a hack to try to show konversation if inxi is running but started via /cmd
# OR via program shortcuts, both cases in fact now
# main::print_line("konvi: " . scalar grep { $_ =~ /konversation/ } @ps_cmd);
if ( $b_display && main::check_program('konversation') && ( scalar grep { $_ =~ /konversation/ } @ps_cmd ) > 0){
if ( $b_display && main::check_program('konversation') && ( grep { $_ =~ /konversation/ } @ps_cmd )){
@app = main::program_values('konversation');
$client{'version'} = main::program_version('konversation',$app[0],$app[1],$app[2],$app[5],$app[6]);
$client{'name'} = 'konversation';
@ -4465,11 +4465,11 @@ sub perl_python_client {
## gives the user system irc priority, and you don't see supybot listed, so use SHELL
elsif ( !$b_display &&
(main::check_program('supybot') || main::check_program('gribble') || main::check_program('limnoria')) &&
( scalar grep { $_ =~ /supybot/ } @ps_cmd ) > 0 ){
( grep { $_ =~ /supybot/ } @ps_cmd ) ){
@app = main::program_values('supybot');
$client{'version'} = main::program_version('supybot',$app[0],$app[1],$app[2],$app[5],$app[6]);
if ($client{'version'}){
if ( ( scalar grep { $_ =~ /gribble/ } @ps_cmd ) > 0){
if ( grep { $_ =~ /gribble/ } @ps_cmd ){
$client{'name'} = 'gribble';
$client{'name-print'} = 'Gribble';
}
@ -8038,8 +8038,11 @@ sub gl_data(){
}
my ($direct_render,$renderer,$version) = ('N/A','N/A','N/A');
$direct_render = join ', ', @direct_render if @direct_render;
# non free drivers once filtered and cleaned show the same for core and compat
# but this stopped for some reason at 4.5/4.6 nvidia
if (@core_profile_version && @opengl_version &&
join ('', @core_profile_version) ne join( '', @opengl_version)){
join ('', @core_profile_version) ne join( '', @opengl_version) &&
!(grep {/nvidia/i} @opengl_version ) ){
@opengl_version = @core_profile_version;
$b_compat = 1;
}
@ -8050,6 +8053,7 @@ sub gl_data(){
main::key($num++,'renderer') => $renderer,
main::key($num++,'v') => $version,
});
if ($b_compat && $extra > 1 && $compat_version){
$row[0]{main::key($num++,'compat-v')} = $compat_version;
}
@ -10263,7 +10267,7 @@ sub mem_processes {
}
$processes[$j]{main::key($num++,'pid')} = $row[1];
if ($extra > 0){
$cpu = $row[3] . '%';
$cpu = $row[2] . '%';
$processes[$j]{main::key($num++,'cpu')} = $cpu;
}
#print Data::Dumper::Dumper \@processes, "i: $i; j: $j ";

View file

@ -1,3 +1,19 @@
=====================================================================================
Version: 3.0.06
Patch Version: 00
Script Date: 2018-04-17
-----------------------------------
Changes:
-----------------------------------
New version. 2 bug fixes.
1. -xtm was showing memory %, not cpu % in cpu item
2. -G compat-v was showing for nvidia, it's not supposed to, and was also wrong
for nvidia, they forgot to update one of their gl string numbers.
-----------------------------------
-- Harald Hope - Tue, 17 Apr 2018 16:52:05 -0700
=====================================================================================
Version: 3.0.05
Patch Version: 00