Home > Database > Mysql Tutorial > body text

mytop 使用介绍 mysql实时监控工具

WBOY
Release: 2016-06-07 18:06:49
Original
1246 people have browsed it

mytop 是一个类似 Linux 下的 top 命令风格的 MySQL 监控工具,可以监控当前的连接用户和正在执行的命令

mytop类似于linux top工具,可以实时监控mysql服务器的性能信息。

安装方法

1、安装依赖
代码如下:
# cpan
# cpan > install DBI
# cpan > install Term::ReadKey
# cpan > install DBD::mysql
# cpan > exit

2、下载安装mytop
代码如下:
cd /tmp
wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
tar xzf mytop-1.6.tar.gz
cd mytop-1.6
perl Makefile.PL
make
make install


使用方法
语法:

mytop -u -p -h -d
REMOTE_USERNAME:mysql用户名
PASSWORD: mysql密码
MYSQL_SERVER_IP :mysql服务器ip
DATABASE :需要监控的数据库名称
例子:

# mytop -u root -p password -h 192.168.0.2 -d centos
还可以把这些参数写入文件~/.mytop,格式如下:

user=你的mysql用户
pass=你的mysql密码
host=localhost
db=你要监控的数据库名
delay=5
port=3306
socket=/var/lib/mysql/mysql.sock
batchmode=0
header=1
color=1
idle=1
详细的使用说明可以执行man mytop获得。

作者 朱茂海
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!