-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Demonstrations of tcptracer, the Linux eBPF/bcc version. | ||
|
||
|
||
This tool traces the kernel function performing TCP connections (eg, via a | ||
connect() or accept() syscalls) and closing them (explicitly or if the process | ||
dies). Some example output (IP addresses are fake): | ||
|
||
``` | ||
# ./tcptracer | ||
T PID COMM IP SADDR DADDR SPORT DPORT | ||
CN 2389 telnet 4 192.168.1.2 192.168.1.1 53404 23 | ||
CN 23323 curl 6 ::1 ::1 36226 80 | ||
CL 2389 telnet 4 192.168.1.2 192.168.1.1 53404 23 | ||
AC 23278 nc 6 ::1 ::1 80 36226 | ||
CL 23323 curl 6 ::1 ::1 36226 80 | ||
CL 23278 nc 6 ::1 ::1 80 36226 | ||
AC 15195 nc 4 10.202.210.1 10.202.109.12 8080 43904 | ||
CL 15195 nc 4 10.202.210.1 10.202.109.12 8080 43904 | ||
``` | ||
|
||
This output shows three conections, one outgoing from a "telnet" process, one | ||
outgoing from "curl" to a local netcat, and one incoming received by the "nc" | ||
process. The output details show the kind of event (CN for connection, CL for | ||
close and AC for accept), PID, IP version, source address, destination address, | ||
source port and destination port. |