Mtop (MySQL Monitoring Tool) on RHEL
Mtop is a little perl utility that shows in real time statistics of your MySQL server. It allows you to quickly identify problems related to mysql poor performance, using an interface similar to the normal ‘top’ command.
If you are using Debian then the installation is trivial as mtop is in the debian packages and the installation is as simple as:
aptitude install mtop
This will install all the required dependencies and once it completes you are ready to go. Just type mtop on the command prompt.
To install mtop on RHEL I needed to first satisfy a dependency (perl-Curses) that is not available in the regular RHEL packages. The quickest way to install perl-Curses is to use a build rpm that can be found for example:
http://dag.wieers.com/packages/perl-Curses/
Depending from your RHEL version download the respective package, perl-Curses-1.13-1.1.el3.rf.i386.rpm for RHEL3 i386, or perl-Curses-1.13-1.2.el4.rf.x86_64.rpm for RHEL4 on x86_64.
Once you have the required package install it. For example:
rpm -Uvh perl-Curses-1.13-1.1.el3.rf.i386.rpm
Alternate if you have DAG in your up2date sources you can install perl-Curses simply by:
up2date perl-Curses
Optional in case you don’t have already perl-DBI and perl-DBD, then install them using up2date:
up2date perl-DBD-MySQL perl-DBI
The other requirements (Getopt::Long, Net::Domain) are normally part of the base install and are already available.
Now that you have all the required dependencies installed all you need is the mtop sources. Uncompress them and use the readme instructions for installation:
perl Makefile.PL
make
make install
Alternate you can use the rpm available on DAG (I have not tested those rpm packages):
http://dag.wieers.com/packages/mtop/
As Robeto, has suggested, in case you already have DAG in your sources for up2date or yum, you can install it with all the required dependencies very easy using:
yum install mtop
or
up2date mtop
based on what is the tool you are using (yum or up2date).
Share This









11th May 2006, 14:32
Or you can just add DAG to your yum.conf and do a yum install mtop
11th May 2006, 14:46
Robeto, you are correct. Since I have not tested those rpms I have used the source solution for mtop itself. I will add your comment as in the meantime I have also tested the rpms from DAG and they work just fine. Thanks.
3rd June 2006, 11:02
Is this the same as Jeremy’s “mytop” ???
also see http://weblog.cemper.com/a/200507/13-mytop-mysql-top-processes-viewer.php
3rd June 2006, 11:46
Christoph,
mytop is a different tool… You might want to check out mtop also and you will end up probably with the one you like most as they are very similar.
1st December 2006, 07:02
[...] Mirant un xic l’historial del mateix blog topo amb una eina d’administració de MySQL que també promet: MTop. [...]