Friday, February 14, 2014

Mytop on Centos 6.5 Mysql Version : 5.5.34



Mytop

mytop is a console-based (non-gui) tool for monitoring the threads
and overall performance of a MySQL server.
It runs on most Unix systems which have Perl,
DBI, and Term::ReadKey installed. And with Term::ANSIColor installed
you even get color.

If you install Time::HiRes, you’ll get good real-time queries/second stats.

As of version 0.7, it even run

INSTALLATIONS

Download Package: http://jeremy.zawodny.com/mysql/mytop/
tar -zxvf mytop-.tar.gz
cd mytop-
perl Makefile.PL
make
make install


Possible Errors during installation:

Warning: prerequisite DBD::mysql 1 not found.
Warning: prerequisite DBI 1.13 not found.
Warning: prerequisite Term::ReadKey 2.1 not found.

Solution:

perl-Class-Data-Inheritable-0.08-1.el5.rf.noarch.rpm
perl-DBD-MySQL-4.014-1.el5.rfx.x86_64.rpm
perl-DBI-1.616-1.el5.rfx.x86_64.rpm
perl-DBIx-ContextualFetch-1.03-1.el5.rf.noarch.rpm
perl-Ima-DBI-0.35-1.el5.noarch.rpm
perl-Ima-DBI-0.35-1.el5.src.rpm
perl-TermReadKey-2.30-4.el5.

Error after a successful installation:

Use of uninitialized value $host in substitution (s///) at /usr/local/bin/mytop line 958.

Solution:

Remove this line

        $host =~ s/^([^.]+).*/$1/;
        $thread->{Host} = $host;

Replace with this

            if ($host)
                {
              $host =~ s/^([^.]+).*/$1/;
              $thread->{Host} = $host;
                }



Error in option spec: "long|!"

Solution:

The fix for this is to edit the mytop script and comment out the line containing long|!

vi /usr/local/bin/mytop

Run a search for long|! and comment out the following line:

"long|!" => \$config{long_nums},

Start mytop and you should be fine.



Sources: 

No comments:

The On Demand Global Workforce - oDesk
Google