Coder Social home page Coder Social logo

bm-scripts's Introduction

Project setup:

  1. Install docker

  2. Install proect dependencies by running bash install.sh.

  3. Fix docker permissions with next commands:
    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker

  4. Build ubuntu_delay image with: docker build -t ubuntu_delay ./scripts/resources

  5. See Core dumps section

  6. See Debugging section

  7. See Examples section

  8. See docs folder for more start examples

Core dumps

Here can be situations, when something went wrong and you should have informations about this situations, core dumps will help you. For generating core dumps, you should write core pattern by next command on your host: echo '/tmp/core.%t.%e.%p.%P' | sudo tee /proc/sys/kernel/core_pattern. For permanent storing core_pattern (it will be changed for next computer start), you should write rule kernel.core_pattern=/tmp/cores/core.%t.%e.%p.%P to file /etc/sysctl.conf.

Debugging

For getting just backtrace you can use one of next methods:

  • Use docker exec -it echonode{n} /bin/bash to get access to container and run gdb -p $PID command.

  • You can get access to process inside container from your host using nsenter: sudo nsenter -t $HPID -m -p gdb -p $PID, where $HPID - it is host pid and $PID - it is pid inside container.
    This methods give you backtrace, also there is available to put breakpoints, but no source code available. For fully debuggin use next method:

  • run gdb /path/to/echonode and inside gdb run next command (gdb) target remote | docker exec -i echonode{n} gdbserver - --attach $PID, this give you opportunity to debug process inside container with source code.

Examples (starting nodes on servers):

Starting 25 nodes per server:

  • ./start_deployer.py -n 25 -e ./echo_node -i ubuntu_delay -sn 0 -hi '{"192.168.9.41":25, "192.168.9.42":25, "192.168.9.43":25}' -cc 100 -u "url_of_slack_app" ./start_deployer.py -n 25 -e ./echo_node -i ubuntu_delay -sn 1 -hi '{"192.168.9.40":25, "192.168.9.42":25, "192.168.9.43":25}' -cc 100 -u "url_of_slack_app" ./start_deployer.py -n 25 -e ./echo_node -i ubuntu_delay -sn 2 -hi '{"192.168.9.40":25, "192.168.9.41":25, "192.168.9.43":25}' -cc 100 -u "url_of_slack_app" ./start_deployer.py -n 25 -e ./echo_node -i ubuntu_delay -sn 3 -hi '{"192.168.9.40":25, "192.168.9.41":25, "192.168.9.42":25}' -cc 100 -u "url_of_slack_app"

Starting sender:

  • ./start_sender.py -hi '{"192.168.9.40":25, "192.168.9.41":25, "192.168.9.42":25, "192.168.9.43":25}' -txs 200

More information about options you can get with --help command, it available on all scripts, or see docs folder.

bm-scripts's People

Contributors

dvolynets avatar

Watchers

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