Coder Social home page Coder Social logo

shiviyer / myslowtrancapture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yoshinorim/myslowtrancapture

0.0 1.0 0.0 118 KB

A tool to print MySQL transactions that take more than <n> milliseconds

License: GNU General Public License v2.0

Makefile 1.51% C++ 71.09% C 27.40%

myslowtrancapture's Introduction

MySlowTransactionCapture - A tool to print MySQL transactions that take 
more than <n> milliseconds

Reasons for developing this tool was described here: http://yoshinorimatsunobu.blogspot.com/2011/04/tracking-long-running-transactions-in.html
 
How to use:
* Install libpcap, libpcap-devel, boost, and boost-devel if not installed
* make
* make install
* Run myslowtrancapture
--
[root]# myslowtrancapture -i bond0

Tips:

* Use -i "interface name" to listen to specific NIC.
--- example ---
[root]# myslowtrancapture -i eth1
Monitoring eth1 interface..
Listening port 3306..
Logging transactions that take more than 4000 milliseconds..
---------------

* Use -f "filtering rules" to listen to specific IP addresses/ports.
Filtering syntax is the same as that of tcpdump.
--- example ---
[root]# myslowtrancapture -f "tcp port 5508"
Monitoring any interface..
Filtering rule: tcp port 5508
Logging transactions that take more than 4000 milliseconds..
---------------

* Use -t milliseconds to change printing criteria.
--- example ---
[root]# myslowtrancapture -i eth0 -t 10000
Monitoring eth0 interface..
Listening port 3306..
Logging transactions that take more than 10000 milliseconds..
---------------

* Use -o when your MySQL server speaks old MySQL protocols.
--- example ---
[root]# myslowtrancapture -i eth0 -t 10000 -o
Monitoring eth0 interface..
Listening port 3306..
Logging transactions that take more than 10000 milliseconds..
Capturing MySQL old protocols..
---------------

Limitations:
* Implicit commit by DDL is not supported (not handled as transaction ends).
* MySQL Server-Side Prepared Statement protocol is not supported.

License: GNU General Public License version 2

Author: DeNA Co.,Ltd. <[email protected]>
* MySQL protocol command constants were taken from MySQL source code
* local_address.c, local_address.h were taken from tcprstat(http://github.com/Lowercases/tcprstat/) authored by Ignacio Nin under GNU General Public License version 2.
* sll.h was taken from libpcap under BSD 4.3 license.


myslowtrancapture's People

Contributors

yoshinorim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.