GithubHelp home page GithubHelp logo

altweb100's Introduction

altweb100

altweb100 re-implements a small subset of the official Web100 user-space functionality. This code is likely to be obsolete very soon. I hope it is useful to someone else, but before using altweb100, consider:

Why?

I needed instrumentation of Linux TCP behaviour and already had lab servers with Web100-patched Linux kernels. The effort to switch to the new Web10G patch was a distraction I couldn't afford at the time (I tried, but chickened out after getting a kernel Oops).

More specifically, I wanted Web100 variables logged for new connections matching a particular src/dst port/IP tuple and this is not something the existing Web100 tools could do. I also needed the logging to start very soon after connection establishment. Unfortunately the existing Web100 userspace library did not have the functions I needed to implement a new logging tool, and I simply could not get the netlink API for web100 to work, so I wrote my own library for parsing /proc/web100/header and /proc/web100/PID/read.

Usage

Run logweb100.py as root with the following 6 parameters: source-ip, source-port, dest-ip, dest-port, output-dir and sample-period. Use - to denote a wildcard for any of the first four parameters. For example, to log all connections to destination port 5201, writing logs to /tmp with a sample period of 0.01s:

logweb100.py - - - 5201 /tmp/ 0.01

This will write a files named w100_CID.log in the standard web100 binary log format. It keeps running, starting a new logging thread for each matching connection. To convert web100 binary logs to a text format, use the logvars2 utility, which is available here:

logvars2 -p binary.log > textlog.csv

Finally, plotweb100log.py provides for rudimentary visualisation of logvars2 text log files:

plotweb100log.py textlog.csv

Here is an example of a connection in a scenario where netem was configured with insufficient buffer space, causing packets to be dropped in the sender kernel's TX path:

Example plotweb100log.py output

Copyright and license

This code is copyright 2014-2015 the CSIR, and released under the Apache 2.0 license.

altweb100's People

Contributors

simeonmiteff avatar

Watchers

 avatar  avatar  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.