Infrastructure Chaos
Kill or pause local processes and Docker containers, or saturate CPU and memory with loki infra.
Subcommands
| Flag | Type | Default | Description |
|---|---|---|---|
| loki infra list | command | — | List local processes with open listening ports (Port, PID, Process name). |
| loki infra kill | --pid | --port | --name | --container | — | Kill a local process (by PID, listening port, or name substring) or a local Docker container outright. |
| loki infra pause | --pid | --port | --name | --container [-d 5.0] | 5.0s | Suspend a local process or Docker container for --duration / -d seconds, then automatically resume it. |
| loki infra cpu-stress | [-d 5.0] [--workers, -w N] | 5.0s | Saturate CPU cores for --duration / -d seconds (defaults to 1 busy-loop worker per CPU core). |
| loki infra memory-stress | [-d 5.0] [--mb 512] | 5.0s / 512 MB | Allocate and hold --mb megabytes resident in RAM for --duration / -d seconds. |
| loki infra cleanup | command | — | Kill any leftover cpu-stress or memory-stress workers if a previous run was forcibly terminated. |
Examples
bash
loki infra listloki infra kill --port 5432loki infra kill --container redisloki infra pause --port 5432 -d 10loki infra cpu-stress -d 5loki infra memory-stress -d 5 --mb 1024loki infra cleanup
Local-only scope
loki infra operates strictly on the local machine (local OS processes and local Docker containers). It has no remote, SSH, or cloud execution backend.
