Augmented Traffic Control: A tool to simulate network conditions

Overview

Augmented Traffic Control

build-status-image pypi-version

Full documentation for the project is available at http://facebook.github.io/augmented-traffic-control/.

Overview

Augmented Traffic Control (ATC) is a tool to simulate network conditions. It allows controlling the connection that a device has to the internet. Developers can use ATC to test their application across varying network conditions, easily emulating high speed, mobile, and even severely impaired networks. Aspects of the connection that can be controlled include:

  • bandwidth
  • latency
  • packet loss
  • corrupted packets
  • packets ordering

In order to be able to shape the network traffic, ATC must be running on a device that routes the traffic and sees the real IP address of the device, like your network gateway for instance. This also allows any devices that route through ATC to be able to shape their traffic. Traffic can be shaped/unshaped using a web interface allowing any devices with a web browser to use ATC without the need for a client application.

ATC is made of multiple components that interact together:

  • atcd: The ATC daemon which is responsible for setting/unsetting traffic shaping. atcd exposes a Thrift interface to interact with it.
  • django-atc-api: A Django app based on Django Rest Framework that provides a RESTful interface to atcd.
  • django-atc-demo-ui: A Django app that provides a simple Web UI to use atc from a mobile phone.
  • django-atc-profile-storage: A Django app that can be used to save shaping profiles, making it easier to re-use them later without manually re-entering those settings.

By splitting ATC in sub-components, it make it easier to hack on it or build on top of it. While django-atc-demo-ui is shipped as part of ATC's main repository to allow people to be able to use ATC out of the box, by providing a REST API to atcd, it makes it relatively easy to interact with atcd via the command line and opens the path for the community to be able to build creative command line tools, web UI or mobile apps that interact with ATC.

ATC architecture

Requirements

Most requirements are handled automatically by pip, the packaging system used by ATC, and each ATC package may have different requirements and the README.md files of the respective packages should be checked for more details. Anyhow, some requirements apply to the overall codebase:

  • Python 2.7: Currently, ATC is only supported on python version 2.7.
  • Django 1.10: Currently, ATC is only supported using django version 1.10.

Installing ATC

The fact that ATC is splitted in multiple packages allows for multiple deployment scenarii. However, deploying all the packages on the same host is the simplest and most likely fitting most use cases.

To get more details on how to install/configure each packages, please refer to the packages' respective READMEs.

Packages

The easiest way to install ATC is by using pip.

pip install atc_thrift atcd django-atc-api django-atc-demo-ui django-atc-profile-storage

Django

Now that we have all the packages installed, we need to create a new Django project in which we will use our Django app.

django-admin startproject atcui
cd atcui

Now that we have our django project, we need to configure it to use our apps and we need to tell it how to route to our apps.

Open atcui/settings.py and enable the ATC apps by adding to INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    # Django ATC API
    'rest_framework',
    'atc_api',
    # Django ATC Demo UI
    'bootstrap_themes',
    'django_static_jquery',
    'atc_demo_ui',
    # Django ATC Profile Storage
    'atc_profile_storage',
)

Now, open atcui/urls.py and enable routing to the ATC apps by adding the routes to urlpatterns:

...
...
from django.views.generic.base import RedirectView
from django.conf.urls import include

urlpatterns = [
    ...
    # Django ATC API
    url(r'^api/v1/', include('atc_api.urls')),
    # Django ATC Demo UI
    url(r'^atc_demo_ui/', include('atc_demo_ui.urls')),
    # Django ATC profile storage
    url(r'^api/v1/profiles/', include('atc_profile_storage.urls')),
    url(r'^$', RedirectView.as_view(url='/atc_demo_ui/', permanent=False)),
]

Finally, let's update the Django DB:

python manage.py migrate

Running ATC

All require packages should now be installed and configured. We now need to run the daemon and the UI interface. While we will run ATC straight from the command line in this example, you can refer to example sysvinit and upstart scripts.

atcd

atcd modifies network related settings and as such needs to run in privileged mode:

sudo atcd

Supposing eth0 is your interface to connect to the internet and eth1, your interface to connect to your lan, this should just work. If your setting is slightly different, use the command line arguments --atcd-wan and --atcd-lan to adapt to your configuration.

ATC UI

