update staff
This commit is contained in:
parent
737334f9e0
commit
de1bd2015e
2 changed files with 36 additions and 23 deletions
2
USAGE.md
2
USAGE.md
|
@ -1,6 +1,6 @@
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
MySQLTuner 1.7.6 - MySQL High Performance Tuning Script
|
MySQLTuner 1.7.7 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
# IMPORTANT USAGE GUIDELINES
|
# IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,8 @@ GetOptions(
|
||||||
'verbose', 'sysstat',
|
'verbose', 'sysstat',
|
||||||
'password=s', 'pfstat',
|
'password=s', 'pfstat',
|
||||||
'passenv=s', 'userenv=s',
|
'passenv=s', 'userenv=s',
|
||||||
'defaults-file=s', 'ssl-ca=s', 'color'
|
'defaults-file=s', 'ssl-ca=s',
|
||||||
|
'color'
|
||||||
)
|
)
|
||||||
or pod2usage(
|
or pod2usage(
|
||||||
-exitval => 1,
|
-exitval => 1,
|
||||||
|
@ -199,9 +200,10 @@ open( $fh, '>', $outputfile )
|
||||||
or die("Fail opening $outputfile")
|
or die("Fail opening $outputfile")
|
||||||
if defined($outputfile);
|
if defined($outputfile);
|
||||||
$opt{nocolor} = 1 if defined($outputfile);
|
$opt{nocolor} = 1 if defined($outputfile);
|
||||||
$opt{nocolor} = 1 unless(-t STDOUT);
|
$opt{nocolor} = 1 unless ( -t STDOUT );
|
||||||
|
|
||||||
|
$opt{nocolor} = 0 if ( $opt{color} == 1 );
|
||||||
|
|
||||||
$opt{nocolor} = 0 if ($opt{color} == 1);
|
|
||||||
# Setting up the colors for the print styles
|
# Setting up the colors for the print styles
|
||||||
my $me = `whoami`;
|
my $me = `whoami`;
|
||||||
$me =~ s/\n//g;
|
$me =~ s/\n//g;
|
||||||
|
@ -1695,7 +1697,7 @@ sub security_recommendations {
|
||||||
my $PASS_COLUMN_NAME = 'password';
|
my $PASS_COLUMN_NAME = 'password';
|
||||||
if ( $myvar{'version'} =~ /5\.7|10\..*MariaDB*/ ) {
|
if ( $myvar{'version'} =~ /5\.7|10\..*MariaDB*/ ) {
|
||||||
$PASS_COLUMN_NAME =
|
$PASS_COLUMN_NAME =
|
||||||
"IF(plugin='mysql_native_password', authentication_string, 'password')";
|
"IF(plugin='mysql_native_password', authentication_string, 'password')";
|
||||||
}
|
}
|
||||||
debugprint "Password column = $PASS_COLUMN_NAME";
|
debugprint "Password column = $PASS_COLUMN_NAME";
|
||||||
|
|
||||||
|
@ -1843,16 +1845,19 @@ sub get_replication_status {
|
||||||
. scalar( keys %myslaves )
|
. scalar( keys %myslaves )
|
||||||
. " server(s).";
|
. " server(s).";
|
||||||
}
|
}
|
||||||
infoprint "Binlog format: ". $myvar{'binlog_format'};
|
infoprint "Binlog format: " . $myvar{'binlog_format'};
|
||||||
infoprint "XA support enabled: ". $myvar{'innodb_support_xa'};
|
infoprint "XA support enabled: " . $myvar{'innodb_support_xa'};
|
||||||
infoprint "Semi synchronous replication Master: ". $myvar{'rpl_semi_sync_master_enabled'};
|
infoprint "Semi synchronous replication Master: "
|
||||||
infoprint "Semi synchronous replication Slave: ". $myvar{'rpl_semi_sync_slave_enabled'};
|
. $myvar{'rpl_semi_sync_master_enabled'};
|
||||||
|
infoprint "Semi synchronous replication Slave: "
|
||||||
|
. $myvar{'rpl_semi_sync_slave_enabled'};
|
||||||
if ( scalar( keys %myrepl ) == 0 and scalar( keys %myslaves ) == 0 ) {
|
if ( scalar( keys %myrepl ) == 0 and scalar( keys %myslaves ) == 0 ) {
|
||||||
infoprint "This is a standalone server";
|
infoprint "This is a standalone server";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( scalar( keys %myrepl ) == 0 ) {
|
if ( scalar( keys %myrepl ) == 0 ) {
|
||||||
infoprint "No replication setup for this server or replication not started.";
|
infoprint
|
||||||
|
"No replication setup for this server or replication not started.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1919,11 +1924,11 @@ sub mysql_version_eq {
|
||||||
my ( $maj, $min, $mic ) = @_;
|
my ( $maj, $min, $mic ) = @_;
|
||||||
$min ||= 0;
|
$min ||= 0;
|
||||||
$mic ||= 0;
|
$mic ||= 0;
|
||||||
return
|
return ( int($mysqlvermajor) == int($maj)
|
||||||
( int($mysqlvermajor) == int($maj)
|
&& int($mysqlverminor) == int($min)
|
||||||
&& int($mysqlverminor) == int($min)
|
&& int($mysqlvermicro) == int($mic) );
|
||||||
&& int($mysqlvermicro) == int($mic) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if MySQL version is greater than equal to (major, minor, micro)
|
# Checks if MySQL version is greater than equal to (major, minor, micro)
|
||||||
sub mysql_version_ge {
|
sub mysql_version_ge {
|
||||||
my ( $maj, $min, $mic ) = @_;
|
my ( $maj, $min, $mic ) = @_;
|
||||||
|
@ -3083,9 +3088,15 @@ sub mysql_stats {
|
||||||
"Read this before increasing "
|
"Read this before increasing "
|
||||||
. $table_cache_var
|
. $table_cache_var
|
||||||
. " over 64: http://bit.ly/1mi7c4C" );
|
. " over 64: http://bit.ly/1mi7c4C" );
|
||||||
push( @generalrec, "This is MyISAM only table_cache scalability problem, InnoDB not affected.");
|
push( @generalrec,
|
||||||
push ( @generalrec, "See more details here: https://bugs.mysql.com/bug.php?id=49177");
|
"This is MyISAM only table_cache scalability problem, InnoDB not affected."
|
||||||
push ( @generalrec, "This bug already fixed in MySQL 5.7.9 and newer MySQL versions.");
|
);
|
||||||
|
push( @generalrec,
|
||||||
|
"See more details here: https://bugs.mysql.com/bug.php?id=49177"
|
||||||
|
);
|
||||||
|
push( @generalrec,
|
||||||
|
"This bug already fixed in MySQL 5.7.9 and newer MySQL versions."
|
||||||
|
);
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Beware that open_files_limit ("
|
"Beware that open_files_limit ("
|
||||||
. $myvar{'open_files_limit'}
|
. $myvar{'open_files_limit'}
|
||||||
|
@ -3407,12 +3418,12 @@ sub mysqsl_pfs {
|
||||||
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
||||||
infoprint "Memory used by P_S: " . hr_bytes( get_pf_memory() );
|
infoprint "Memory used by P_S: " . hr_bytes( get_pf_memory() );
|
||||||
|
|
||||||
if ( mysql_version_eq(10, 0) ) {
|
if ( mysql_version_eq( 10, 0 ) ) {
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Performance shouldn't be activated for MariaDB 10.0 for performance issue"
|
"Performance shouldn't be activated for MariaDB 10.0 for performance issue"
|
||||||
);
|
);
|
||||||
push( @adjvars, "performance_schema = OFF disable PFS" );
|
push( @adjvars, "performance_schema = OFF disable PFS" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
||||||
infoprint "Sys schema isn't installed.";
|
infoprint "Sys schema isn't installed.";
|
||||||
|
@ -3803,6 +3814,7 @@ sub mysqsl_pfs {
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
# InnoDB Buffer Pool by schema
|
# InnoDB Buffer Pool by schema
|
||||||
subheaderprint "Performance schema: InnoDB Buffer Pool by schema";
|
subheaderprint "Performance schema: InnoDB Buffer Pool by schema";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
|
@ -4003,7 +4015,7 @@ sub mysqsl_pfs {
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
'use sys;select query from sys.x\\$statements_with_temp_tables LIMIT 20'
|
'use sys;select query from sys.x\\$statements_with_temp_tables LIMIT 20'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -6159,6 +6171,7 @@ validate_tuner_version; # Check last version
|
||||||
mysql_setup; # Gotta login first
|
mysql_setup; # Gotta login first
|
||||||
debugprint "MySQL FINAL Client : $mysqlcmd $mysqllogin";
|
debugprint "MySQL FINAL Client : $mysqlcmd $mysqllogin";
|
||||||
debugprint "MySQL Admin FINAL Client : $mysqladmincmd $mysqllogin";
|
debugprint "MySQL Admin FINAL Client : $mysqladmincmd $mysqllogin";
|
||||||
|
|
||||||
#exit(0);
|
#exit(0);
|
||||||
os_setup; # Set up some OS variables
|
os_setup; # Set up some OS variables
|
||||||
get_all_vars; # Toss variables/status into hashes
|
get_all_vars; # Toss variables/status into hashes
|
||||||
|
|
Loading…
Reference in a new issue