1gethostlatency(8) System Manager's Manual gethostlatency(8)
2
3
4
6 gethostlatency - Show latency for getaddrinfo/gethostbyname[2] calls.
7 Uses Linux eBPF/bcc.
8
10 gethostlatency
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 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 This tool currently uses dynamic tracing of user-level functions and
26 registers, and may need modifications to match your software and pro‐
27 cessor architecture.
28
29 Since this uses BPF, only the root user can use this tool.
30
32 CONFIG_BPF and bcc.
33
35 -p PID Trace this process ID only.
36
38 Trace host lookups (getaddrinfo/gethostbyname[2]) system wide:
39 # gethostlatency
40
42 TIME Time of the command (HH:MM:SS).
43
44 PID Process ID of the client performing the call.
45
46 COMM Process (command) name of the client performing the call.
47
48 HOST Host name string: the target of the lookup.
49
51 The rate of lookups should be relatively low, so the overhead is not
52 expected to be a problem.
53
55 This is from bcc.
56
57 https://github.com/iovisor/bcc
58
59 Also look in the bcc distribution for a companion _examples.txt file
60 containing example usage, output, and commentary for this tool.
61
63 Linux
64
66 Unstable - in development.
67
69 Brendan Gregg
70
72 tcpdump(8)
73
74
75
76USER COMMANDS 2016-01-28 gethostlatency(8)