Adding typo fixes
Adding check for memory with other process
This commit is contained in:
parent
e4a2534349
commit
76a28ab29a
1 changed files with 18 additions and 12 deletions
|
@ -1236,7 +1236,7 @@ sub get_kernel_info()
|
||||||
}
|
}
|
||||||
if (`sysctl -n vm.swappiness` > 10) {
|
if (`sysctl -n vm.swappiness` > 10) {
|
||||||
badprint "Swappiness is > 10, please consider having a value lower than 10";
|
badprint "Swappiness is > 10, please consider having a value lower than 10";
|
||||||
push @generalrec, "setup swappieness lower or equals to 10";
|
push @generalrec, "setup swappiness lower or equals to 10";
|
||||||
push @adjvars, 'vm.swappiness <= 10 (echo 0 > /proc/sys/vm/swappiness)';
|
push @adjvars, 'vm.swappiness <= 10 (echo 0 > /proc/sys/vm/swappiness)';
|
||||||
} else {
|
} else {
|
||||||
infoprint "Swappiness is < 10.";
|
infoprint "Swappiness is < 10.";
|
||||||
|
@ -2309,6 +2309,11 @@ sub mysql_stats {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Memory usage
|
# Memory usage
|
||||||
|
|
||||||
|
infoprint "Physical Memory : ". hr_bytes($physical_memory);
|
||||||
|
infoprint "Max MySQL memory : ". hr_bytes( $mycalc{'max_peak_memory'} );
|
||||||
|
infoprint "Other process memory: ". hr_bytes( get_other_process_memory() );
|
||||||
|
|
||||||
infoprint "Total buffers: "
|
infoprint "Total buffers: "
|
||||||
. hr_bytes( $mycalc{'server_buffers'} )
|
. hr_bytes( $mycalc{'server_buffers'} )
|
||||||
. " global + "
|
. " global + "
|
||||||
|
@ -2391,6 +2396,13 @@ sub mysql_stats {
|
||||||
. " ($mycalc{'pct_max_physical_memory'}% of installed RAM)";
|
. " ($mycalc{'pct_max_physical_memory'}% of installed RAM)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($physical_memory < ($mycalc{'max_peak_memory'}+get_other_process_memory())) {
|
||||||
|
badprint "Overall possible memory usage with other process exceeded memory";
|
||||||
|
push( @generalrec, "Dedicated this server to your database for highest performance." );
|
||||||
|
} else {
|
||||||
|
goodprint "Overall possible memory usage with other process is compatible with memory available";
|
||||||
|
}
|
||||||
|
|
||||||
# Slow queries
|
# Slow queries
|
||||||
if ( $mycalc{'pct_slow_queries'} > 5 ) {
|
if ( $mycalc{'pct_slow_queries'} > 5 ) {
|
||||||
badprint "Slow queries: $mycalc{'pct_slow_queries'}% ("
|
badprint "Slow queries: $mycalc{'pct_slow_queries'}% ("
|
||||||
|
@ -2520,9 +2532,7 @@ sub mysql_stats {
|
||||||
|
|
||||||
# Sorting
|
# Sorting
|
||||||
if ( $mycalc{'total_sorts'} == 0 ) {
|
if ( $mycalc{'total_sorts'} == 0 ) {
|
||||||
|
goodprint "No Sort requiring temporary tables";
|
||||||
# For the sake of space, we will be quiet here
|
|
||||||
# No sorts have run yet
|
|
||||||
}
|
}
|
||||||
elsif ( $mycalc{'pct_temp_sort_table'} > 10 ) {
|
elsif ( $mycalc{'pct_temp_sort_table'} > 10 ) {
|
||||||
badprint
|
badprint
|
||||||
|
@ -2561,8 +2571,7 @@ sub mysql_stats {
|
||||||
"Adjust your join queries to always utilize indexes" );
|
"Adjust your join queries to always utilize indexes" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
goodprint "No joins without indexes";
|
||||||
# For the sake of space, we will be quiet here
|
|
||||||
# No joins have run without indexes
|
# No joins have run without indexes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2617,9 +2626,7 @@ sub mysql_stats {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
goodprint "No tmp tables created on disk";
|
||||||
# For the sake of space, we will be quiet here
|
|
||||||
# No temporary tables have been created
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Thread cache
|
# Thread cache
|
||||||
|
@ -3403,7 +3410,7 @@ sub mysql_databases {
|
||||||
infoprint "There is " . scalar(@dblist) . " Database(s).";
|
infoprint "There is " . scalar(@dblist) . " Database(s).";
|
||||||
my @totaldbinfo = split /\s/,
|
my @totaldbinfo = split /\s/,
|
||||||
select_one(
|
select_one(
|
||||||
"SELECT SUM(TABLE_ROWS), SUM(DATA_LENGTH), SUM(INDEX_LENGTH) , SUM(DATA_LENGTH+INDEX_LENGTH), COUNT(TABLE_NAME),COUNT(DISTINCT(TABLE_COLLATION)),COUNT(DISTINCT(ENGINE)) FROM information_schema.TABLES;"
|
"SELECT SUM(TABLE_ROWS), SUM(DATA_LENGTH), SUM(INDEX_LENGTH) , SUM(DATA_LENGTH+INDEX_LENGTH), COUNT(TABLE_NAME),COUNT(DISTINCT(TABLE_COLLATION)),COUNT(DISTINCT(ENGINE)) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ( 'mysql' );"
|
||||||
);
|
);
|
||||||
infoprint "All Databases:";
|
infoprint "All Databases:";
|
||||||
infoprint " +-- TABLE : "
|
infoprint " +-- TABLE : "
|
||||||
|
@ -3447,8 +3454,7 @@ sub mysql_databases {
|
||||||
if (
|
if (
|
||||||
$_ eq "information_schema"
|
$_ eq "information_schema"
|
||||||
or $_ eq "performance_schema"
|
or $_ eq "performance_schema"
|
||||||
|
or $_ eq "mysql"
|
||||||
# or $_ eq "mysql"
|
|
||||||
or $_ eq ""
|
or $_ eq ""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue