blob: f80dc779d98602338113e3f92d2426cd2ef59ca3 [file] [log] [blame]
Brendan Greggd9e578b2015-09-21 11:59:42 -07001Demonstrations of killsnoop, the Linux eBPF/bcc version.
2
3
4This traces signals sent via the kill() syscall. For example:
5
6# ./killsnoop
7PID COMM SIG TPID RESULT
817064 bash 9 27682 0
917064 bash 9 27682 -3
1017064 bash 0 17064 0
11
12The first line showed a SIGKILL (9) sent from PID 17064 (a bash shell) to
13PID 27682. The result, 0, means success.
14
15The second line showed the same signal sent, this time resulting in a -3
16(ESRCH: no such process).
17
18
19USAGE message:
20
21# ./killsnoop -h
22usage: killsnoop [-h] [-t] [-x] [-p PID]
23
24Trace signals issued by the kill() syscall
25
26optional arguments:
27 -h, --help show this help message and exit
28 -t, --timestamp include timestamp on output
29 -x, --failed only show failed opens
30 -p PID, --pid PID trace this PID only
31
32examples:
33 ./killsnoop # trace all kill() signals
34 ./killsnoop -t # include timestamps
35 ./killsnoop -x # only show failed kills
36 ./killsnoop -p 181 # only trace PID 181