The UI on the other hand is a standard Django Web app and can be run as a normal user. Make sure you are in the directory that was created when you ran django-admin startproject atcui and run:

python manage.py runserver 0.0.0.0:8000

You should now be able to access the web UI at http://localhost:8000

ATC Code Structure

ATC source code is available under the atc directory, it is currently composed of:

  • atc_thrift the thrift interface's library
  • atcd the ATC daemon that runs on the router doing the traffic shaping
  • django-atc-api A django app that provides a RESTful interface to atcd
  • django-atc-demo-ui A django app that provides a simple demo UI leveraging the RESTful API
  • django-atc-profile-storage A django app that allows saving shaping profiles to DB allowing users to select their favorite profile from a list instead of re-entering all the profile details every time.

The chef directory contains 2 chef cookbooks:

  • atc A cookbook to deploy ATC. It also allows to deploy ATC in a Virtual Box VM in order to develop on ATC.
  • atclient Set up a Linux Desktop VM that can be used to test shaping end to end.

atcd

atcd is the daemon that runs on the router that does the shaping. Interaction with the daemon is done using thrift. The interface definition can be found in atc_thrift.thrift.

atc_thrift

atc_thrift defines the thrift interface to communicate with the atcd daemon.

django-atc-api

django-atc-api is a django app that provide a REST API to the atcd daemon. Web applications, command line tools can use the API in order to shape/unshape traffic.

django-atc-demo-ui

django-atc-demo-ui is a simple Web UI to enable/disable traffic shaping. The UI is mostly written in React

django-atc-profile-storage

django-atc-profile-storage allows saving profiles to DB. A typical use case will be to save a list of predefined/often used shaping settings that you want to be able to accessing in just a few clicks/taps.

Developing on ATC

To make ATC development easier, we use Virtual Box and Vagrant to provision and run a VM that will run the ATC daemon and the ATC UI from your git checkout.

Interacting with ATC will only shape the traffic within the VM and not on the host.

Setting up the environment

Note: vagrant is an easy way to set up a test environment, but virtualization will produce different results than a setup on bare-metal. We recommend using vagrant only for testing/development and using bare-metal for setups which require realistic shaping settings.

You will need to install VirtualBox, Vagrant and a couple of plugins:

  • VirtualBox
  • Vagrant
  • Chef DK
  • Install some vagrant plugins:
  • vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
  • vagrant plugin install vagrant-omnibus
  • Clone this repo: git clone [email protected]:facebook/augmented-traffic-control.git atc

Running ATC

Once in the repo, go to the chef/atc directory and run:

vagrant up trusty

This will take some time before it completes, once the VM is provision, SSH into it:

vagrant ssh trusty

You should now be able to access ATC at: http://localhost:8080/

Using the Sample Profiles

Once you've got ATC up and running, you can run the script utils/restore-profiles.sh to setup the set of default profiles.

The script needs to be passed a hostname:port with the location of your ATC instance:

utils/restore-profiles.sh localhost:8080

After doing this, you should see the 10 sample profiles listed below in your ATC instance:

  • 2G - Developing Rural
  • 2G - Developing Urban
  • 3G - Average
  • 3G - Good
  • Cable
  • DSL
  • Edge - Average
  • Edge - Good
  • Edge - Lossy
  • No Connectivity

Naturally, you cannot improve your natural network speed by selecting a faster profile than your service. For example, selecting the Cable profile will not make your network faster if your natural connection speed resembles DSL more closely.

Hacking on the code

Hacking on ATC is done from the host and tested in the VM. In order to reflect the changes, you will need to start the services manually.

Both atcd and atcui have their python libraries installed in a python virtualenv so you will need to activate the environment in order to be able to run the services.

The virtualenv is installed in /usr/local/atc/venv/bin/activate .

source /usr/local/atc/venv/bin/activate

Running the daemon

The atcd daemon is running under the root user privileges, all operations below needs to be done as root.

To run the daemon manually, first make sure it is not running in the background:

service atcd stop

And run the daemon:

atcd

Once you are happy with your changes and you want to test them, you will need to kill the daemon and restart it in order to apply the changes.

Running the API/UI

This is a django project and, when running the django built-in HTTP server, will detect code changes and reload automatically.

