Package loss measuring tool
Project description
Steinloss:
This is a tool for measuring packages loss, between two endpoint, with a web visualizer.
Usage
On the server end, run:
pip install steinloss
python -m steinloss --server
On the probe end, run:
pip install steinloss
python -m steinloss --probe --ip-address $IP_OF_SERVER
The server end will host a gui on port 8050, where the stats are visible. It looks like this:
Build and release
To make a new release, go to github release, and draft a new release. A github action will take care of building, and publishing the tar and binary to pypi.
Demo with artificial packet loss
The demo is made for linux |
---|
First we install steinloss |
pip3 install steinloss
``
To run a demo of the tool, we're setting up a virtual network on your machine using ip nets.
We're making a network `n1` and `n2` by running
sudo sh demo.sh
Now we would like to run the server on `n1` and the probe on `n2`
This is done with the following commands in two different terminals:
```bash
sudo ip netns exec ns1 bash -c "sudo -u $USER python3 -m steinloss -s"
sudo ip netns exec ns2 bash -c "sudo -u $USER python3 -m steinloss -p -i 10.0.0.1"
For example:
To access the browser, we to run a browser in our virtual network like so
sudo ip netns exec ns1 bash -c "sudo -u $USER $BROWSER 127.0.0.1:8050"
Like so:
Now we can modify the packet loss by using the replace command. To set the packet loss to 20%, we run the following command, while everything is running:
sudo ip netns exec ns1 tc qdisc replace dev h1 root netem loss 20%
Cleanup
The virtual networks can be removed again with:
sudo ip netns delete ns1 && sudo ip netns delete ns2
And uninstall steinloss:
pip3 uninstall steinloss
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for steinloss-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8559a1aeb9c69fb5be145067e6785d87362c06f127cf2ddac29a53f81e497689 |
|
MD5 | 926240064225ba5e3e6ba6f642df01d9 |
|
BLAKE2b-256 | 3f17b8659d8b01823d498acd9141e5e6fda919f330c4403c2213ba8c8316bb36 |