Introduction and configuration of Innotop mysql Performance Monitoring Tool

Source: Internet
Author: User
1. innotop Installation Reference Official Website: # cdinnotop-1.9.0 install INNOTOP tool is very simple, it is written by PERL, of course

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 installation INNOTOP tool is very simple, it is written by PERL, of course

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. Of course, the PERL environment and related toolkit are required. Before installation, make sure that your system has installed four packages: Time: HiRes, Term: ReadKey, DBI, DBD: mysql.

# perl -MCPAN -eshellCPAN> install Time::HiResCPAN> install Term::ReadKeyCPAN> install DBICPAN> install DBD::mysql

Install the Help file in the decompressed source code path as follows:

# perl Makefile.PL

If no error is reported, use

# make install

In this way, innotop is installed. After installation, the system will have an additional command, innotop

Get help

# innptop --help

Reference Official Website: http://innotop.googlecode.com/svn/html/manual.html

Innotop details-very detailed: http://wenku.baidu.com/link? Url = required _

The query list contains an SLOW parameter, which can be configured and used in the/etc/my. cnf configuration file.

It records all SQL statements that have been executed longer than long_query_time, and helps you find slow SQL statements to optimize these SQL statements.

-----How to enable mysql slow Query-----

1. First, enter mysql and enter the command show variables like '% quer % ';

The log_slow_queries status is OFF and long_query_time is 10;

2. Edit the/etc/my. cnf file.

Add two lines under [mysqld:

log-slow-queries = /var/lib/mysql/mysql-slow.loglong_query_time = 3

Log-slow-queries is the log storage directory, and long_query_time is the maximum number of query seconds (set as needed ).

3. Restart the service to make the configuration take effect.

/etc/init.d/mysqld restart

Enter the database query log_slow_queries status ON again.

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.