1gethostlatency(8) System Manager's Manual gethostlatency(8)
2
3
4
6 gethostlatency.bt - Show latency for getaddrinfo/gethostbyname[2]
7 calls. Uses bpftrace/eBPF.
8
10 gethostlatency.bt
11
13 This traces and prints when getaddrinfo(), gethostbyname(), and geth‐
14 ostbyname2() are called, system wide, and shows the responsible PID and
15 command name, latency of the call (duration) in milliseconds, and the
16 host string.
17
18 This tool can be useful for identifying DNS latency, by identifying
19 which remote host name lookups were slow, and by how much.
20
21 This tool currently uses dynamic tracing of user-level functions and
22 registers, and may need modifications to match your software and pro‐
23 cessor architecture.
24
25 Since this uses BPF, only the root user can use this tool.
26
28 CONFIG_BPF and bcc.
29
31 Trace host lookups (getaddrinfo/gethostbyname[2]) system wide:
32 # gethostlatency.bt
33
35 TIME Time of the command (HH:MM:SS).
36
37 PID Process ID of the client performing the call.
38
39 COMM Process (command) name of the client performing the call.
40
41 LATms Latency of the call, in milliseconds.
42
43 HOST Host name string: the target of the lookup.
44
46 The rate of lookups should be relatively low, so the overhead is not
47 expected to be a problem.
48
50 This is from bpftrace.
51
52 https://github.com/iovisor/bpftrace
53
54 Also look in the bpftrace distribution for a companion _examples.txt
55 file containing example usage, output, and commentary for this tool.
56
57 This is a bpftrace version of the bcc tool of the same name. The bcc
58 tool provides command line options.
59
60 https://github.com/iovisor/bcc
61
63 Linux
64
66 Unstable - in development.
67
69 Brendan Gregg
70
72 tcpdump(8)
73
74
75
76USER COMMANDS 2018-09-08 gethostlatency(8)