Mytop is similar to the Linux top tool, which enables real-time monitoring of performance information for MySQL servers.
Installation method
1. Installation dependence
Copy Code code as follows:
# CPAN
# cpan > Install DBI
# cpan > Install Term::readkey
# cpan > Install Dbd::mysql
# CPAN > Exit
2. Download and install Mytop
Copy Code code as follows:
Cd/tmp
wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
Tar xzf mytop-1.6.tar.gz
CD mytop-1.6
Perl makefile.pl
Make
Make install
How to use
Grammar:
Mytop-u <REMOTE_USERNAME>-P <PASSWORD>-H <MYSQL_SERVER_IP>-D <DATABASE>
Remote_username:mysql User Name
Password:mysql Password
Mysql_server_ip:mysql Server IP
Database: Names of databases to monitor
Example:
# mytop-u root-p password-h 192.168.0.2-d CentOS
You can also write these parameters to the file ~/.mytop in the following format:
User= your MySQL Users
pass= your MySQL password.
Host=localhost
db= the name of the database you want to monitor.
Delay=5
port=3306
Socket=/var/lib/mysql/mysql.sock
Batchmode=0
Header=1
Color=1
Idle=1
Detailed instructions for use can be performed by man Mytop.
Author Zhu Maohai