Giter Club home page Giter Club logo

chaos-basics's Introduction

#Usage Bring up he three test-nodes using vagrant up.

Use chaos.sh <scenario> <machine-id> <arg1> <arg2> ... to launch the different scenarios. #Tools used tc iptables tcpkill dmsetup stress wrk

#Notes tc qdisc show dev enp0s8

#Demo java -jar /vagrant/shared/counter-demo-assembly-0.1-SNAPSHOT.jar --config /vagrant/shared/target-host1.json java -jar /vagrant/shared/counter-demo-assembly-0.1-SNAPSHOT.jar --config /vagrant/shared/target-host2.json

./chaos.sh 1 net_delay enp0s8 100000 70000 ./chaos.sh 1 net_clear enp0s8 ./chaos.sh 1 net_delay_rate_limit enp0s8 10000 ./chaos.sh 1 net_clear enp0s8 ./chaos.sh 1 net_loss enp0s8 20 ./chaos.sh 1 disk_delay 30000000 500 500

mount /dev/mapper/delay /mnt time touch /mnt/1

badblocks -v /dev/mapper/error

badblocks -v /dev/mapper/stretch--vg-root Checking blocks 0 to 32776191 Checking for bad blocks (read-only test): done Pass completed, 0 bad blocks found. (0/0/0 errors)

#TODO

  • Use change for tc if roort already exists to allow stacking and changing of values.
  • Integrate ntpdsim

#NTPDSIM ntpdsim was removed from all debian absed distros ... So we need to build it from scratch (best inside one of the vagrant boxes, build is quite fast)

apt-get source ntp Switch to the now created source-folder.

sudo apt-get install dpkg-dev libtool lynx automake autotools-dev make -y

Create scripts/ntpver.in with the following content (taken from https://github.com/dfc/ntp-mirror/blob/master/scripts/ntpver.in)

#!@CONFIG_SHELL@
# print version string of NTP daemon
# Copyright (c) 1997 by Ulrich Windl
# Modified 970318: Harlan Stenn: rewritten...
# usage: ntpver hostname

ntpq -c "rv 0 daemon_version" $* | @AWK@ '/daemon_version/ { print $2 }'
./bootstrap
./configure --enable-simulator
make

The simulator is now here: ntp/ntpdsim

##Quick example from https://www.eecis.udel.edu/~mills/ntp/html/ntpdsim.html: rm ./ntpstats/* ntpdsim -O 0.1 -C .001 -T 400 -W 1 -c ./ntp.conf,

which starts the simulator with a time offset 100 ms, network jitter 1 ms, frequency offset 400 PPM and oscillator wander 1 PPM/s. These parameters represent typical conditions with modern workstations on a Ethernet LAN. The ntp.conf file should contain something like

disable kernel server pogo driftfile ./ntp.drift statsdir ./ntpstats/ filegen loopstats type day enable filegen peerstats type day enable

chaos-basics's People

Contributors

codepitbull avatar pflanzenmoerder avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

mrtnrdl fhkoeb

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.