To run the HTTP REST API and UI:

cd /var/django && python manage.py runserver 0.0.0.0:8000
Comments
  • issue with speed limitation

    issue with speed limitation

    Hi, I have succesfully installed ATC on Debian and it partially works. When I try to configure traffic loss, corruption, delay etc. All works well and I can see it thought cli command:

    tc qdisc show

    qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 282697 qdisc netem 8019: dev eth0 parent 1:2 limit 1000 qdisc netem 801f: dev eth0 parent 1:3 limit 1000 delay 100.0ms loss 1% reorder 1% corrupt 1% gap 1 qdisc htb 1: dev eth1 root refcnt 2 r2q 10 default 0 direct_packets_stat 181 qdisc netem 801a: dev eth1 parent 1:2 limit 1000 qdisc netem 8020: dev eth1 parent 1:3 limit 1000 delay 100.0ms loss 1% reorder 1% corrupt 1% gap 1

    You can see limit 1000 Limit always is 1000, no matter what I choose like uplink or downlink.

    Can somebody help me with this problem?

    opened by ohorodnichuk 38
  • Always told me the interfaces does not exist

    Always told me the interfaces does not exist

    Hello, chantra. I'm a tester from China. Last week I have been learning how to build ATC platform, but I had some problems, I hope to get your help.

    I have created the wifi AP within virtual machine(Ubuntu 15.10), but when I excuted the command below, the system always told me that one of the following interfaces does not exist.

    command: sudo atcd --atcd-lan wlxe84e06333994 (the interfaces name is my USB WiFi AP name)

    I don't know where is mistake, if you can help me?

    opened by ctriptest 32
  • Requesting help to setup facebook ATC

    Requesting help to setup facebook ATC

    Hi ,

    i am trying to configure ATC in my ubuntu desktop machine following the github doc. Can anyone please help to me set it up. I keep facing one or the other issue

    --Vedesh

    opened by vedeshkumar 20
  • Requesting help to understand how to use facebook ATC

    Requesting help to understand how to use facebook ATC

    Hi Everyone,

    I have successfully installed ATC in my ubuntu desktop. i want to know how to use it and how to test the network

    My Ubuntu desktop is connected with wifi and also with lan

    Please help me in understanding how to use ATC

    opened by mahadevprasad 18
  • On visiting IP of ATC only get heading text

    On visiting IP of ATC only get heading text

    When I visit http://ip_of_atc:8080/atc_demo_ui/ I only get "Augmented Traffic Control Demo UI"

    Centos 6.5 (64bit) Python 2.7.9 iproute 2.6.32

    Installed via pip

    atc_demo_ui 
    opened by biosed 18
  • Enabling ATC shaping breaks TCP flows when using ATC and ATC client Vagrant setup

    Enabling ATC shaping breaks TCP flows when using ATC and ATC client Vagrant setup

    Setup:

    On Macbook Pro running OSX 10.10.3

    ATC using following commit

    commit 3fc5cd95e8370b680d18b8a0618463003c591792
    Author: Zeal Jagannatha <[email protected]>
    Date:   Tue May 26 11:25:24 2015 -0700
    
        Error handling in restore-profiles.sh
    

    Runing ATC using Vagrant:

    jrabek:~/projects/atc/chef/atc: (master) $ vagrant up trusty
    

    Running ATC client using Vagrant

    jrabek:~/projects/atc/chef/atcclient: (master) $ vagrant up atcclient01
    # Setup output not shown
    jrabek:~/projects/atc/chef/atcclient: (master) $ cd ../..
    jrabek:~/projects/atc: (master) $ ./utils/restore-profiles.sh 127.0.0.1:8080
    # restore-profiles.sh ran successfully
    

    Run wget as a sanity check to check connectivity and unshaped network speed:

    vagrant@atcclient01:~$ wget -O - www.cnn.com > /dev/null
    --2015-05-27 17:53:51--  http://www.cnn.com/
    Resolving www.cnn.com (www.cnn.com)... 199.27.79.73
    Connecting to www.cnn.com (www.cnn.com)|199.27.79.73|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 86146 (84K) [text/html]
    Saving to: `STDOUT'
    
    100%[=========================================================>] 86,146      --.-K/s   in 0.04s
    
    2015-05-27 17:53:51 (2.06 MB/s) - written to stdout [86146/86146]
    

    In the ATC webui on 100.64.33.3:8000/atc_demo_ui/ on the atcclient01 instance, set the profile to anything including DSL or Cable and then repeat the same transfer:

    vagrant@atcclient01:~$ wget -O - www.cnn.com > /dev/null
    --2015-05-27 18:46:55--  http://www.cnn.com/
    Resolving www.cnn.com (www.cnn.com)... 199.27.79.73
    Connecting to www.cnn.com (www.cnn.com)|199.27.79.73|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 83913 (82K) [text/html]
    Saving to: `STDOUT'
    
    22% [===================================>                     ] 19,079       368B/s  eta 5m 33s
    

    No matter what the profile, the transfer rate is slowed to a crawl.

    I did a quick sanity check on the ATC vagrant instance to make sure the wget network traffic is going through the ATC instance and it is.

    vagrant@trusty:~$ sudo tcpdump -i eth1
    
    opened by jrabek 17
  • Help needed setup ATC

    Help needed setup ATC

    I have done the following:

    1. started atcd , using following command: sudo atcd --atcd-lan eth0 --atcd-wan wlan0, get the following output:

      it wont work without parameters output

    2. after i start atcd successfully i run atc UI

    3. start a wifi access point and connect a device and do speed test after shaping network on UI.

    now i am able to shape it has no difference over network still get full speed.

    Do let me know if you need any other output.

    opened by Ashishjshetty 15
  • I set up an enterprise's weak network simulation base ATC,but it not work。

    I set up an enterprise's weak network simulation base ATC,but it not work。

    I set up an enterprise's weak network simulation base ATC,but it not work。

    Network topology:

    4

    alpha is my enterprise Network environment。

    I should how to troubleshoot the problem?

    Log:

    INFO:AtcdVService.AtcdLinuxShaper:Request startShaping TrafficControl(device=TrafficControlledDevice(controllingIP='10.54.4.155', controlledIP='10.54.4.155'), timeout=86400, settings=TrafficControlSetting(down=Shaping(loss=Loss(percentage=2.0, correlation=0.0), delay=Delay(delay=650, jitter=0, correlation=0.0), rate=18, iptables_options=[], corruption=Corruption(percentage=0.0, correlation=0.0), reorder=Reorder(percentage=0.0, correlation=0.0, gap=0)), up=Shaping(loss=Loss(percentage=2.0, correlation=0.0), delay=Delay(delay=650, jitter=0, correlation=0.0), rate=18, iptables_options=[], corruption=Corruption(percentage=0.0, correlation=0.0), reorder=Reorder(percentage=0.0, correlation=0.0, gap=0)))) INFO:AtcdVService.AtcdLinuxShaper:Shaping ip 10.54.4.155 on interface eth0 INFO:AtcdVService.AtcdLinuxShaper:create new HTB class on IFID eth0, classid 1:2,parent 1:0, rate 18kbits INFO:AtcdVService.AtcdLinuxShaper:create new Netem qdisc on IFID eth0, parent 1:2, loss 2.0%, delay 650000 INFO:AtcdVService.AtcdLinuxShaper:create new FW filter on IFID eth0, classid 1:2, handle 2, rate: 18kbits INFO:AtcdVService.AtcdLinuxShaper:Running /sbin/iptables -t mangle -A FORWARD -d 10.54.4.155 -i eth0 -j MARK --set-mark 2 INFO:AtcdVService.AtcdLinuxShaper:Shaping ip 10.54.4.155 on interface eth1 INFO:AtcdVService.AtcdLinuxShaper:create new HTB class on IFID eth1, classid 1:2,parent 1:0, rate 18kbits INFO:AtcdVService.AtcdLinuxShaper:create new Netem qdisc on IFID eth1, parent 1:2, loss 2.0%, delay 650000 INFO:AtcdVService.AtcdLinuxShaper:create new FW filter on IFID eth1, classid 1:2, handle 2, rate: 18kbits INFO:AtcdVService.AtcdLinuxShaper:Running /sbin/iptables -t mangle -A FORWARD -s 10.54.4.155 -i eth1 -j MARK --set-mark 2 INFO:AtcdVService.AtcdLinuxShaper:Request stopShaping for ip 10.54.4.155 INFO:AtcdVService.AtcdLinuxShaper:Unshaping ip 10.54.4.155 on interface eth0 INFO:AtcdVService.AtcdLinuxShaper:Running /sbin/iptables -t mangle -D FORWARD -d 10.54.4.155 -i eth0 -j MARK --set-mark 2 INFO:AtcdVService.AtcdLinuxShaper:deleting filter on IFID eth0, handle 2 INFO:AtcdVService.AtcdLinuxShaper:deleting class on IFID eth0, classid 1:2 INFO:AtcdVService.AtcdLinuxShaper:Unshaping ip 10.54.4.155 on interface eth1 INFO:AtcdVService.AtcdLinuxShaper:Running /sbin/iptables -t mangle -D FORWARD -s 10.54.4.155 -i eth1 -j MARK --set-mark 2 INFO:AtcdVService.AtcdLinuxShaper:deleting filter on IFID eth1, handle 2 INFO:AtcdVService.AtcdLinuxShaper:deleting class on IFID eth1, classid 1:2

    requirements not met 
    opened by HarrisonLin 14
  • Click on the button

    Click on the button "turn on" django Get 404

    When I click on the button 'turn on' on the web, django return 404 like api/v1/shape/ 404 This is my url.py

    from django.conf.urls import include, url from django.views.generic.base import RedirectView from django.conf.urls import patterns urlpatterns = patterns( url(r'^api/v1/', include('atc_api.urls')), url(r'^atc_demo_ui/', include('atc_demo_ui.urls')), url(r'^api/v1/profiles/', include('atc_profile_storage.urls')), url(r'^$', RedirectView.as_view(url='/atc_demo_ui/', permanent=False)), ) who can help me?thx lol

    opened by JasonLZJ 14
  • the VM appears to ignore the ATC and tc settings

    the VM appears to ignore the ATC and tc settings

    Hello all,

    I have ATC set up on a VM under VirtualHost. It serves as a gateway for other VM's hooked up to it via an internal network. It is running CentOS 6.

    It's WAN (uplink) NIC is eth0, LAN (downlink) is eth1. I have deliberately tried to significantly slow down the client (internal, NAT'ed) VM's that can communicate to the internal only through the ATCD server/gateway. The settings are seemingly in accordance to what I set them in ATCD. Here is the tc output:

    [root@atc-gw ~]# tc qdisc ls dev eth0 qdisc htb 1: root refcnt 2 r2q 10 default 0 direct_packets_stat 361306 qdisc netem 8019: parent 1:2 limit 1000 delay 20.0s loss 50% reorder 20% corrupt 90% gap 1 [root@atc-gw ~]# tc qdisc ls dev eth1 qdisc htb 1: root refcnt 2 r2q 10 default 0 direct_packets_stat 152995 qdisc netem 801a: parent 1:2 limit 1000 delay 10.0s loss 80% reorder 30% corrupt 90% gap 1 [root@atc-gw ~]# [root@atc-gw ~]# tc filter show dev eth0 filter parent 1: protocol ip pref 1 fw filter parent 1: protocol ip pref 1 fw handle 0x2 classid 1:2 police 0x19 rate 1000bit burst 12000b mtu 2Kb action drop overhead 0b ref 1 bind 1

    [root@atc-gw ~]# tc filter show dev eth1 filter parent 1: protocol ip pref 1 fw filter parent 1: protocol ip pref 1 fw handle 0x2 classid 1:2 police 0x1a rate 2000bit burst 12000b mtu 2Kb action drop overhead 0b ref 1 bind 1

    [root@atc-gw ~]#

    Note that the rates are set up at 1 and 2 kbit/s for the interfaces.

    While they are setup this way the client (another VirtualBox VM) is still able to download files off the internet at the speeds up to 8 MB/s = 64 Mbit/s!

    Yes, I have tested to make sure the traffic does indeed go through the GW - when I shut it down or take down NIC's on it it stops!

    The setup on it is quite simple in terms of networking - it is a NAT firewall/gw. Here is the iptables config file on it:

    Firewall configuration written by system-config-firewall

    Manual customization of this file is not recommended.

    *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

    ATCUI

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT

    -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -i eth1 -o eth0 -j ACCEPT -A FORWARD -i eth0 -o eth1 -j ACCEPT -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT

    *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] -A POSTROUTING -o eth0 -j MASQUERADE COMMIT

    I am truly mystified.

    Any help dealing with this will be greatly appreciated.

    Cheers,

    Boris.

    opened by borepstein 12
  • ATC is not running

    ATC is not running

    HI all,

    installed ATC as described in documentation but when I visit http://localhost:8000/atc_demo_ui/ it tells me that "ATC is not running"

    I've started the daemon sudo ./dev/atc/venv/bin/atcd

    I can see an open ports for 8000 (the gui which obviously works) and can see an open port on 9090.

    I can also telnet to both ports from the same machine.

    Its running ubuntu 14 running in virtualbox.

    Any idea what I'm missing here?

    opened by bobruub 11
  • installation issue

    installation issue

    I'm not an expert on Python, during the installation process I run the command: "pip install atc_thrift atcd django-atc-api django-atc-demo-ui django-atc-profile-storage"

    but the following error occur

    Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/six.pyc' Consider using the --user option or check the permissions.

    can some one help me?

    BR Gian Michele

    opened by Gian-Michele 1
  • sudo: atcd: command not found

    sudo: atcd: command not found

    Hi everyone!

    I'm trying to run command $sudo atcd in order to start the atcd service. When i run this command i get this error: sudo: atcd: command not found. Then, I try just run $atcd and it's run but with a lot of errors:

    INFO:AtcdVService.AtcdNBServerTask:AtcdNBServerTask Server Started on 127.0.0.1:9090 ERROR:AtcdVService.AtcdDBQueueTask:Unable to access db file: /var/lib/atcd.db ERROR:AtcdVService.AtcdDBQueueTask:Unable to initialize DB from file "/var/lib/atcd.db" Traceback (most recent call last): File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/AtcdDBQueueTask.py", line 32, in initTask self.sqlite_manager = SQLiteManager(self.sqlite_file, self.logger) File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/db_manager.py", line 31, in init with self._get_conn() as conn: File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/db_manager.py", line 71, in _get_conn conn = sqlite3.connect(self.file_name) OperationalError: unable to open database file ERROR:sparts.tasks:Error creating task, AtcdDBQueueTask Traceback (most recent call last): File "/home/user/dev/atc/venv/lib/python2.7/site-packages/sparts/vtask.py", line 313, in init t.initTask() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/AtcdDBQueueTask.py", line 32, in initTask self.sqlite_manager = SQLiteManager(self.sqlite_file, self.logger) File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/db_manager.py", line 31, in init with self._get_conn() as conn: File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/db_manager.py", line 71, in _get_conn conn = sqlite3.connect(self.file_name) OperationalError: unable to open database file CRITICAL:AtcdVService.AtcdLinuxShaper:One of the following interfaces does not exist: eth1, eth0 ERROR:sparts.tasks:Error creating task, AtcdLinuxShaper Traceback (most recent call last): File "/home/user/dev/atc/venv/lib/python2.7/site-packages/sparts/vtask.py", line 313, in init t.initTask() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/backends/linux.py", line 48, in initTask super(AtcdLinuxShaper, self).initTask() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/AtcdThriftHandlerTask.py", line 227, in initTask self._links_lookup() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/atcd/backends/linux.py", line 65, in _links_lookup raise Exception(msg) Exception: One of the following interfaces does not exist: eth1, eth0 ERROR:AtcdVService:Unexpected Exception during init Traceback (most recent call last): File "/home/user/dev/atc/venv/lib/python2.7/site-packages/sparts/vservice.py", line 268, in _runloop instance._createTasks() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/sparts/vservice.py", line 167, in _createTasks self.tasks.init() File "/home/user/dev/atc/venv/lib/python2.7/site-packages/sparts/vtask.py", line 332, in init len(exceptions)) Exception: Unable to start service (2 task start errors) INFO:AtcdVService:Received graceful shutdown request DEBUG:AtcdVService:VService Active. Awaiting graceful shutdown. INFO:AtcdVService:Waiting for tasks to shutdown gracefully... DEBUG:AtcdVService:Waiting for <atcd.AtcdDeviceTimeoutTask.AtcdDeviceTimeoutTask object at 0x20ce310> to stop... DEBUG:AtcdVService:Waiting for <atcd.backends.linux.AtcdLinuxShaper object at 0x20ce110> to stop... DEBUG:AtcdVService:Waiting for <atcd.AtcdDBQueueTask.AtcdDBQueueTask object at 0x20ce090> to stop... DEBUG:AtcdVService:Waiting for <atcd.AtcdThriftHandlerTask.AtcdNBServerTask object at 0x1d89ed0> to stop... INFO:AtcdVService:Instance shut down gracefully

    Notice: i run this commands in virtualenv, and i activated it too. maybe the problem is with the place of files in directories? please, anyone have some idea why can't i run this?

    opened by dalmasi 3
  • Switched broken pypip.in badges to shields.io

    Switched broken pypip.in badges to shields.io

    Hello, this is an auto-generated Pull Request. (Feedback?)

    Some time ago, pypip.in shut down. This broke the badges for a bunch of repositories, including django-atc-api. Thankfully, an equivalent service is run by shields.io. This pull request changes the badge to use shields.io instead.

    CLA Signed 
    opened by movermeyer 2
  • shape error: adding NetEm qdisc on IFID enx00116b68175e, mark 2, err: (2, 'No such file or directory')

    shape error: adding NetEm qdisc on IFID enx00116b68175e, mark 2, err: (2, 'No such file or directory')

    Hi,

    I run the command sudo atcd --atcd-lan enx00044b5818d1 --atcd-wan enx00116b68175e

    this is the erro i get: ERROR:AtcdVService.AtcdLinuxShaper:adding NetEm qdisc on IFID enx00116b68175e, mark 2, err: (2, 'No such file or directory')

    ifconfig:

    enx00044b5818d1 Link encap:Ethernet  HWaddr 00:04:4b:58:18:d1
             inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
             inet6 addr: fe80::204:4bff:fe58:18d1/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:83601 errors:0 dropped:0 overruns:0 frame:0
             TX packets:134428 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:26018235 (26.0 MB)  TX bytes:184628491 (184.6 MB)
    
    enx00116b68175e Link encap:Ethernet  HWaddr 00:11:6b:68:17:5e
             inet addr:10.0.1.60  Bcast:10.0.1.255  Mask:255.255.255.0
             inet6 addr: fe80::211:6bff:fe68:175e/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:136084 errors:9 dropped:0 overruns:0 frame:9
             TX packets:82120 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:182461515 (182.4 MB)  TX bytes:26374175 (26.3 MB)
    
    lo        Link encap:Local Loopback
             inet addr:127.0.0.1  Mask:255.0.0.0
             inet6 addr: ::1/128 Scope:Host
             UP LOOPBACK RUNNING  MTU:65536  Metric:1
             RX packets:1469 errors:0 dropped:0 overruns:0 frame:0
             TX packets:1469 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:0
             RX bytes:102136 (102.1 KB)  TX bytes:102136 (102.1 KB)
    

    ip r:

    default via 10.0.1.1 dev enx00116b68175e  proto static  metric 100
    default via 10.0.1.1 dev wlan0  proto static  metric 600
    10.0.1.0/24 dev enx00116b68175e  proto kernel  scope link  src 10.0.1.60  metric 100
    10.0.1.0/24 dev wlan0  proto kernel  scope link  src 10.0.1.73  metric 600
    169.254.0.0/16 dev enx00044b5818d1  scope link  metric 1000
    192.168.0.0/24 dev enx00044b5818d1  proto kernel  scope link  src 192.168.0.1
    

    Using pc with ubuntu 16.04

    opened by dorsegal 0
