Installing mytop

Discussion in 'Site & Server Administration' started by sendemi, Aug 18, 2010.

  1. #1
    MySQL is one of the most important programs on a server, unfortunatly it is also pretty resource intensive. One a server it is not uncommon for a single user or even a query to take up the bulk of the servers cpu cycles. Mytop is a very useful program to see what queries a server is currently processing as well as which user is executing them. Think of mytop as top for mysql. If you see a lot from a user that means they are probably the hog. Mytop can also be useful for figuring out exactly which queries are causing the problem in the case of a self-designed website. The following is how to install mytop on the server and run it. Thanks to carlos for the actual commands

    We are going to install 2 perl modules in addition to mytop to ensure that it will work.

    Install TermReadKey:

    cd /usr/local/src
    wget http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz
    tar -zxf TermReadKey-2.30.tar.gz
    cd TermRead*
    perl Makefile.PL
    make test
    make
    make install
    cd ..

    Now install DBI:

    wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.48.tar.gz
    tar -zxf DBI-1.48.tar.gz
    cd DBI*
    perl Makefile.PL
    make test
    make
    make install
    cd ..

    Finally install mytop:

    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 simply run “mytop” and your done!
     
    sendemi, Aug 18, 2010 IP
  2. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far I am aware, it is no more supported with MySql 5.
     
    mellow-h, Aug 18, 2010 IP
  3. QualityHost

    QualityHost Member

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    We use it on all our mysql 5 servers so your statement is not correct.
     
    QualityHost, Aug 19, 2010 IP
  4. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    mellow-h, Aug 19, 2010 IP
  5. QualityHost

    QualityHost Member

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #5
    We have been using mysql 5 for a number of years now and mytop still works on them.
     
    QualityHost, Aug 19, 2010 IP
  6. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    mytop wasn't developed any further after Mysql Server 4. And there are many reports saying it doesn't work with Mysql server 5 or provide inappropriate results. I could find several similar topic in mysql.com mailing list as well instead of the mytop developer's page informing the same. If it works for you, could be a co-incidence or may be your specific version has some compatibility, but happy to see it is working with you :) Good luck.
     
    mellow-h, Aug 19, 2010 IP
  7. QualityHost

    QualityHost Member

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #7
    QualityHost, Aug 20, 2010 IP
  8. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    WHMXtra is using a modified version, if I am write. And we tried this in all of our Mysql 5.1 servers, none of them worked. I am not saying, you are not telling the truth, what I am saying is based on my experience and the "DEVELOPER"s own site.
     
    mellow-h, Aug 21, 2010 IP