From e475bfa48bce4eed7c8e46d75298497894343880 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 21 Jul 2008 16:19:50 +0000 Subject: [PATCH] Version bump to 0.9.8 Added new options to help output Made version checking off by default, enabled by --checkversion option --- mysqltuner.pl | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 0ebfb9e..0b91241 100644 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# mysqltuner.pl - Version 0.9.5 +# mysqltuner.pl - Version 0.9.8 # High Performance MySQL Tuning Script # Copyright (C) 2006-2008 Major Hayden - major@mhtx.net # @@ -41,7 +41,7 @@ use diagnostics; use Getopt::Long; # Set up a few variables for use in the script -my $tunerversion = "0.9.5"; +my $tunerversion = "0.9.8"; my (@adjvars, @generalrec); # Set defaults @@ -57,7 +57,7 @@ my %opt = ( "user" => 0, "pass" => 0, "skipsize" => 0, - "skipversion" => 0, + "checkversion" => 0, ); # Gather the options from the command line @@ -73,7 +73,7 @@ GetOptions(\%opt, 'user=s', 'pass=s', 'skipsize', - 'skipversion', + 'checkversion', 'help', ); @@ -90,19 +90,26 @@ sub usage { " To run the script with the default options, run the script without arguments\n". " Allow MySQL server to run for at least 24-48 hours before trusting suggestions\n". " Some routines may require root level privileges (script will provide warnings)\n". + " You must provide the remote server's total memory when connecting to other servers\n". + "\n". + " Connection and Authentication\n". + " --host Connect to a remote host to perform tests (default: localhost)\n". + " --port Port to use for connection (default: 3306)\n". + " --user Username to use for authentication\n". + " --pass Password to use for authentication\n". "\n". " Performance and Reporting Options\n". - " --skipsize Don't enumerate tables and their types/sizes\n". - " (Recommended for servers with many tables)\n". - " --skipversion Don't check for updates to MySQLTuner\n". - " --forcemem i Amount of RAM installed in megabytes\n". - " --forceswap i Amount of swap memory configured in megabytes\n". + " --skipsize Don't enumerate tables and their types/sizes (default: on)\n". + " (Recommended for servers with many tables)\n". + " --checkversion Check for updates to MySQLTuner (default: don't check)\n". + " --forcemem Amount of RAM installed in megabytes\n". + " --forceswap Amount of swap memory configured in megabytes\n". "\n". " Output Options:\n". - " --nogood Remove OK responses\n". - " --nobad Remove negative/suggestion responses\n". - " --noinfo Remove informational responses\n". - " --nocolor Don't print output in color\n". + " --nogood Remove OK responses\n". + " --nobad Remove negative/suggestion responses\n". + " --noinfo Remove informational responses\n". + " --nocolor Don't print output in color\n". "\n"; exit; } @@ -330,7 +337,7 @@ sub get_all_vars { # Checks for updates to MySQLTuner sub validate_tuner_version { print "\n-------- General Statistics --------------------------------------------------\n"; - if ($opt{skipversion} eq 1) { + if ($opt{checkversion} eq 0) { infoprint "Skipped version check for MySQLTuner script\n"; return; }