Owner
Meta Archive
These projects have been archived and are generally unsupported, but are still available to view and use
Meta Archive
Flow is a computational framework for deep RL and control experiments for traffic microsimulation.

Flow Flow is a computational framework for deep RL and control experiments for traffic microsimulation. See our website for more information on the ap

null 867 Jan 2, 2023
DI-smartcross - Decision Intelligence Platform for Traffic Crossing Signal Control

DI-smartcross DI-smartcross - Decision Intelligence Platform for Traffic Crossin

OpenDILab 213 Jan 2, 2023
Use MATLAB to simulate the signal and extract features. Use PyTorch to build and train deep network to do spectrum sensing.

Deep-Learning-based-Spectrum-Sensing Use MATLAB to simulate the signal and extract features. Use PyTorch to build and train deep network to do spectru

null 10 Dec 14, 2022
duralava is a neural network which can simulate a lava lamp in an infinite loop.

duralava duralava is a neural network which can simulate a lava lamp in an infinite loop. Example This is not a real lava lamp but a "fake" one genera

Maximilian Bachl 87 Dec 20, 2022
A new data augmentation method for extreme lighting conditions.

Random Shadows and Highlights This repo has the source code for the paper: Random Shadows and Highlights: A new data augmentation method for extreme l

Osama Mazhar 35 Nov 26, 2022
Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions

Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions Accepted by AAAI 2022 [arxiv] Wenyu Liu, Gaofeng Ren, Runsheng Yu, Shi Guo, Jia

