Added AIX 5L support (patch from Baptiste M. via the blog)
Adjusted the version number (should have been done for the 1.1.0 tagged release)
This commit is contained in:
parent
32cf710293
commit
f0f9f3f325
1 changed files with 34 additions and 27 deletions
|
@ -20,19 +20,16 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# This project would not be possible without help from:
|
# This project would not be possible without help from:
|
||||||
# Matthew Montgomery Paul Kehrer
|
# Matthew Montgomery Paul Kehrer Dave Burgess
|
||||||
# Dave Burgess Jonathan Hinds
|
# Jonathan Hinds Mike Jackson Nils Breunese
|
||||||
# Mike Jackson Nils Breunese
|
# Shawn Ashlee Luuk Vosslamber Ville Skytta
|
||||||
# Shawn Ashlee Luuk Vosslamber
|
# Trent Hornibrook Jason Gill Mark Imbriaco
|
||||||
# Ville Skytta Trent Hornibrook
|
# Greg Eden Aubin Galinotti Giovanni Bechis
|
||||||
# Jason Gill Mark Imbriaco
|
# Bill Bradford Ryan Novosielski Michael Scheidell
|
||||||
# Greg Eden Aubin Galinotti
|
# Blair Christensen Hans du Plooy Victor Trac
|
||||||
# Giovanni Bechis Bill Bradford
|
# Everett Barnes Tom Krouper Gary Barrueto
|
||||||
# Ryan Novosielski Michael Scheidell
|
# Simon Greenaway Adam Stein Isart Montane
|
||||||
# Blair Christensen Hans du Plooy
|
# Baptiste M.
|
||||||
# Victor Trac Everett Barnes
|
|
||||||
# Tom Krouper Gary Barrueto
|
|
||||||
# Simon Greenaway Adam Stein
|
|
||||||
#
|
#
|
||||||
# Inspired by Matthew Montgomery's tuning-primer.sh script:
|
# Inspired by Matthew Montgomery's tuning-primer.sh script:
|
||||||
# http://forge.mysql.com/projects/view.php?id=44
|
# http://forge.mysql.com/projects/view.php?id=44
|
||||||
|
@ -43,7 +40,7 @@ use diagnostics;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
# Set up a few variables for use in the script
|
# Set up a few variables for use in the script
|
||||||
my $tunerversion = "1.0.1";
|
my $tunerversion = "1.1.0";
|
||||||
my (@adjvars, @generalrec);
|
my (@adjvars, @generalrec);
|
||||||
|
|
||||||
# Set defaults
|
# Set defaults
|
||||||
|
@ -232,6 +229,13 @@ sub os_setup {
|
||||||
$physical_memory = `/usr/sbin/prtconf | grep Memory | cut -f 3 -d ' '` or memerror;
|
$physical_memory = `/usr/sbin/prtconf | grep Memory | cut -f 3 -d ' '` or memerror;
|
||||||
chomp($physical_memory);
|
chomp($physical_memory);
|
||||||
$physical_memory = $physical_memory*1024*1024;
|
$physical_memory = $physical_memory*1024*1024;
|
||||||
|
} elsif ($os =~ /AIX/) {
|
||||||
|
$physical_memory = `lsattr -El sys0 | grep realmem | awk '{print \$2}'` or memerror;
|
||||||
|
chomp($physical_memory);
|
||||||
|
$physical_memory = $physical_memory*1024;
|
||||||
|
$swap_memory = `lsps -as | awk -F"(MB| +)" '/MB /{print \$2}'` or memerror;
|
||||||
|
chomp($swap_memory);
|
||||||
|
$swap_memory = $swap_memory*1024*1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chomp($physical_memory);
|
chomp($physical_memory);
|
||||||
|
@ -425,6 +429,9 @@ sub check_architecture {
|
||||||
} elsif (`uname` !~ /SunOS/ && `uname -m` =~ /64/) {
|
} elsif (`uname` !~ /SunOS/ && `uname -m` =~ /64/) {
|
||||||
$arch = 64;
|
$arch = 64;
|
||||||
goodprint "Operating on 64-bit architecture\n";
|
goodprint "Operating on 64-bit architecture\n";
|
||||||
|
} elsif (`uname` =~ /AIX/ && `bootinfo -K` =~ /64/) {
|
||||||
|
$arch = 64;
|
||||||
|
goodprint "Operating on 64-bit architecture\n";
|
||||||
} else {
|
} else {
|
||||||
$arch = 32;
|
$arch = 32;
|
||||||
if ($physical_memory > 2147483648) {
|
if ($physical_memory > 2147483648) {
|
||||||
|
|
Loading…
Reference in a new issue