> For the complete documentation index, see [llms.txt](https://pingcap.gitbook.io/chaos-workshop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pingcap.gitbook.io/chaos-workshop/a-menagerie-of-tools.md).

# A Menagerie of Tools

In the following section we'll talk about a group of tools which can be used for Chaos testing. Some, such as `kill` may already be familiar to you. Others like `pumba` may be entirely new.

These tools only represent some of the tools available. You may find others, or even make your own.

## Triggering Events

While you can run many of these commands in a manual way, you can also orchestrate running these commands by using an agent installed on your nodes.

You could also use the ideas below for some simple testing.

### Timers

You could also use things such as systemd [timers](https://www.freedesktop.org/software/systemd/man/systemd.timer.html) (utilizing `RandomizedDelaySec`) like so:

{% code title="/etc/systemd/system/kill-postgres.timer" %}

```bash
[Unit]
Description = Kill postgres eventually.

[Timer]
OnActiveSec = 0
RandomizedDelaySec = 1000
Unit = kill-postgres.service

[Install]
WantedBy = timers.target
```

{% endcode %}

{% code title="/etc/systemd/system/kill-postgres.service" %}

```bash
[Unit]
Description = Kill postgres.

[Service]
ExecStart = /usr/bin/killall -s KILL postgres
```

{% endcode %}

### Socket Activation

You can alternatively trigger failures via systemd's [socket](https://www.freedesktop.org/software/systemd/man/systemd.socket.html) activation feature:

{% code title="/etc/systemd/system/kill-postgres.socket" %}

```bash
[Unit]
Description = Kill postgres on message.

[Socket]
ListenStream = 127.0.0.1:8000

[Install]
WantedBy = sockets.target
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pingcap.gitbook.io/chaos-workshop/a-menagerie-of-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
