mysql traffic_mysql-sniffer is a network traffic analyzer tool for mysql, it is developed by Qihoo D...

MySQL Sniffer 中文介绍

MySQL Sniffer is a network traffic analyzer tool for MySQL, it is developed by Qihoo DBA and infrastructure team. This commandline tool captures and analyzes packets destined for a MySQL

server or Client, and outputs them in a standard log format including access time, users, IP, database, query_time, rows number and query.

MySQL Sniffer also analyzer Atlas's network traffic. Atlas is a MySQL protocol-based database middleware project,github:https://github.com/Qihoo360/Atlas

System requirements:

Certified to run on CentOS v6

Commandline access to the server with root privileges

Usage

./mysql-sniffer -h

Usage mysql-sniffer [-d] -i eth0 -p 3306,3307,3308 -l /var/log/mysql-sniffer/ -e stderr

[-d] -i eth0 -r 3000-4000

-d daemon mode.

-s how often to split the log file(minute, eg. 1440). if less than 0, split log everyday

-i interface. Default to eth0

-p port, default to 3306. Multiple ports should be splited by ','. eg. 3306,3307

this option has no effect when -f is set.

-r port range, Don't use -r and -p at the same time

-l query log DIRECTORY. Make sure that the directory is accessible. Default to stdout.

-e error log FILENAME or 'stderr'. if set to /dev/null, runtime error will not be recorded

-f filename. use pcap file instead capturing the network interface

-w white list. dont capture the port. Multiple ports should be splited by ','.

-t truncation length. truncate long query if it's longer than specified length. Less than 0 means no truncation

-n keeping tcp stream count, if not set, default is 65536. if active tcp count is larger than the specified count, mysql-sniffer will remove the oldest one

Install

git clone https://github.com/Qihoo360/mysql-sniffer

cd mysql-sniffer

mkdir proj

cd proj

cmake ../

make

cd bin/

Dependence

glib2-devel(2.28.8)、libpcap-devel(1.4.0)、libnet-devel(1.1.6)

Install

git clone [email protected]:Qihoo360/mysql-sniffer.git

cd mysql-sniffer

mkdir proj

cd proj

cmake ../

make

cd bin/

More

More MySQL Sniffer information, Atlas and some other technology please pay attention to our Hulk platform official account or QQ:104180820

Thanks

Thanks for the contributions yihaoDeng and winkyao have made for MySQL Sniffer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值