Skip to main content

Signal

Send a signal to a specific process by PID:

$ osapi client node process signal --target web-01 \
--pid 1234 --signal TERM

Job ID: 550e8400-e29b-41d4-a716-446655440000

PID SIGNAL CHANGED
1234 TERM true

Broadcast a signal to a process on all hosts:

$ osapi client node process signal --target _all \
--pid 1234 --signal HUP

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS PID SIGNAL CHANGED ERROR
web-01 ok 1234 HUP true
web-02 ok 1234 HUP true
mac-01 skipped unsupported platform

JSON Output

Use --json to get the full API response:

$ osapi client node process signal --target web-01 \
--pid 1234 --signal TERM --json
{"results":[{"hostname":"web-01","pid":1234,"signal":"TERM","changed":true,"status":"ok"}],"job_id":"..."}

Flags

FlagDescriptionDefault
--pidProcess ID to signal (required)
--signalSignal name: TERM, KILL, HUP, INT, USR1, USR2, etc.
-T, --targetTarget: _any, _all, hostname, or label (group:web)_any
-j, --jsonOutput raw JSON response