BSDwiki/ View and send signals to active processes

View and send signals to active processes

Author: hubertf contact BSD flavour

Reviewer: name contact BSD flavour

Reviewer: name contact BSD flavour


Concept

Be familiar with both the names and numbers of the most commonly used Unix signals(((signals))) and how to send a signal to an active process. Recognize the difference between a SIGTERM(((SIGTERM))) and a SIGKILL(((SIGKILL))).

Introduction

Section Determine which process are consuming the most CPU talks about processes, and how to list and manage them. This topic is covered in a bit more depth here, by listing other tools besides kill(1):

Examples

See section Determine which process are consuming the most CPU for examples on using ps(1) and kill(1). The following example achieves the same goal with the commands introduced here:

# pgrep -lf named
338 /usr/sbin/named -u bind
# pgrep named
338
# kill named
# pgrep named
#

Practice Exercises

See section Determine which process are consuming the most CPU and perform the same tasks with pgrep(1) and pkill(1).

More information

ps(1); kill(1); killall(1); pkill(1); pgrep(1)