Changeset 9
- Timestamp:
- 06/06/07 15:31:48 (1 year ago)
- Files:
-
- mysqltuner.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mysqltuner.pl
r8 r9 13 13 "noinfo" => 0, 14 14 "notitle" => 0, 15 " noexplain" => 0,15 "withexplain" => 0, 16 16 "explainonly" => 0, 17 "nocolor" => 0, 17 18 ); 18 19 … … 23 24 'noinfo', 24 25 'notitle', 25 ' noexplain',26 'withexplain', 26 27 'explainonly', 28 'nocolor', 27 29 'help', 28 30 ); … … 44 46 " --noinfo Remove informational responses\n". 45 47 " --notitle Remove section title headers\n". 46 " -- noexplain Removeverbose explanations\n".48 " --withexplain Add verbose explanations\n". 47 49 " --explainonly Provide only long text explanations, no bullets/titles\n". 50 " --nocolor Don't print output in color\n". 48 51 "\n"; 49 52 exit; … … 51 54 52 55 # CONFIGURATION ITEMS 53 my $revision = "1"; 54 my $good = "[\e[00;32mOK\e[00m]"; 55 my $bad = "[\e[00;31m!!\e[00m]"; 56 my $info = "[\e[00;34m--\e[00m]"; 56 my ($good,$bad,$info); 57 if ($opt{nocolor} == 0) { 58 $good = "[\e[00;32mOK\e[00m]"; 59 $bad = "[\e[00;31m!!\e[00m]"; 60 $info = "[\e[00;34m--\e[00m]"; 61 } else { 62 $good = "[OK]"; 63 $bad = "[!!]"; 64 $info = "[--]"; 65 } 57 66 58 67 if ($opt{explainonly} == 1) { … … 89 98 my $exptext; 90 99 sub explainprint { 91 if ($opt{ noexplain} == 1) { return 0; }100 if ($opt{withexplain} == 0) { return 0; } 92 101 my $text = shift; 93 102 if ($opt{explainonly} == 0) { … … 616 625 # --------------------------------------------------------------------------- 617 626 print " MySQL High-Performance Tuner - Major Hayden <major.hayden\@rackspace.com>\n". 618 " Bug reports, feature requests, downloads at mysqltuner.com\n"; 627 " Bug reports, feature requests, downloads at mysqltuner.com\n". 628 " Run with '--help' for additional options and output filtering\n"; 619 629 mysql_install_ok; # Check to see if MySQL is installed 620 630 os_setup; # Set up some OS variables