Changeset 20
- Timestamp:
- 11/06/07 23:20:09 (1 year ago)
- Files:
-
- mysqltuner.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mysqltuner.pl
r19 r20 8 8 # Other Contributors: 9 9 # Paul Kehrer 10 # Dave Burgess 10 11 # 11 12 # This program is free software: you can redistribute it and/or modify … … 105 106 $physical_memory = `sysctl -n hw.memsize`; 106 107 $swap_memory = `sysctl -n vm.swapusage | awk '{print \$3}' | sed 's/\..*\$//'`; 108 } elsif ($os =~ /NetBSD/) { 109 $physical_memory = `sysctl -n hw.physmem`; 110 $swap_memory = `swapctl -l | grep '^/' | awk '{ s+= \$2 } END { print s }'`; 107 111 } elsif ($os =~ /BSD/) { 108 112 $physical_memory = `sysctl -n hw.realmem`; … … 147 151 return 1; 148 152 } else { 149 print "Please enter your MySQL login: ";153 print STDERR "Please enter your MySQL login: "; 150 154 my $name = <>; 151 print "Please enter your MySQL password: ";152 system("stty -echo"); #don't show the password155 print STDERR "Please enter your MySQL password: "; 156 system("stty -echo"); 153 157 my $password = <>; 154 system("stty echo"); #plz give echo back158 system("stty echo"); 155 159 chomp($password); 156 160 chomp($name); … … 159 163 if ($loginstatus =~ /mysqld is alive/) { 160 164 # Login was successful, but we won't say anything to save space 161 print "\n";165 print STDERR "\n"; 162 166 return 1; 163 167 } else {