Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bpftrace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bpftrace
Commits
25b776ba
Commit
25b776ba
authored
Dec 24, 2018
by
Dale Hamel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc and output width fixes for tcp tools
parent
182923e6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
31 deletions
+17
-31
tools/tcpaccept.bt
tools/tcpaccept.bt
+1
-1
tools/tcpaccept_example.txt
tools/tcpaccept_example.txt
+4
-4
tools/tcpconnect_example.txt
tools/tcpconnect_example.txt
+4
-4
tools/tcpdrop_example.txt
tools/tcpdrop_example.txt
+3
-17
tools/tcpretrans.bt
tools/tcpretrans.bt
+1
-1
tools/tcpretrans_example.txt
tools/tcpretrans_example.txt
+4
-4
No files found.
tools/tcpaccept.bt
View file @
25b776ba
...
...
@@ -21,7 +21,7 @@
BEGIN
{
printf("Tracing tcp accepts. Hit Ctrl-C to end.\n");
printf("%-8s %-
7
s %-14s ", "TIME", "PID", "COMM");
printf("%-8s %-
6
s %-14s ", "TIME", "PID", "COMM");
printf("%-14s %-5s %-14s %-5s %s\n", "RADDR", "RPORT", "LADDR", "LPORT", "BL");
}
...
...
tools/tcpaccept_example.txt
View file @
25b776ba
...
...
@@ -7,10 +7,10 @@ addresses changed to protect the innocent):
# ./tcpaccept
Tracing tcp accepts. Hit Ctrl-C to end.
TIME PID
COMM RADDR RPORT LADDR LPORT QLEN QMAX
0
5:25:38 1463622 redis-server 10.152.152.89 50672 10.134.113.155 6379 0 8192
0
5:25:38 3252023 thread.rb 10.152.229.144 46768 10.134.113.160 8000 0 8192
0
5:25:38 1463622 redis-server 10.148.179.172 54856 10.134.113.159 6379 0 8192
TIME PID
COMM RADDR RPORT LADDR LPORT BL
0
0:34:19 3949061 nginx 10.228.22.228 44226 10.229.20.169 8080 0/128
0
0:34:19 3951399 ruby 127.0.0.1 52422 127.0.0.1 8000 0/128
0
0:34:19 3949062 nginx 10.228.23.128 35408 10.229.20.169 8080 0/128
This output shows three connections, an IPv4 connections to PID 1463622, a "redis-server"
...
...
tools/tcpconnect_example.txt
View file @
25b776ba
...
...
@@ -6,10 +6,10 @@ This tool traces the kernel function performing active TCP connections
output (IP addresses changed to protect the innocent):
# ./tcpconnect
TIME PID COMM
SADDR SPORT DADDR
DPORT
0
5:44:26 629487 agent 127.0.0.1 5001 127.0.0.1 34282
0
5:44:30 629922 curl 127.0.0.1 10255 127.0.0.1 45084
0
5:44:30 629955 redis-cli 127.0.0.1 6379 127.0.0.1 51136
TIME PID COMM
SADDR SPORT DADDR
DPORT
0
0:36:45 1798396 agent 127.0.0.1 5001 10.229.20.82 56114
0
0:36:45 1798396 curl 127.0.0.1 10255 10.229.20.82 56606
0
0:36:45 3949059 nginx 127.0.0.1 8000 127.0.0.1 37780
This output shows three connections, one from a "agent" process, one from
...
...
tools/tcpdrop_example.txt
View file @
25b776ba
...
...
@@ -5,8 +5,8 @@ tcpdrop prints details of TCP packets or segments that were dropped by the
kernel, including the kernel stack trace that led to the drop:
# ./tcpdrop.bt
TIME
COMM PID SADDR:SPORT > DADDR:DPORT STATE (FLAGS)
0
6:29:07 redis-server 3252023 10.153.18.169:44926 > 10.134.113.159:6379 ESTABLISHED
TIME
PID COMM SADDR:SPORT DADDR:DPORT STATE
0
0:39:21 0 swapper/2 10.231.244.31:3306 10.229.20.82:50552 ESTABLISHE
tcp_drop+0x1
tcp_v4_do_rcv+0x135
tcp_v4_rcv+0x9c7
...
...
@@ -36,23 +36,9 @@ TIME COMM PID SADDR:SPORT > DADDR:DPORT S
x86_64_start_reservations+0x24
x86_64_start_kernel+0x74
secondary_startup_64+0xa5
06:30:24 swapper/4 0 10.152.132.206:38392 > 10.134.113.159:6379 ESTABLISHED
tcp_drop+0x1
tcp_v4_do_rcv+0x135
__release_sock+0x88
release_sock+0x30
inet_stream_connect+0x47
SYSC_connect+0x9e
sys_connect+0xe
do_syscall_64+0x73
entry_SYSCALL_64_after_hwframe+0x3d
[...]
The last two columns show the state of the TCP session.
These two examples show packets arriving for a session in the established state,
that were dropped by the kernel.
The last column shows the state of the TCP session.
This tool is useful for debugging high rates of drops, which can cause the
remote end to do timer-based retransmits, hurting performance.
...
...
tools/tcpretrans.bt
View file @
25b776ba
...
...
@@ -22,7 +22,7 @@
BEGIN
{
printf("Tracing tcp retransmits. Hit Ctrl-C to end.\n");
printf("%-8s %-8s %20s %2
0
s %6s\n", "TIME", "PID", "LADDR:LPORT", "RADDR:RPORT", "STATE" )
printf("%-8s %-8s %20s %2
1
s %6s\n", "TIME", "PID", "LADDR:LPORT", "RADDR:RPORT", "STATE" )
}
kprobe:tcp_retransmit_skb
...
...
tools/tcpretrans_example.txt
View file @
25b776ba
...
...
@@ -5,10 +5,10 @@ This tool traces the kernel TCP retransmit function to show details of these
retransmits. For example:
# ./tcpretrans.bt
TIME PID
LADDR:LPORT RADDR:RPORT
STATE
0
1:55:05 0 10.153.223.157:22 69.53.245.40:34619 ESTABLISHED
0
1:55:05 0 10.153.223.157:22 69.53.245.40:34619 ESTABLISHED
0
1:55:17 0 10.153.223.157:22 69.53.245.40:22957
ESTABLISHED
TIME PID
LADDR:LPORT RADDR:RPORT
STATE
0
0:43:54 0 10.229.20.82:46654 153.2.224.76:443 SYN_SENT
0
0:43:55 0 10.232.0.49:57678 10.229.20.99:24231 SYN_SENT
0
0:43:57 100 10.229.20.175:54224 10.201.76.122:443
ESTABLISHED
[...]
This output shows three TCP retransmits, the first two were for an IPv4
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment