Skip to content

Commit

Permalink
'name resolution is active' should be OK when cPanel is detected #561
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrenouard committed Mar 12, 2022
1 parent 0fdcda8 commit ecd2da6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
# mysqltuner.pl - Version 1.9.5
# mysqltuner.pl - Version 1.9.6
# High Performance MySQL Tuning Script
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
# Copyright (C) 2006-2022 Jean-Marie Renouard - jmrenouard@gmail.com
Expand Down Expand Up @@ -57,7 +57,7 @@ package main;
#use Env;

# Set up a few variables for use in the script
my $tunerversion = "1.9.5";
my $tunerversion = "1.9.6";
my ( @adjvars, @generalrec );

# Set defaults
Expand Down Expand Up @@ -3164,12 +3164,18 @@ sub mysql_stats {
infoprint
"Skipped name resolution test due to missing skip_name_resolve in system variables.";
}
elsif ( -r "/etc/psa/.psa.shadow" and $result{'Variables'}{'skip_name_resolve'} eq 'OFF') {
infoprint "CPanel and Flex system skip-name-resolve should be on";
push (@generalrec, "cPanal and skip-name-resolve: https://support.cpanel.net/hc/en-us/articles/360052752094");
push (@adjvars, "skip-name-resolve=0");
}
elsif ( $result{'Variables'}{'skip_name_resolve'} eq 'OFF' ) {
badprint
"name resolution is active : a reverse name resolution is made for each new connection and can reduce performance";
push( @generalrec,
"Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1"
);
push (@adjvars, "skip-name-resolve=1");
}

# Query cache
Expand Down Expand Up @@ -6860,7 +6866,7 @@ sub which {
=head1 NAME
MySQLTuner 1.9.5 - MySQL High Performance Tuning Script
MySQLTuner 1.9.6 - MySQL High Performance Tuning Script
=head1 IMPORTANT USAGE GUIDELINES
Expand Down

0 comments on commit ecd2da6

Please sign in to comment.