forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
killsnoop_example.txt
36 lines (25 loc) · 1.02 KB
/
killsnoop_example.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Demonstrations of killsnoop, the Linux eBPF/bcc version.
This traces signals sent via the kill() syscall. For example:
# ./killsnoop
PID COMM SIG TPID RESULT
17064 bash 9 27682 0
17064 bash 9 27682 -3
17064 bash 0 17064 0
The first line showed a SIGKILL (9) sent from PID 17064 (a bash shell) to
PID 27682. The result, 0, means success.
The second line showed the same signal sent, this time resulting in a -3
(ESRCH: no such process).
USAGE message:
# ./killsnoop -h
usage: killsnoop [-h] [-t] [-x] [-p PID]
Trace signals issued by the kill() syscall
optional arguments:
-h, --help show this help message and exit
-t, --timestamp include timestamp on output
-x, --failed only show failed opens
-p PID, --pid PID trace this PID only
examples:
./killsnoop # trace all kill() signals
./killsnoop -t # include timestamps
./killsnoop -x # only show failed kills
./killsnoop -p 181 # only trace PID 181