Mytop is a free and open source Monitoring software for MySQL database. It is used to monitor mysql performance including queries, threads etc. This will help database administrators to monitor and optimize the database for better performance and to handle heavy load.
Install Mytop in CentOS 6.4Use yum to install mytop on your machine
yum -y install mytop
It will install mytop with all necessary pre-requisite to run Mytop.
Monitor DatabasesNow run the following command to open the Mytop tool. It will ask the mysql root password to monitor the databases.
[root@vps-XXXX-18630 ~]# mytop --prompt
Password:
MySQL on localhost (5.1.69) up 0+04:33:55 [11:53:27]
Queries: 18.0 qps: 0 Slow: 0.0 Se/In/Up/De(%): 00/00/00/00
qps now: 0 Slow qps: 0.0 Threads: 1 ( 1/ 0) 00/00/00/00
Key Efficiency: 100.0% Bps in/out: 0.0/ 3.8 Now in/out: 9.7/ 1.5k
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
4 root localhost test 0 Query show full processlist
If you want to monitor a particular database, use the parameter -d.
#mytop --prompt -d <database_name>
The major drawback mytop is that it can monitor only one database at a time. So if there are multiple databases in a server, we need to monitor them one by one.
You can refer official website for more detailed information about Mytop.
http://jeremy.zawodny.com/mysql/mytop/mytop.html