added system_ memory variable
This commit is contained in:
parent
f677136ef9
commit
19469fb44f
@ -21,6 +21,12 @@ class Advisor
|
||||
PMA_DBI_fetch_result('SHOW GLOBAL STATUS', 0, 1),
|
||||
PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES', 0, 1)
|
||||
);
|
||||
// Add total memory to variables as well
|
||||
require_once('libraries/sysinfo.lib.php');
|
||||
$sysinfo = getSysInfo();
|
||||
$memory = $sysinfo->memory();
|
||||
$this->variables['system_memory'] = $memory['MemTotal'];
|
||||
|
||||
// Step 2: Read and parse the list of rules
|
||||
$this->parseResult = $this->parseRulesFile();
|
||||
// Step 3: Feed the variables to the rules and let them fire. Sets $runResult
|
||||
|
||||
@ -98,8 +98,8 @@ rule 'Minor Version' [! fired('Release Series')]
|
||||
rule 'Distribution'
|
||||
version_comment
|
||||
preg_match('/source/i',value)
|
||||
Version is compiled from source, not a MySQL official binary. If you did not compile from source, you may be using a package modified by a distribution.
|
||||
The MySQL manual only is accurate for official MySQL binaries, not any package distributions (such as RedHat, Debian/Ubuntu etc).
|
||||
Version is compiled from source, not a MySQL official binary.
|
||||
If you did not compile from source, you may be using a package modified by a distribution. The MySQL manual only is accurate for official MySQL binaries, not any package distributions (such as RedHat, Debian/Ubuntu etc).
|
||||
'source' found in version_comment
|
||||
|
||||
rule 'Distribution'
|
||||
@ -111,10 +111,10 @@ rule 'Distribution'
|
||||
|
||||
rule 'MySQL Architecture'
|
||||
system_memory
|
||||
value > 3072 && !preg_match('/64/',version_compile_machine)
|
||||
MySQL is not compiled as a 64-bit package, though your memory capacity is above 3 GiB.
|
||||
MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL.
|
||||
Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024*1024, 2, 2))
|
||||
value > 3072*1024 && !preg_match('/64/',version_compile_machine)
|
||||
MySQL is not compiled as a 64-bit package.
|
||||
Your memory capacity is above 3 GiB (assuming the Server is on localhost), so MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL.
|
||||
Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024, 2, 2))
|
||||
|
||||
#
|
||||
# Query cache
|
||||
|
||||
Loading…
Reference in New Issue
Block a user