diff --git a/index.html b/index.html
new file mode 100644
index 0000000..0bda111
--- /dev/null
+++ b/index.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+ MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
+
+
+
Contact
+
Major Hayden (major@mhtx.net)
+
+
+
+
Download
+
+ You can download this project in either
+ zip or
+ tar formats.
+
+
You can also clone the project with Git
+ by running:
+
$ git clone git://github.com/rackerhacker/MySQLTuner-perl
+
+
+
+
+
+
+
+
+
diff --git a/mysqltuner.pl b/mysqltuner.pl
index f61881c..b5fbdbe 100755
--- a/mysqltuner.pl
+++ b/mysqltuner.pl
@@ -219,14 +219,14 @@ sub os_setup {
} elsif ($os =~ /Darwin/) {
$physical_memory = `sysctl -n hw.memsize` or memerror;
$swap_memory = `sysctl -n vm.swapusage | awk '{print \$3}' | sed 's/\..*\$//'` or memerror;
- } elsif ($os =~ /NetBSD|OpenBSD/) {
+ } elsif ($os =~ /NetBSD|OpenBSD|FreeBSD/) {
$physical_memory = `sysctl -n hw.physmem` or memerror;
if ($physical_memory < 0) {
$physical_memory = `sysctl -n hw.physmem64` or memerror;
}
$swap_memory = `swapctl -l | grep '^/' | awk '{ s+= \$2 } END { print s }'` or memerror;
} elsif ($os =~ /BSD/) {
- $physical_memory = `sysctl -n hw.realmem`;
+ $physical_memory = `sysctl -n hw.realmem` or memerror;
$swap_memory = `swapinfo | grep '^/' | awk '{ s+= \$2 } END { print s }'`;
} elsif ($os =~ /SunOS/) {
$physical_memory = `/usr/sbin/prtconf | grep Memory | cut -f 3 -d ' '` or memerror;
@@ -473,6 +473,20 @@ sub check_architecture {
} elsif (`uname` =~ /AIX/ && `bootinfo -K` =~ /64/) {
$arch = 64;
goodprint "Operating on 64-bit architecture\n";
+ } elsif (`uname` =~ /NetBSD|OpenBSD/ && `sysctl -b hw.machine` =~ /64/) {
+ $arch = 64;
+ goodprint "Operating on 64-bit architecture\n";
+ } elsif (`uname` =~ /FreeBSD/ && `sysctl -b hw.machine_arch` =~ /64/) {
+ $arch = 64;
+ goodprint "Operating on 64-bit architecture\n";
+ } elsif (`uname` =~ /Darwin/ && `uname -m` =~ /Power Macintosh/) {
+ # Darwin box.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu1228.15.4~1/RELEASE_PPC Power Macintosh
+ $arch = 64;
+ goodprint "Operating on 64-bit architecture\n";
+ } elsif (`uname` =~ /Darwin/ && `uname -m` =~ /x86_64/) {
+ # Darwin gibas.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
+ $arch = 64;
+ goodprint "Operating on 64-bit architecture\n";
} else {
$arch = 32;
if ($physical_memory > 2147483648) {