Install Mytop in Plesk servers.

Mytop is a Perl program which allows to monitor MySQL servers by viewing active threads, queries and overall server performance numbers. Before proceeding the mytop installation you need to install 2 perl modules in addition to mytop.

Install TermReadKey


$ cd /usr/local/src
$ wget http://search.cpan.org/CPAN/authors/...ey-2.30.tar.gz
$ tar -zxf TermReadKey-2.30.tar.gz
$ cd TermRead-2.30
$ perl Makefile.PL
$ make test
$ make
$ make install

Install DBI:


$ wget http://search.cpan.org/CPAN/authors/...BI-1.48.tar.gz
$ tar -zxf DBI-1.48.tar.gz
$ cd DBI-1.48
$ perl Makefile.PL
$ make test
$ make
$ make install

Moving to MyTOP installation:


$ wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.4.tar.gz
$ tar -zxf mytop-1.4.tar.gz
$ cd mytop*
$ perl Makefile.PL
$ make test
$ make
$ make install
Now installation is over. If you run mytop command, it won't work in Plesk servers. You need to make some configurations in "~/.mytop" file. Create a file called ~/.mytop and add the below entries in "~/.mytop" file.


$ touch ~/.mytop
$ vi ~/.mytop

user=admin
pass=your mysql password
host=localhost
db=psa
delay=5
port=3306
socket=
batchmode=0
header=1
color=1
idle=1
Run the mytop command


$ mytop -u admin -p(Your Mysql password)
Now you can see the overall performance of your MySQL server