In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly describes the installation of mytop, the possible errors during installation, and the use of mytop to monitor MySQL performance.
Welcome to reprint, please indicate the author and source. Author: Zhang Zheng blog: http://space.itpub.net/26355921 QQ:176036317 if you have any questions, please feel free to contact us. Mytop is a MySQL monitoring tool similar to the top command style under Linux, which can monitor the current connection users and the commands being executed.
1. Install TermReadKey
Download address: http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz
Installation:
Tar xzvf TermReadKey
Cd TermReadKey
Perl Makefile.pl
Make
Make test
Make install
two。 Install DBI
Download address: http://cpan.uwinnipeg.ca/dist/DBI
Installation:
Tar xzvf DBI-1.615.tar.gz
Cd DBI-1.615
Perl Makefile.pl
Make
Make test
Make install
Or:
[root@hd-119-186 mytop-1.6] # yum list | grep DBD
Unable to read consumer identity
Perl-DBD-MySQL.x86_64 3.0007-2.el5 installed
Perl-DBD-Pg.x86_64 1.49-2.el5_3.1 hc360
[root@hd-119-186mytop-1.6] # yum-y install perl-DBD-MySQL.x86_64
3. Install Mytop
Download address: http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
Installation:
Tar xzvf mytop-1.6.tar.gz
Cd mytop-1.6
Perl Makefile.pl
Make
Make test
Make install
4. An error may occur when executing mytop-uroot-pxxxxx:
MySQL on localhost (5.1.43-log) up 345; 20; 36 up; 31 [09:07:11]
Queries: 3. 0 qps: 0 Slow: 0. 0 Se/In/Up/De (%): 00. 00. 00. 00.
Key Efficiency: 100.0% Bps in/out: 0.0 / 0.0
Id User Host/IP DB Time Cmd Query or State
Use of uninitialized value in substitution at. / mytop line 955
Use of uninitialized value in substitution at. / mytop line 955
...
Use of uninitialized value in substitution at. / mytop line 955
Solution:
Vi mytop
Skip to line 955 and find
$host = ~ s / ^ ([^] +). * / $1 /
$thread- > {Host} = $host
Change to:
If ($host)
{
$host = ~ s / ^ ([^] +). * / $1 /
$thread- > {Host} = $host
}
III. Parameters
-u /-- user: specify username. Default is root.
-p /-- pass /-- password: specify password. Default is none.
-h /-- host: specifies the hostname of MySQL server. The default is localhost.
-P /-- port: specifies the port to connect to the MySQL server. The default is 3306.
-s /-- delay: the number of seconds to update. The default is 5 seconds.
-d /-- db /-- database: specify the database to which you are connected. Default is test.
-b /-- batch /-- batchmode: specified as batchmode. Each update will not clear the old display result, but will display the updated data at the top. The default is unset.
-S /-- socket: specifies to connect directly with MySQL socket instead of TCP/IP. The default is none (only available when mytop and MySQL are on the same console)
-- header or-noheader: whether to display the header. Default is header.
-- color or-- nocolor: whether to use color. The default is color.
-I /-idle or-whether the thread of noidle:idle will appear on the list. The default is idle.
Mytop shortcut key
S: set update time
P: pause screen update
Q: leave
U: only look at a user's thread
O: reverse the order of arrangement
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
[root@mysql-back pingtai_temp] # innobackupex-- apply-log-- parallel=4 / server/pingtai_temp/xtraba
© 2024 shulou.com SLNews company. All rights reserved.