forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tcp congestion status duration statistic tool (iovisor#3899)
add tcp congestion control status duration statistic tool, and it can be used to evaluate the networking and congestion algorithm performance.
- Loading branch information
1 parent
03e4948
commit a58c795
Showing
5 changed files
with
1,190 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
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,136 @@ | ||
.TH tcpcong 8 "2022-01-27" "USER COMMANDS" | ||
.SH NAME | ||
tcpcong \- Measure tcp congestion state duration. Uses Linux eBPF/bcc. | ||
.SH SYNOPSIS | ||
.B tcpcong [\-h] [\-T] [\-L] [\-R] [\-u] [\-d] [interval] [outputs] | ||
.SH DESCRIPTION | ||
this tool measures tcp sockets congestion control status duration, and | ||
prints a summary of tcp congestion state durations along with the number | ||
of total state changes. | ||
|
||
It uses dynamic tracing of kernel tcp congestion control status | ||
updating functions, and will need to be updated to match kernel changes. | ||
|
||
The traced functions are only called when there is congestion state update, | ||
and therefore have low overhead. we also use BPF map to store traced data | ||
to reduce overhead. See the OVERHEAD section for more details. | ||
Since this uses BPF, only the root user can use this tool. | ||
.SH REQUIREMENTS | ||
CONFIG_BPF and bcc. | ||
.SH OPTIONS | ||
.TP | ||
\-h | ||
Print usage message. | ||
.TP | ||
\-T | ||
Include a timestamp column. | ||
.TP | ||
\-L | ||
Specify local tcp port range. | ||
.TP | ||
\-R | ||
Specify remote tcp port range. | ||
.TP | ||
\-u | ||
Output in microseconds. | ||
.TP | ||
\-d | ||
Show congestion status duration distribution as histograms. | ||
.SH EXAMPLES | ||
.TP | ||
Show all tcp sockets congestion status duration until Ctrl-C: | ||
# | ||
.B tcpcongestdura | ||
.TP | ||
Show all tcp sockets congestion status duration every 1 second and 10 times: | ||
# | ||
.B tcpcong 1 10 | ||
.TP | ||
Show only local port 3000-3006 congestion status duration every 1 second: | ||
# | ||
.B tcpcong \-L 3000-3006 1 | ||
.TP | ||
Show only remote port 5000-5005 congestion status duration every 1 second: | ||
# | ||
.B tcpcong \-R 5000-5005 1 | ||
.TP | ||
Show 1 second summaries, printed in microseconds, with timestamps: | ||
# | ||
.B tcpcong \-uT 1 | ||
.TP | ||
Show all tcp sockets congestion status duration as histograms: | ||
# | ||
.B tcpcong \-d | ||
.SH FIELDS | ||
.TP | ||
LAddrPort | ||
local ip address and tcp socket port. | ||
.TP | ||
RAddrPort | ||
remote ip address and tcp socket port. | ||
.TP | ||
Open_us | ||
Total duration in open status for microseconds. | ||
.TP | ||
Dod_us | ||
Total duration in disorder status for microseconds. | ||
.TP | ||
Rcov_us | ||
Total duration in recovery status for microseconds. | ||
.TP | ||
Cwr_us | ||
Total duration in cwr status for microseconds. | ||
.TP | ||
Los_us | ||
Total duration in loss status for microseconds. | ||
.TP | ||
Open_ms | ||
Total duration in open status for milliseconds. | ||
.TP | ||
Dod_ms | ||
Total duration in disorder status for milliseconds. | ||
.TP | ||
Rcov_ms | ||
Total duration in recovery status for milliseconds. | ||
.TP | ||
Cwr_ms | ||
Total duration in cwr status for milliseconds. | ||
.TP | ||
Loss_ms | ||
Total duration in loss status for milliseconds. | ||
.TP | ||
Chgs | ||
Total number of status change. | ||
.TP | ||
usecs | ||
Range of microseconds for this bucket. | ||
.TP | ||
msecs | ||
Range of milliseconds for this bucket. | ||
.TP | ||
count | ||
Number of congestion status in this time range. | ||
.TP | ||
distribution | ||
ASCII representation of the distribution (the count column). | ||
.SH OVERHEAD | ||
This traces the kernel tcp congestion status change functions. | ||
As called rate per second of these functions per socket is low(<10000), the | ||
overhead is also expected to be negligible. If you have an application that | ||
will create thousands of tcp connections, then test and understand overhead | ||
before use. | ||
.SH SOURCE | ||
This is from bcc. | ||
.IP | ||
https://github.com/iovisor/bcc | ||
.PP | ||
Also look in the bcc distribution for a companion _examples.txt file containing | ||
example usage, output, and commentary for this tool. | ||
.SH OS | ||
Linux | ||
.SH STABILITY | ||
Unstable - in development. | ||
.SH AUTHOR | ||
jacky gan | ||
.SH SEE ALSO | ||
tcpretrans(8), tcpconnect(8), tcptop(8), tcpdrop(8) |
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
Oops, something went wrong.