عرض مشاركة واحدة
قديم 23-04-2008, 12:02 PM   #1
Server
عضو
 
الصورة الرمزية Server
 
تاريخ التسجيل: Apr 2008
المشاركات: 2
التشكرات: 0
تم شكره 2 مرة في مشاركة واحدة
معدل تقييم المستوى: 0
Server is an unknown quantity at this point
Post Installing mytop - top clone for MySQL

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.


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/...ey-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/...BI-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 
To access mytop, use the command:



كود:
mytop 
Server غير متواجد حالياً   رد مع اقتباس
I don't speak Arabic