1gethostlatency(8)           System Manager's Manual          gethostlatency(8)
2
3
4

NAME

6       gethostlatency.bt   -  Show  latency  for  getaddrinfo/gethostbyname[2]
7       calls. Uses bpftrace/eBPF.
8

SYNOPSIS

10       gethostlatency.bt
11

DESCRIPTION

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

REQUIREMENTS

28       CONFIG_BPF and bcc.
29

EXAMPLES

31       Trace host lookups (getaddrinfo/gethostbyname[2]) system wide:
32              # gethostlatency.bt
33

FIELDS

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

OVERHEAD

46       The rate of lookups should be relatively low, so the  overhead  is  not
47       expected to be a problem.
48

SOURCE

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

OS

63       Linux
64

STABILITY

66       Unstable - in development.
67

AUTHOR

69       Brendan Gregg
70

SEE ALSO

72       tcpdump(8)
73
74
75
76USER COMMANDS                     2018-09-08                 gethostlatency(8)
Impressum