liuwenyu 245 Dec 16, 2022
Finite difference solution of 2D Poisson equation. Can handle Dirichlet, Neumann and mixed boundary conditions.

Poisson-solver-2D Finite difference solution of 2D Poisson equation Current version can handle Dirichlet, Neumann, and mixed (combination of Dirichlet

Mohammad Asif Zaman 34 Dec 23, 2022
Code to use Augmented Shapiro Wilks Stopping, as well as code for the paper "Statistically Signifigant Stopping of Neural Network Training"

This codebase is being actively maintained, please create and issue if you have issues using it Basics All data files are included under losses and ea

J K Terry 32 Nov 9, 2021
GNN4Traffic - This is the repository for the collection of Graph Neural Network for Traffic Forecasting

GNN4Traffic - This is the repository for the collection of Graph Neural Network for Traffic Forecasting

null 564 Jan 2, 2023
Code for paper Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting

Decoupled Spatial-Temporal Graph Neural Networks Code for our paper: Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting.

S22 43 Jan 4, 2023
ROS-UGV-Control-Interface - Control interface which can be used in any UGV

ROS-UGV-Control-Interface Cam Closed: Cam Opened:

Ahmet Fatih Akcan 1 Nov 4, 2022
Hand Gesture Volume Control is AIML based project which uses image processing to control the volume of your Computer.

Hand Gesture Volume Control Modules There are basically three modules Handtracking Program Handtracking Module Volume Control Program Handtracking Pro

VITTAL 1 Jan 12, 2022
Learning to Simulate Dynamic Environments with GameGAN (CVPR 2020)

Learning to Simulate Dynamic Environments with GameGAN PyTorch code for GameGAN Learning to Simulate Dynamic Environments with GameGAN Seung Wook Kim,

null 199 Dec 26, 2022
Manipulation OpenAI Gym environments to simulate robots at the STARS lab

Manipulator Learning This repository contains a set of manipulation environments that are compatible with OpenAI Gym and simulated in pybullet. In par

STARS Laboratory 5 Dec 8, 2022
Simulate genealogical trees and genomic sequence data using population genetic models

msprime msprime is a population genetics simulator based on tskit. Msprime can simulate random ancestral histories for a sample of individuals (consis

Tskit developers 150 Dec 14, 2022
PyTorch implementation of "Conformer: Convolution-augmented Transformer for Speech Recognition" (INTERSPEECH 2020)

PyTorch implementation of Conformer: Convolution-augmented Transformer for Speech Recognition. Transformer models are good at capturing content-based

Soohwan Kim 565 Jan 4, 2023
Styled Augmented Translation

SAT Style Augmented Translation Introduction By collecting high-quality data, we were able to train a model that outperforms Google Translate on 6 dif

null 139 Dec 29, 2022
TANL: Structured Prediction as Translation between Augmented Natural Languages

TANL: Structured Prediction as Translation between Augmented Natural Languages Code for the paper "Structured Prediction as Translation between Augmen

null 98 Dec 15, 2022
A neuroanatomy-based augmented reality experience powered by computer vision. Features 3D visuals of the Atlas Brain Map slices.

Brain Augmented Reality (AR) A neuroanatomy-based augmented reality experience powered by computer vision that features 3D visuals of the Atlas Brain

Yasmeen Brain 10 Oct 6, 2022