<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: MySQLTuner Revision 22 is now available</title>
	<atom:link href="http://rackerhacker.com/2007/12/03/mysqltuner-revision-22-is-now-available/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com/2007/12/03/mysqltuner-revision-22-is-now-available/</link>
	<description>Words of wisdom from a server administrator</description>
	<pubDate>Wed, 20 Aug 2008 16:42:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: PCheese</title>
		<link>http://rackerhacker.com/2007/12/03/mysqltuner-revision-22-is-now-available/#comment-223</link>
		<dc:creator>PCheese</dc:creator>
		<pubDate>Fri, 28 Dec 2007 19:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://rackerhacker.com/2007/12/03/mysqltuner-revision-22-is-now-available/#comment-223</guid>
		<description>I was trying to get mysqltuner to work on OpenSolaris/SunOS (for use with a server at Joyent).  Since the current stable revision doesn't include support for Solaris-type systems, I was getting errors when trying to run the script.  

I made some quick modifications to mysqltuner to get the script to run.  Here's what I added near the end of the os_setup subroutine (around line 121):

    } elsif ($os =~ /SunOS/) {
        $physical_memory = `prtconf &#124; grep Memory &#124; cut -c 14- &#124; awk '{print \$1}'` * 1048576;
        $swap_memory = `swap -l &#124; grep '^/' &#124; awk '{print \$5}'`;
    }

I'm not very familiar with SunOS or awk so I hope someone else can write a cleaner version of this, but at least it works fairly well.  Also, the 64-bit OS detection code does not seem to detect the correct value on Solaris - you may want to look into that as well.

(I didn't figure out how to put this into a ticket on Trac.)</description>
		<content:encoded><![CDATA[<p>I was trying to get mysqltuner to work on OpenSolaris/SunOS (for use with a server at Joyent).  Since the current stable revision doesn&#8217;t include support for Solaris-type systems, I was getting errors when trying to run the script.  </p>
<p>I made some quick modifications to mysqltuner to get the script to run.  Here&#8217;s what I added near the end of the os_setup subroutine (around line 121):</p>
<p>    } elsif ($os =~ /SunOS/) {<br />
        $physical_memory = `prtconf | grep Memory | cut -c 14- | awk &#8216;{print \$1}&#8217;` * 1048576;<br />
        $swap_memory = `swap -l | grep &#8216;^/&#8217; | awk &#8216;{print \$5}&#8217;`;<br />
    }</p>
<p>I&#8217;m not very familiar with SunOS or awk so I hope someone else can write a cleaner version of this, but at least it works fairly well.  Also, the 64-bit OS detection code does not seem to detect the correct value on Solaris - you may want to look into that as well.</p>
<p>(I didn&#8217;t figure out how to put this into a ticket on Trac.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
