1naptime(8) System Manager's Manual naptime(8)
2
3
4
6 naptime.bt - Trace voluntary sleep calls. Uses bpftrace/eBPF.
7
9 naptime.bt
10
12 This tool traces application sleeps, and can be used for debugging high
13 latency that may be caused by deliberate sleeps placed in application
14 routines, especially administration scripts.
15
16 This tool works by tracing the nanosleep(2) syscall using the syscall
17 tracepoints.
18
19 Since this uses BPF, only the root user can use this tool.
20
22 CONFIG_BPF and bpftrace.
23
25 Trace application sleeps via nanosleep(2):
26 # naptime.bt
27
29 TIME A timestamp in HH:MM:SS format.
30
31 PPID Parent process ID.
32
33 PCOMM Parent process name.
34
35 PID The sleeping process ID.
36
37 COMM The sleeping process name.
38
39 SECONDS
40 The requested duration of the sleep.
41
43 nanosleep(2) calls are expected to be low frequency (<< 100/s), so the
44 overhead of this tool is expected to be negligible.
45
47 This tool originated from the book "BPF Performance Tools", published
48 by Addison Wesley (2019):
49
50 http://www.brendangregg.com/bpf-performance-tools-book.html
51
52 See the book for more documentation on this tool.
53
54 This version is in the bpftrace repository:
55
56 https://github.com/iovisor/bpftrace
57
58 Also look in the bpftrace distribution for a companion _examples.txt
59 file containing example usage, output, and commentary for this tool.
60
62 Linux
63
65 Unstable - in development.
66
68 Brendan Gregg
69
71 capable(8)
72
73
74
75USER COMMANDS 2019-07-05 naptime(8)