blob: 429574fc288c039c0e0d9c020c167163b123e4eb [file] [log] [blame]
Brendan Gregg5a06c2c2016-01-28 23:00:00 -08001Demonstrations of gethostlatency, the Linux eBPF/bcc version.
2
3
4This traces host name lookup calls (getaddrinfo(), gethostbyname(), and
5gethostbyname2()), and shows the PID and command performing the lookup, the
6latency (duration) of the call in milliseconds, and the host string:
7
8# ./gethostlatency
9TIME PID COMM LATms HOST
1006:10:24 28011 wget 90.00 www.iovisor.org
1106:10:28 28127 wget 0.00 www.iovisor.org
1206:10:41 28404 wget 9.00 www.netflix.com
1306:10:48 28544 curl 35.00 www.netflix.com.au
1406:11:10 29054 curl 31.00 www.plumgrid.com
1506:11:16 29195 curl 3.00 www.facebook.com
1606:11:25 29404 curl 72.00 foo
1706:11:28 29475 curl 1.00 foo
18
19In this example, the first call to lookup "www.iovisor.org" took 90 ms, and
20the second took 0 ms (cached). The slowest call in this example was to "foo",
21which was an unsuccessful lookup.