Coder Social home page Coder Social logo

ipstats's Introduction

ipstats

High Performance per IP address (and protocol) bandwidth statistics supporting IPv4 & IPv6 addressing.

Example Output

#TIMESTAMP DIRECTION IP TCP UDP GRE IPIP ICMP IPSEC OTHER
1461988630 IN 192.249.60.42 0 0 5 240 0 0 0 0 0 0 0 0 0 0
1461988630 OUT 192.249.60.42 0 0 0 0 0 0 0 0 0 0 0 0 0 0

IP 1.2.3.4 has sent no traffic, however it has received 100 TCP packets, totalling 5552 bytes. Counters are implemented using a 32 bit unsigned integer for packets and bytes bytes.

Usage

ipstats [device]

ipstats listens on a given device. all can be specified to listen to all interfaces. Multiple devices can be supplied if compile with PF_RING support.

Installation

ipstats can be compiled using the included Makefile. PF_RING is required. A helper script to compile and install pf_ring has been included (see contrib)

Performance

On a reasonable Xeon the CPU usage is minimal (at 30mbit). CPU As measured on a Intel(R) Atom(TM) CPU D525 @ 1.80GHz: <0.5% CPU usage at 20mbit

CPU Usage can be decreased by increasing the sampling rate.

ipstats's People

Contributors

splitice avatar suedadam avatar

Stargazers

Rob Patershuk avatar  avatar Kevin Andrews avatar  avatar

Watchers

 avatar James Cloos avatar

ipstats's Issues

Not compiling and running

Tried compiling and running this and it just sat at 100% CPU usage and didn't output anything.

Tried it with both PF_RING and without it.

Added Latency

When running this it adds quite a bit of latency (tested with pf_ring). When using a TCPPing script on it, the first packet took 1second to complete while the others took ~100ms. It caused a lot of lag, I'm not sure where the issue could originate but I just wanted to bring it to your attention.

Monitor based on destination address

Hi,

Is it possible to make this monitor based on destination addresses as well? Doing something along the lines of adding BPF filters for the destination addresses so you can monitor traffic on the main interface to certain destinations (find bandwidth hogs)?

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.