MySQL top commands "mytop" and "innotop" for real-time status of MySQL
A database system is quite troublesome for tuning the server. Especially when the amount of log files becomes enormous, it is hard to analyze the problem by looking at contents later. In such a case, using the top command "mytop" for MySQL makes it easy to grasp the problem as it is possible to know immediately what is going on.When used in conjunction with benchmarking, efficiency is improved considerablyI guess it is.
Installation and usage are as follows.
First of all, from "mytop". The following is the official website.
Mytop - a top clone for MySQL
http://jeremy.zawodny.com/mysql/mytop/
The manual is below.
Mytop - display MySQL server performance info like `top '
To install it, log in as root using SSH etc and download the file with wget.
wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
Next, decompress it with the tar command
Tar -zxvf mytop-1.6.tar.gz
After decompressing, move to the directory extracted with the cd command.
Cd mytop - 1.6
Then enter the following command.
Perl Makefile.PL
Then "Warning: prerequisite Term :: ReadKey 2.1 not found.Since an error appears, such as "Please enter the following command to retrieve missing items from CPAN.
Perl - MCPAN - e shell
CPAN is a command that can be used in the programming language "Perl", a command that can automatically download modules developed for Perl and install it on the server. When using the CPAN command for the first time, it is necessary to set up usage setting of CPAN. Therefore, display the following line and temporarily stop.
Are you ready for manual configuration? [Yes]
Here, "No"And you can skip all the detailed settings by pressing the Enter key, but since there are many cases where errors that can not be connected appearThe page around hereWith reference to "CPAN mirror" by selecting "AsiaAfter selecting "JapanChoose the mirror server closest to your server. If you have mistakenly choosing a nearby mirror when installing CPAN in the past,Cpan> o conf initPlease enter and reset again.
After completing the setting, display the following line and stop.
Cpan>
So, enter the following command and say "missing"Term :: ReadKey"Is installed.
Install Term :: ReadKey
After a while the installation is completed, "Exit", Enter the following commands in order to install mytop.
Make
Make test
Make install
After the installation is successful, to actually execute the command, enter it as follows.
Mytop - u user name - p password - d database name - s display update seconds
For example, if you want to update every second with user name "user", password "123456", database name "db", it will be as follows.
Mytop - uuser - p 123456 - ddb - s 1
In addition, the following page is very easy to see how to view mytop.
How to use mytop | Web system development · construction Co., Ltd. Construction of Flatz web service · Installation / customization of ZenCart · Server construction PHP / Ruby on Rails / Flash / Flex Kichijoji, Musashino-shi, Tokyo
In MySQL 5, mytop itself is rewritten to "SHOW STATUS"To"SHOW GLOBAL STATUSIf you do not do it, values that can not be acquired accurately will come out. Or use the same tool "InnotopThere are also hands to use. The circumstances around that are detailed below.
(Hi) Memo - In MySQL 5, innotop may be better than mytop
Innotop is able to monitor transactions and status of MySQL and InnoDB, the authors stated that they made inspiration for "mytop", and as expected it is much more functional. Instead, handling is somewhat difficult.
It will be like this
The official website is below.
Front Page at innotop
http://innotop.sourceforge.net/
The document is below.
http://innotop.sourceforge.net/documentation/
Download from below.
http://sourceforge.net/projects/innotop/
The installation can be done as follows, easy.
wget http://jaist.dl.sourceforge.net/sourceforge/innotop/innotop-1.4.3.tar.gz
Tar zxvf innotop-1.4.3.tar.gz
Cd innotop - 1.4.3
Perl Makefile.PL
Make install
To start it, enter as follows.
Innotop
After that, if you make various settings interactively with reference to the document "$ HOMEDIR / .innotopThis file is created. Is it possible to create a file called ".innotop" in the home directory? If setting fails, you can reset it if you delete this file.
So it is better to use "mytop" or "innotop" differently depending on the purpose.
Related Posts:
in Software, Web Service, Posted by darkhorse