Process Killer Experiment
Supported platforms:
The Process Killer experiment sends a signal to the specified process(es) over a given interval of time for the length of the experiment.
Process Killer sends an IPC signal to the process(es) that you specify in the experiment’s parameters. The experiment repeatedly sends the signal according to the interval set for the length of the experiment. For example, if the experiment runs for 60 seconds, and the interval is set to 5, Gremlin will send the signal every 5 seconds for a total of 12 times.
Options
Platform-specific notes
Linux
The Process Killer experiment sends the signal supplied by <span class="code-class-custom">--signal</span> (defaults to <span class="code-class-custom">KILL</span>) to processes identified by the rest of the supplied arguments.
On Linux, this experiment requires the KILL
capability, which is enabled by default during installation (see capabilities).
Additional notes
Specifying processes
This experiment accepts regular expressions and matches them against process names in the same way that pgrep does. Alternatively, you can pass a process ID (PID).
Terminating PID 1
PID 1 is most commonly reserved for the init process. On hosts, Process Killer does not work for PID 1. Instead, you should use a Shutdown experiment. On container-based systems (e.g. Kubernetes), terminating PID 1 has the same effect as running a Shutdown experiment.
Terminating containers
When using a container orchestration tool like Kubernetes, terminated containers usually restart automatically. If you want to ensure the container is terminated, you can use Process Killer to repeatedly terminate the container. You can do this by running Process Killer on the container host, ensuring that the Gremlin agent is deployed with hostPID
set to true
, and selecting the container process from the host.
Privileges required