• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Demonstrations of sigsnoop.
2
3
4This traces signals generated system wide. For example:
5
6# ./sigsnoop -n
7TIME     PID     COMM             SIG       TPID    RESULT
819:56:14 3204808 a.out            SIGSEGV   3204808 0
919:56:14 3204808 a.out            SIGPIPE   3204808 0
1019:56:14 3204808 a.out            SIGCHLD   3204722 0
11
12The first line showed that a.out (a test program) deliver a SIGSEGV signal.
13The result, 0, means success.
14
15The second and third lines showed that a.out also deliver SIGPIPE/SIGCHLD
16signals successively.
17
18USAGE message:
19
20# ./sigsnoop -h
21Usage: sigsnoop [OPTION...]
22Trace standard and real-time signals.
23
24USAGE: sigsnoop [-h] [-x] [-k] [-n] [-p PID] [-s SIGNAL]
25
26EXAMPLES:
27    sigsnoop             # trace signals system-wide
28    sigsnoop -k          # trace signals issued by kill syscall only
29    sigsnoop -x          # trace failed signals only
30    sigsnoop -p 1216     # only trace PID 1216
31    sigsnoop -s 9        # only trace signal 9
32
33  -k, --kill                 Trace signals issued by kill syscall only.
34  -n, --name                 Output signal name instead of signal number.
35  -p, --pid=PID              Process ID to trace
36  -s, --signal=SIGNAL        Signal to trace.
37  -x, --failed               Trace failed signals only.
38  -?, --help                 Give this help list
39      --usage                Give a short usage message
40  -V, --version              Print program version
41
42Mandatory or optional arguments to long options are also mandatory or optional
43for any corresponding short options.
44
45Report bugs to https://github.com/iovisor/bcc/tree/master/libbpf-tools.
46