Giter Site home page Giter Site logo

tcpkit's Introduction

tcpkit

A tool analyze tcp packets with Lua.

How to use

./tcpkit is a tool to capature the tcp packets, and analyze the packets with lua
	-s server ip
	-p port
	-i device
	-r offline file
	-w write the raw packets to file
	-S lua script path, default is ../scripts/example.lua
	-l local address
	-d interval to print stats, unit is second 
	-B operating system capture buffer size, in units of KiB (1024 bytes). 
	-f log file
	-t only tcp
	-u only udp
	-v version
	-h help

install

$ cd tcpkit/src
$ make

calculate port bandwidth

$ ./tcpkit -p 11211 -C -d 10

calculate server bandwidth every 10 seconds.

Common Error

[2016-05-13 16:15:49] [ERROR] You should use -l to assign local ip.

Just use -l option to set your local ip, for example sudo ./tcpkit -p 80 -l 192.168.4.1.

[2016-05-13 16:18:46] [ERROR] may be you should assign device use -i and swith to root.

Just use -i option to set network device, for example sudo ./tcpkit -p 80 -l 192.168.4.1 -i bond0.

See how to aquire device? use ifconfig.

how to acquire device

use ifconfig

capture packet

sudo ./tcpkit -S ../scripts/example.lua -p 5555 -s 192.168.1.2

Monitor redis or memcached latency

sudo ./tcpkit -S ../scripts/redis_mc_monitor.lua -p 6379 -s 192.168.1.2

image

monitor dns lanteny

sudo ./tcpkit -S ../scripts/dns_monitor.lua -p 53

Monitor Kafka

sudo ./tcpkit -S ../scripts/kafka_monitor.lua -p 6379 -s 192.168.1.2

tcpkit's People

Contributors

git-hulk avatar

Watchers

James Cloos 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.