1drsnoop(8) System Manager's Manual drsnoop(8)
2
3
4
6 drsnoop - Trace direct reclaim events. Uses Linux eBPF/bcc.
7
9 drsnoop.py [-h] [-T] [-U] [-p PID] [-t TID] [-u UID] [-d DURATION] [-n
10 name] [-v]
11
13 drsnoop trace direct reclaim events, showing which processes are alloc‐
14 ing pages with direct reclaiming. This can be useful for discovering
15 when allocstall (/p- roc/vmstat) continues to increase, whether it is
16 caused by some critical proc- esses or not.
17
18 This works by tracing the direct reclaim events using kernel trace‐
19 points.
20
21 This makes use of a Linux 4.4 feature (bpf_perf_event_output()); for
22 kernels older than 4.4, see the version under tools/old, which uses an
23 older mechanism.
24
25 Since this uses BPF, only the root user can use this tool.
26
28 CONFIG_BPF and bcc.
29
31 -h Print usage message.
32
33 -T Include a timestamp column.
34
35 -U Show UID.
36
37 -p PID Trace this process ID only (filtered in-kernel).
38
39 -t TID Trace this thread ID only (filtered in-kernel).
40
41 -u UID Trace this UID only (filtered in-kernel).
42
43 -d DURATION
44 Total duration of trace in seconds.
45
46 -n name
47 Only print processes where its name partially matches 'name' -v
48 verbose Run in verbose mode. Will output system memory state
49
51 Trace all direct reclaim events:
52 # drsnoop
53
54 Trace all direct reclaim events, for 10 seconds only:
55 # drsnoop -d 10
56
57 Trace all direct reclaim events, and include timestamps:
58 # drsnoop -T
59
60 Show UID:
61 # drsnoop -U
62
63 Trace PID 181 only:
64 # drsnoop -p 181
65
66 Trace UID 1000 only:
67 # drsnoop -u 1000
68
69 Trace all direct reclaim events from processes where its name partially
70 match-
71 es 'mond': # drnsnoop -n mond
72
74 TIME(s)
75 Time of the call, in seconds.
76
77 UID User ID
78
79 PID Process ID
80
81 TID Thread ID
82
83 COMM Process name
84
86 This traces the kernel direct reclaim tracepoints and prints output for
87 each event. As the rate of this is generally expected to be low (<
88 1000/s), the overhead is also expected to be negligible.
89
91 This is from bcc.
92
93 https://github.com/iovisor/bcc
94
95 Also look in the bcc distribution for a companion _examples.txt file
96 containing example usage, output, and commentary for this tool.
97
99 Linux
100
102 Unstable - in development.
103
105 Wenbo Zhang
106
107
108
109USER COMMANDS 2019-02-20 drsnoop(8)