MySQL Performance monitoring Tool innotop

Source: Internet
Author: User
Tags svn

MySQL Monitoring management tool--innotop

1.innotop Installation
Reference official website: http://innotop.googlecode.com/svn/html/installing.html

# wget http://innotop.googlecode.com/files/innotop-1.9.0.tar.gz
# TAR-ZXVF Innotop-1.9.0.tar.gz
# CD innotop-1.9.0

Installing the Innotop tool is very simple, it is written by Perl, and of course requires the Perl environment and the associated toolkit. Before installing, make sure that your system has the Time::hires,term::readkey,dbi,dbd::mysql four packages installed.

# Perl-mcpan-eshell
Cpan> Install Time::hires
Cpan> Install Term::readkey
Cpan> Install DBI
Cpan> Install Dbd::mysql

The following are the installation help files under the extracted source path:

# Perl makefile.pl

If there is no error, then use the
# make Install

This installs the Innotop, after the installation the system will have one more command, Innotop

Get help
# Innptop--help

Reference official website: http://innotop.googlecode.com/svn/html/manual.html

Innotop explanation--Very detailed: http://wenku.baidu.com/link?url=0cvUfYA5gwKfwvoo1gGPkr9NfK1eZ5UHa3gAhXB-pwlOLQDyH_Y_ Bn8q5kfii89rz_9egwjjlwmiqbsz4hogg0a-w1ngvnbmbrlqwmxgwz_

There is a slow parameter in the query list, which can be configured in the/ETC/MY.CNF configuration file using the

It records all SQL statements that execute more than long_query_time time, helping you to find SQL that executes slowly, so we can optimize these SQL.

-----How to turn on MySQL slow query-----

1. first, go to MySQL and enter the command show variables like '%quer% ';

You will see where the log_slow_queries status is off;long_query_time for 10;

2. Edit the/etc/my.cnf file

Add two lines below [mysqld]:

Log-slow-queries =/var/lib/mysql/mysql-slow.log
Long_query_time = 3

Log-slow-queries the directory for the log, Long_query_time is the maximum number of seconds to query (set according to your own needs).

3. Restart the service to make the configuration effective

/etc/init.d/mysqld restart

Re-enter database query log_slow_queries status is on.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.