Mytop is an open source and free monitoring program for MySQL databases was written by Jeremy Zawodny using Perl language. It is much similar in look and feel of the most famous Linux system monitoring tool called top.
Mytop program provides a command-line shell interface to monitor real time MySQL threads, queries per second, process list and performance of databases and gives a idea for the database administrator to better optimize the server to handle heavy load.
By default Mytop tool is included in the Fedora repositories, so you just have to issue “yum install mytop” on the command line. If you are using RHEL/CentOS distributions, then you need to enable third party repositories like RPMForge or EPEL repository to install it. For other Linux distributions you may get source package from the http://jeremy.zawodny.com/mysql/mytop/
In this MySQL monitoring tutorial, we will show you how to install Mytop program under RHEL 6.3/6.2/6.1/6/5.8/5.6, CentOS 6.3/6.2/6.1/6/5.8/5.6 and Fedora 17,16,15,14,13,12 systems. Please note you must have running MySQL Server on the system to install and use Mytop.
Install Mytop in RHEL, CentOS and Fedora
To install Mytop, run the following command. Make sure you must have RPMForge or EPEL repository under RHEL/CentOS systems. Fedora user’s don’t need to add. Simply run the below command.
# yum install mytop
Sample Output :
Loaded plugins: fastestmirror, refresh-packagekit Loading mirror speeds from cached hostfile Setting up Install Process Resolving Dependencies Dependencies Resolved ======================================================================================= Package Arch Version Repository Size ======================================================================================= Installing: mytop noarch 1.7-3.b737f60.el6 epel 32 k Transaction Summary ======================================================================================= Install 1 Package(s) Total download size: 32 k Installed size: 68 k Is this ok [y/N]: y Downloading Packages: mytop-1.7-3.b737f60.el6.noarch.rpm | 32 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : mytop-1.7-3.b737f60.el6.noarch 1/1 Verifying : mytop-1.7-3.b737f60.el6.noarch 1/1 Installed: mytop.noarch 0:1.7-3.b737f60.el6 Complete!
How to use Mytop to Monitor MySQL
Mytop needs MySQL login credentials to monitor MySQL databases, simply run the following command to start the Mytop shell. Please provide your root MySQL password when it asks for.
# mytop --prompt Password:
Once you entered the MySQL root password you will see Mytop monitoring shell, similar to below.
If you would like to monitor specific database, then use the -d option as shown below. For example the below command will monitor database gallery.
# mytop --prompt -d gallery Password:
It has a capability to show large amount of information on the screen and has many keyboard shortcut options too, check out “man mytop” for more information.
# man mytop
Read Also :
Latest posts by Ravi Saive (see all)
- How to Install GUI (Gnome 3) Using CD/DVD on RHEL/CentOS 7 - December 18, 2014
- Wine 1.7.33 (Development Version) Released – Install in RedHat and Debian Based Systems - December 13, 2014
- How to Enable RPMForge Repository in RHEL/CentOS 7.x/6.x/5.x - December 12, 2014