Awesome
Havoc
A ChaosMonkey style application that can randomly kill processes, as well as TCP and UDP connections. Inspired by dLuna/chaos_monkey.
Basic Usage
havoc:on().
This will use the default options. The following is a list of currently allowed options
avg_wait
- The average amount of time you would like to wait between kills. (default5000
)deviation
- The deviation of time allowed between kills. (default0.3
)supervisor
- Whether or not to kill supervisors. (defaultfalse
)process
- Whether or not to kill processes. (defaulttrue
)tcp
- Whether or not to kill TCP connections. (defaultfalse
)udp
- Whether or not to kill UDP connections. (defaultfalse
)nodes
- Either a list of atoms for node names, or any value thaterlang:nodes/1
accepts. (defaultthis
)applications
- A list of application names that you want to target. (defaults to all applications exceptkernel
andhavoc
)otp_applications
- A list of OTP applications that you would like to target. (default[]
)supervisors
- A list of supervisors that you want to target. Can be any valid supervisor reference. (defaults to all supervisors)killable_callback
- AFun
that gets called to decide if apid
orport
may be killed or not by returningtrue
orfalse
.prekill_callback
- AFun
that gets called just before killing.
You can specify options using havoc:on/1
.
havoc:on([{avg_wait, 3000}, {deviation, 0.5}, process, tcp])
It is also possible to check if havoc is currently active.
havoc:is_active()
Build
$ rebar3 compile