Install Mytop on plesk

This articles discuss how to install Mytop on plesk servers using rpm.  Unlike the traditional tar installation, you can just install/setup and run Mytop in just 5 minutes using rpm.

What is mytop ?

 

Mytop is the best opensource tool developed by Jeremy Zawodny Mysql guru. 😉 this tools helps you to monitor Mysql health, current query process running, no of sleep process, mysql load etc. And this will help the administrators to find out which db is eating more cpu resources and also to optimize the mysql queries

Pre-requisites :

 

We need the following two rpm’s installed in our server to install the Mytop rpm.

  • perl-DBI
    perl-TermReadKey

The perl-DBI usually installed already by plesk so we can skip them and the perl-TermReadKey rpm is a compiled perl module dedicated to providing simple control over terminal driver modes (cbreak, raw, cooked, etc.).

Downloading perl-TermReadKey rpm

 

Surf the http://packages.sw.be/perl-TermReadKey/ and download the right rpm according to your OS version/arch.

I am using centOS 5.5 so

Download the mytop rpm from : http://packages.sw.be/mytop/ make sure you have downloaded the right rpm according to your OS version/arch.

Create a file called ~/.mytop (mytop configuration file ) and add the below entries in “~/.mytop” file (~ is nothing but the root home dir /root/ )

Find and copy your plesk admin user password using

  • cat /etc/psa/.psa.shadow

Create and add the following lines in the .mytop file

  • vi /root/.mytop
  • user=admin
    pass=<your-plesk-admin-password>
    host=localhost
    db=psa
    delay=5
    port=3306
    socket=
    batchmode=0
    header=1
    color=1
    idle=1

You are done, just run the ‘ mytop ‘ command from shell to monitor your data usages.

Some useful links :

Install MRTG on cpanel

Install MRTG on Directadmin

Mytop