monitoring and managing processes

zombie process: when child is done it frees up its reasources except for its process ID; then it’s just an etry in the parent’s process table; parent wakes up and clears process table

stopped is different from terminated

PTS : pseudo terminal session

ps -ef

bash shell running inside terminal emulator program, and allocated a pt

PID1 is systemd

top

controlling jobs

use & to run process in background, which allows it to write to stdout and lets you run additional processes

fg %1

1
2
3
4
5
6
sleep 200 &
[1] 23282
jobs
[1]+  Running                 sleep 200 &
fg %1
sleep 200

killing processes

19 SIGSTOP stops process, but doesn’t term/kill it 15 SIGTERM terminates, is nice, waits for process to end gracefully 9 SIGKILL kills, less nice 1 SIGHUP takes config file and re-inits it into memory

pkill looks up processes based on name or other attributes

kill a user’s login session

1
pkill -t pts/2

send SIGSTOP to job #1 to stop it

1
kill -SIGSTOP %1

send SIGCONT to job #1 to continue it

1
kill -SIGCONT %1