Browse Source

Improved code

old-stable
gau1991 11 years ago
parent
commit
8f9caf5f88
  1. 4
      src/lib/ee_lib_import_slow_log.sh

4
src/lib/ee_lib_import_slow_log.sh

@ -4,6 +4,7 @@ function ee_lib_import_slow_log()
{
if [ -d /var/www/22222/htdocs/db/anemometer ]; then
if [ -f /var/log/mysql/mysql-slow.log ]; then
ee_lib_echo "Importing MySQL slow log, please wait..."
dpkg --compare-versions $(pt-query-digest --version | awk '{print $2 }') ge 2.2
if [ $? -eq 0 ]; then
@ -16,6 +17,9 @@ function ee_lib_import_slow_log()
--review D=slow_query_log,t=global_query_review \
--${ee_anemometer_history} D=slow_query_log,t=global_query_review_history \
--no-report --limit=0% --filter=" \$event->{Bytes} = length(\$event->{arg}) and \$event->{hostname}=\"$EE_MYSQL_GRANT_HOST\"" /var/log/mysql/mysql-slow.log
else
ee_lib_echo_fail "Failed to find MySQL slow log file, enable MySQL slow log"
fi
else
ee_lib_echo_fail "Anememoter is not installed"
fi

Loading…
Cancel
Save