Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Monitor MySQL Database using Mytop Tool  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

Eby Sebastian

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
Monitor MySQL Database using Mytop Tool
« on: November 03, 2013, 07:44:04 pm »
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.4

Use yum to install mytop on your machine

Code: [Select]
yum -y install mytop

It will install mytop with all necessary pre-requisite to run Mytop.


Monitor Databases

Now run the following command to open the Mytop tool. It will ask the mysql root password to monitor the databases.

Code: [Select]
[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.


Code: [Select]
#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

Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!