Did You Know?
Donate to TecMint

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

Mytop (MySQL Database Monitoring) in RHEL/CentOS 6.3/5.6 and Fedora 17/12

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

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.

Mytop MySQL Monitoring

Install Mytop MySQL Monitoring

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
 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

  mytop.noarch 0:1.7-3.b737f60.el6


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

Once you entered the MySQL root password you will see Mytop monitoring shell, similar to below.

Mytop Monitoring

Mytop Monitoring Shell

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

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 :

  1. Mtop (MySQL Database Monitoring) in RHEL/CentOS/Fedora
  2. Innotop to Monitor MySQL Performance

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.
Download Free eBooks
Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

One Response

  1. Wellington Torrejais da Silva says:


Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.