Start your 30 day free trial.
START FOR FREE

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

/code /code /code /code /code /code /code /code /code /code
Parameter Flag Default Version Description
Signal -s stringKILL 1.8.0 The signal to send to target processes. Values: [HUP,INT,QUIT,ILL,TRAP,ABRT,FPE,KILL,SEGV,PIPE,ALRM,TERM,USR1,USR2]
Interval -i int1 1.8.0 The number of seconds to delay before kills.
Process -p reg ex or int True 1.8.0 The process name to match (allows regex) or the process ID.
Group -g string 1.8.0 The group name or ID to match against (name matches only).
User -u string 1.8.0 The user name or ID to match against (name matches only).
Newest -nFalse 1.8.0 If set the newest matching process will be killed (name matches only, cannot be used with -o).
Oldest -oFalse 1.8.0 If set the oldest matching process will be killed (name matches only, cannot be used with -n).
Exact -eFalse 1.8.0 If set the match must be exact and not just a substring match (name matches only).
Kill Children -cFalse 1.8.0 If set the processes children will also be killed.
Full Match -fFalse 1.8.0 If set the processes name match will occur against the full command line string that the process was launched with.
Length -l int60 1.8.0 The length of the experiment (seconds).

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

On this page
Back to top