Mytop

From Wiki
Jump to: navigation, search

mytop is a script that can be used to monitor the mysql process list.

http://jeremy.zawodny.com/mysql/mytop/

RPM Install

mytop is available in the EPEL repo:

yum install mytop

Manual Install

Install dependencies:

yum install perl-TermReadKey perl-DBD-MySQL

Install:

cd /usr/local/src
wget -O - http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz | tar xzvf - 
cd mytop-1.6
perl Makefile.PL
make && make install

If you see an error like below apply the following fix.

Error in option spec: "long|!"
sed -i 159d /usr/local/bin/mytop

The line number may vary, search for the "long|!" string in /usr/local/bin/mytop.

grep -n 'long|!' /usr/local/bin/mytop

Create the test database if needed.

mysqladmin create test