114

GitHub - machinezone/tcpkali: Fast multi-core TCP and WebSockets load generator.

 6 years ago
source link: https://github.com/machinezone/tcpkali
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

About

tcpkali is a high performance TCP and WebSocket load generator and sink.

tcpkali mascot

Features

  • Opens millions of connections from a single host by using available interface aliases.
  • Efficient multi-core operation (--workers); utilizes all available cores by default.
  • Allows opening massive number of connections (--connections)
  • Allows limiting an upstream and downstream of a single connection throughput (--channel-bandwidth-downstream, --channel-bandwidth-upstream or --message-rate)
  • Allows specifying the first and subsequent messages (--message, --first-message).
  • Measures response latency percentiles using HdrHistogram (--latency-marker)
  • Sends stats to StatsD/DataDog (--statsd)

Quick example: testing a web server

tcpkali -em "GET / HTTP/1.1\r\nHost: google.com\r\n\r\n" -r 10 \
        --latency-marker "HTTP/1.1" google.com:80

Install

From packages

OS Package manager Command
Mac OS X Homebrew brew install tcpkali
Mac OS X MacPorts port install tcpkali
FreeBSD pkgng pkg install tcpkali
Linux nix nix-env -i tcpkali

From sources

Install the following packages first:

  • autoconf
  • automake
  • libtool
  • bison
  • gcc-c++
  • ncurses-devel or equivalent ncurses package, optional.

Build and install:

test -f configure || autoreconf -iv
./configure
make
sudo make install

Usage (Short version)

Usage: tcpkali [OPTIONS] [-l <port>] [<host:port>...]
Where some OPTIONS are:
  -h                   Print this help screen, then exit
  --help               Print long help screen, then exit
  -d                   Dump i/o data for a single connection

  -c <N>               Connections to keep open to the destinations
  -l <port>            Listen on the specified port
  --ws, --websocket    Use RFC6455 WebSocket transport
  -T <Time=10s>        Exit after the specified amount of time

  -e                   Unescape backslash-escaping in a message string
  -1 <string>          Message to send to the remote host once
  -m <string>          Message to repeatedly send to the remote
  -r <Rate>            Messages per second to send in a connection

Variable units and recognized multipliers:
  <N>, <Rate>:  k (1000, as in "5k" is 5000), m (1000000)
  <Time>:       ms, s, m, h, d (milliseconds, seconds, minutes, hours, days)
  <Rate> and <Time> can be fractional values, such as 0.25.

You can get the full list of options using tcpkali --help, from man tcpkali, and by consulting the tcpkali man page source.

Usage Examples

A few command line examples


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK