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