In the previous tutorial we discussed about how to increase the mysql performance using mysqltuner and as a continual here I will discuss about the mysql process monitoring.
show processlist is the well known mysql process monitoring command and its shows the real time query execution process.
mysql> show processlist;
| Id | User | Host | db | Command | Time | State | Info |
| 49 | root | localhost | NULL | Query | 0 | NULL | show processlist |
1 row in set (0.00 sec)
It is a tedious method to monitor the processlist for a certain time. mytop is a console based monitoring tool for mysql to chek the overall performance of the mysql server.
How to install and use mytop ?
Update your repository if not before going to install mytop
apt-get install mytop
After the installation over start the mytop as shown below
mysql -u <username> -p<password>
It will displays the execution of query per second, slow queries, threads, id, host etc.,