blob: b428983e22750bd0792c3b10d1a12855d88c1e72 [file] [log] [blame]
Brendan Gregg5a06c2c2016-01-28 23:00:00 -08001.TH gethostlatency 8 "2016-01-28" "USER COMMANDS"
2.SH NAME
3gethostlatency \- Show latency for getaddrinfo/gethostbyname[2] calls. Uses Linux eBPF/bcc.
4.SH SYNOPSIS
5.B gethostlatency
6.SH DESCRIPTION
7This traces and prints when getaddrinfo(), gethostbyname(), and gethostbyname2()
8are called, system wide, and shows the responsible PID and command name,
9latency of the call (duration) in milliseconds, and the host string.
10
11This tool can be useful for identifying DNS latency, by identifying which
12remote host name lookups were slow, and by how much.
13
14This tool currently uses dynamic tracing of user-level functions and registers,
15and may need modifications to match your software and processor architecture.
16
17Since this uses BPF, only the root user can use this tool.
18.SH REQUIREMENTS
19CONFIG_BPF and bcc.
20.SH EXAMPLES
21.TP
22Trace host lookups (getaddrinfo/gethostbyname[2]) system wide:
23#
24.B gethostlatency
25.SH FIELDS
26.TP
27TIME
28Time of the command (HH:MM:SS).
29.TP
30PID
31Process ID of the client performing the call.
32.TP
33COMM
34Process (command) name of the client performing the call.
35.TP
36HOST
37Host name string: the target of the lookup.
38.SH OVERHEAD
39The rate of lookups should be relatively low, so the overhead is not expected
40to be a problem.
41.SH SOURCE
42This is from bcc.
43.IP
44https://github.com/iovisor/bcc
45.PP
46Also look in the bcc distribution for a companion _examples.txt file containing
47example usage, output, and commentary for this tool.
48.SH OS
49Linux
50.SH STABILITY
51Unstable - in development.
52.SH AUTHOR
53Brendan Gregg
54.SH SEE ALSO
55tcpdump(8)