Kill process tree

Send SIGTERM to the entire process group

kill -TERM -$(pgrep -f 'my-app')

tool
linux133 commands
tags
linux

More linux commands

  • renice -n 10 -p <pid>

    Lower priority (nice +10) of a running process

  • systemd-run --scope -p MemoryMax=512M -p CPUQuota=50% -- ./heavy.sh

    Run a command in a transient systemd scope with resource limits

  • journalctl --since '2024-01-15 10:00' --until '2024-01-15 10:30' -u nginx

    Logs for nginx between two timestamps

  • journalctl -u <service> -o json | jq '{ts: .REALTIME_TIMESTAMP, msg: .MESSAGE}'

    Structured log export for ingestion into log aggregators

  • timedatectl status && chronyc tracking

    Clock sync state, offset, and NTP source details

all 133 linux commands