Changeset 32
- Timestamp:
- 02/27/08 03:07:15 (9 months ago)
- Files:
-
- mysqltuner.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mysqltuner.pl
r31 r32 87 87 sub infoprint { print $info." ".$_[0] unless ($opt{noinfo} == 1); } 88 88 sub badprint { print $bad." ".$_[0] unless ($opt{nobad} == 1); } 89 sub redwrap { return "\e[00;31m".$_[0]."\e[00m"; }90 sub greenwrap { return "\e[00;32m".$_[0]."\e[00m"; }89 sub redwrap { return ($opt{nocolor} == 0)? "\e[00;31m".$_[0]."\e[00m" : $_[0] ; } 90 sub greenwrap { return ($opt{nocolor} == 0)? "\e[00;32m".$_[0]."\e[00m" : $_[0] ; } 91 91 92 92 # Calculates the parameter passed in bytes, and then rounds it to one decimal place … … 247 247 my ($mysqlvermajor,$mysqlverminor); 248 248 sub validate_mysql_version { 249 print " -------- General Statistics --------------------------------------------------\n";249 print "\n-------- General Statistics --------------------------------------------------\n"; 250 250 ($mysqlvermajor,$mysqlverminor) = $myvar{'version'} =~ /(\d)\.(\d)/; 251 251 if ($mysqlvermajor < 5) { … … 277 277 my (%enginestats,%enginecount); 278 278 sub check_storage_engines { 279 print " -------- Storage Engine Statistics -------------------------------------------\n";279 print "\n-------- Storage Engine Statistics -------------------------------------------\n"; 280 280 infoprint "Status: "; 281 281 my $engines; … … 292 292 foreach my $db (@dblist) { 293 293 chomp($db); 294 if ($db eq "information_schema") { next; } 294 295 if ($mysqlvermajor == 3 || ($mysqlvermajor == 4 && $mysqlverminor == 0)) { 295 296 # MySQL 3.23/4.0 keeps Data_Length in the 6th column … … 457 458 458 459 sub mysql_stats { 459 print " -------- Performance Metrics -------------------------------------------------\n";460 print "\n-------- Performance Metrics -------------------------------------------------\n"; 460 461 # Show uptime, queries per second, connections, traffic stats 461 462 my $qps; … … 662 663 # Take the two recommendation arrays and display them at the end of the output 663 664 sub make_recommendations { 664 print " -------- Recommendations -----------------------------------------------------\n";665 print "\n-------- Recommendations -----------------------------------------------------\n"; 665 666 if (@generalrec > 0) { 666 667 print "General recommendations:\n"; … … 678 679 print "No additional performance recommendations are available.\n" 679 680 } 681 print "\n"; 680 682 } 681 683 … … 683 685 # BEGIN 'MAIN' 684 686 # --------------------------------------------------------------------------- 685 print " >> MySQLTuner $tunerversion - Major Hayden <major\@mhtx.net>\n".687 print "\n >> MySQLTuner $tunerversion - Major Hayden <major\@mhtx.net>\n". 686 688 " >> Bug reports, feature requests, and downloads at http://mysqltuner.com/\n". 687 689 " >> Run with '--help' for additional options and output filtering\n";