Statistics
| Branch: | Revision:

wcn_emulator @ b1497c9f

Name Size Revision Age Author Comment
  Test 2a8b9496 over 3 years Michele Segata add test case for default routes parameter
  conf 2a8b9496 over 3 years Michele Segata add test case for default routes parameter
  data 35f26ee1 over 3 years Michele Segata add missing edge file for pingTest
  test_code 2a8b9496 over 3 years Michele Segata add test case for default routes parameter
.gitignore 20 Bytes 6839e49e almost 6 years Luca Baldesi add gitignore
.gitmodules 0 Bytes b1497c9f over 3 years Luca Baldesi remove community graph subgitmodule. Add graph_...
README.md 3.12 KB 3cfd0aca over 4 years Luca Baldesi Refactor README to use markdown
graph_utils.py 2.62 KB b1497c9f over 3 years Luca Baldesi remove community graph subgitmodule. Add graph_...
logsys.py 1.58 KB c04ea593 almost 5 years Luca Baldesi add logging function
nepa_test.py 5.06 KB b1497c9f over 3 years Luca Baldesi remove community graph subgitmodule. Add graph_...
network_builder.py 8.58 KB b1497c9f over 3 years Luca Baldesi remove community graph subgitmodule. Add graph_...
parameters_parser.py 4.4 KB f26348de almost 6 years Leonardo Maccari fixed bug in optional params
test_generic.py 2.82 KB 0aaa0183 about 4 years Luca Baldesi fix psutil interface call. "get_children()" is ...

Latest revisions

# Date Author Comment
b1497c9f 01/19/2017 03:33 PM Luca Baldesi

remove community graph subgitmodule. Add graph_utils.py in place

2a8b9496 01/19/2017 11:20 AM Michele Segata

add test case for default routes parameter

2c3a6cf7 01/19/2017 11:10 AM Michele Segata

refactor main function for nepa_test

635e9058 01/19/2017 09:55 AM Michele Segata

rename wcn_simulator.py into nepa_test.py

3ed1373a 01/19/2017 09:53 AM Michele Segata

add option to disable default routes

35f26ee1 01/18/2017 03:32 PM Michele Segata

add missing edge file for pingTest

0aaa0183 08/02/2016 04:42 PM Luca Baldesi

fix psutil interface call. "get_children()" is now "children()"

3cfd0aca 04/22/2016 10:35 PM Luca Baldesi

Refactor README to use markdown

5f579132 02/04/2016 04:34 PM Luca Baldesi

Add resource logging capability

7b55b31e 02/04/2016 04:33 PM Luca Baldesi

merge netjson support feature branch

View all revisions | View revisions

README


NePA TesT is a front-end for mininet which setups experiment on a given (networkx) network

Setup

NePA TesT requires a patched version of Mininet. Please refer to: NePA wiki for the detailed setup.

Usage

To run a test you need a configuration file (to be placed in conf/) and the test class code (to be placed in testcode/). Then run $>python wcnemulator -f -t where identifies a test case in . Each test case must specify an implementation of MininetTest through the argoment "testClass"/ Each MininetTest class has the runTest method which starts what the test needs and then waits for completion. This waiting can be implemented with self.wait() function which sleeps for the desired amount of time and optionally logs resource usage.

For example:

  • self.wait(self.duration) # will wait till the end
  • self.wait(self.duration, logresources={'cpu': 'cpuusage'}, 2) # will wait till the end of the test while sampling every 2 seconds the cpu load and saving the results in a file called 'cpu_usage'.

Other than 'cpu', also 'net' and 'mem' can be logged; 'mem' makes NePA TesT logging the amount of available RAM (free or released) and the amount of swap memory used; 'net' makes instead logging both the fraction of received packets over sent packets and the fraction of received bytes over sent bytes since the beginning of the test. It is important to always specify the destination file of the logs (even the same for all the resources).

Test

NePA TesT stores test files in the Test folder. Tests follows the pytest approach, to run them simply install the pytest module and run $>python -m pytest in the root folder

Troubleshooting

If something fails system may remain unstable. In this case try typing: $> sudo mn -c

How to

Use a custom delay distribution for the links

Through network_builder.py is possible to set some parameters of the links, e.g., loss, bandwidth, mean delay, delay jitter and delay distribution.

Available delay distributions are placed in /usr/lib/tc/ and the defaults one are normal, pareto, paretonormal and experimental.

Given sample delay values is possible to build a custom distribution and use it in mininet. The following is an extraction from this netem article.

  1. git clone git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
  2. compile these netem utilities: cd iproute2/netem gcc -o maketable maketable.c -lm gcc -o stats stats.c -lm
  3. fill data.txt with samples from the distribution (in ms), e.g., ping -c10 google.com | grep -Eo 'time=[0-9.]+'| grep -Eo '[0-9.]+' > data.txt
  4. build a netem distribution ./maketable data.txt > mydist.dist
  5. put mydist.dist in /usr/lib/tc/
  6. compute mean and standard deviation (sigma) ./stats data.txt
  7. use the following configuration parameters: linkmeandelay = ms linkdelaysd = ms linkdelaydistribution = mydist

Also available in: Atom