jackygam2001 | a58c795 | 2022-03-24 22:50:19 +0800 | [diff] [blame] | 1 | Demonstrations of tcpcong, the Linux eBPF/bcc version. |
| 2 | |
| 3 | This tool traces linux kernel's tcp congestion control status change functions, |
| 4 | then calculate duration of every status and record it, at last prints it as |
| 5 | tables or histogram, which can be used for evaluating the tcp congestion |
| 6 | algorithm's performance. |
| 7 | |
| 8 | For example: |
| 9 | |
| 10 | ./tcpcong |
| 11 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 12 | ^C |
| 13 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 14 | 192.168.219.3/34968 192.168.219.4/19230 884 12 102 507 0 2721 |
| 15 | 192.168.219.3/34976 192.168.219.4/19230 869 12 133 490 0 2737 |
| 16 | 192.168.219.3/34982 192.168.219.4/19230 807 0 0 699 0 3158 |
| 17 | 192.168.219.3/34988 192.168.219.4/19230 892 16 88 508 0 2540 |
| 18 | 192.168.219.3/38946 192.168.219.4/19229 894 13 97 500 0 2697 |
| 19 | 192.168.219.3/38950 192.168.219.4/19229 840 10 73 579 1 1840 |
| 20 | 192.168.219.3/38970 192.168.219.4/19229 862 17 91 534 0 2339 |
| 21 | 192.168.219.3/38982 192.168.219.4/19229 812 13 92 587 0 2102 |
| 22 | 192.168.219.3/39070 192.168.219.1/19225 855 7 61 580 0 2826 |
| 23 | 192.168.219.3/39098 192.168.219.1/19225 880 8 47 568 0 2557 |
| 24 | 192.168.219.3/39112 192.168.219.1/19225 674 2 10 819 0 2867 |
| 25 | 192.168.219.3/39120 192.168.219.1/19225 757 1 11 736 0 2978 |
| 26 | 192.168.219.3/41146 192.168.219.1/19227 736 1 10 758 0 2972 |
| 27 | 192.168.219.3/41162 192.168.219.1/19227 662 2 10 830 0 2889 |
| 28 | 192.168.219.3/41178 192.168.219.1/19227 646 2 11 846 0 2858 |
| 29 | 192.168.219.3/41192 192.168.219.1/19227 812 9 67 615 0 2204 |
| 30 | 192.168.219.3/43856 192.168.219.2/19225 745 1 5 754 0 3067 |
| 31 | 192.168.219.3/43858 192.168.219.2/19225 827 4 36 636 0 2130 |
| 32 | 192.168.219.3/43872 192.168.219.2/19225 739 0 2 764 0 3035 |
| 33 | 192.168.219.3/43880 192.168.219.2/19225 747 0 3 756 0 3144 |
| 34 | 192.168.219.3/47230 192.168.219.2/19227 830 4 38 632 0 2554 |
| 35 | 192.168.219.3/47242 192.168.219.2/19227 782 3 32 687 0 2136 |
| 36 | 192.168.219.3/47272 192.168.219.2/19227 611 1 3 889 0 2629 |
| 37 | 192.168.219.3/47294 192.168.219.2/19227 832 3 38 630 0 2631 |
| 38 | 192.168.219.3/49716 192.168.219.2/19226 846 4 44 610 0 2562 |
| 39 | 192.168.219.3/49746 192.168.219.2/19226 765 0 4 736 0 2998 |
| 40 | 192.168.219.3/49760 192.168.219.2/19226 812 2 47 644 0 2273 |
| 41 | 192.168.219.3/49766 192.168.219.2/19226 724 0 2 779 0 3106 |
| 42 | 192.168.219.3/54076 192.168.219.1/19226 690 1 9 804 0 2939 |
| 43 | 192.168.219.3/54096 192.168.219.1/19226 715 2 10 778 0 2974 |
| 44 | 192.168.219.3/54114 192.168.219.1/19226 878 6 61 558 0 2742 |
| 45 | 192.168.219.3/54120 192.168.219.1/19226 738 0 9 757 0 2959 |
| 46 | 192.168.219.3/60926 192.168.219.4/19228 711 11 80 702 0 1870 |
| 47 | 192.168.219.3/60930 192.168.219.4/19228 785 0 0 720 0 3325 |
| 48 | 192.168.219.3/60942 192.168.219.4/19228 762 0 1 743 0 3342 |
| 49 | 192.168.219.3/60948 192.168.219.4/19228 877 11 102 514 0 2654 |
| 50 | |
| 51 | The example shows all tcp socket's congestion status duration for milliseconds, |
| 52 | open_ms column is the duration of tcp connection in open status whose cwnd can |
| 53 | increase; dod_ms column is the duration of tcp connection in disorder status |
| 54 | who receives disordered packet; rcov_ms column is the duration of tcp |
| 55 | connection in recovery status who receives 3 duplicated acks; cwr_ms column |
| 56 | is the duration of tcp connection who receives explicitly congest notifier and |
| 57 | two acks to reduce the cwnd. the last column chgs prints total status change |
| 58 | number of the socket. |
| 59 | |
| 60 | An interval can be provided, and also optionally a count. Eg, printing output |
| 61 | every 1 second, and including timestamps (-T): |
| 62 | ./tcpcong -T 1 3 |
| 63 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 64 | |
| 65 | 07:37:55 |
| 66 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 67 | 192.168.219.3/34968 192.168.219.4/19230 742 15 82 311 0 1678 |
| 68 | 192.168.219.3/34976 192.168.219.4/19230 700 12 98 340 0 1965 |
| 69 | 192.168.219.3/34982 192.168.219.4/19230 634 0 1 516 0 2471 |
| 70 | 192.168.219.3/34988 192.168.219.4/19230 692 12 94 354 0 1941 |
| 71 | 192.168.219.3/38946 192.168.219.4/19229 722 12 90 323 0 2006 |
| 72 | 192.168.219.3/38950 192.168.219.4/19229 420 7 264 439 1 951 |
| 73 | 192.168.219.3/38970 192.168.219.4/19229 724 14 90 323 0 1986 |
| 74 | 192.168.219.3/38982 192.168.219.4/19229 686 13 87 365 0 1675 |
| 75 | 192.168.219.3/39070 192.168.219.1/19225 653 5 46 446 0 1998 |
| 76 | 192.168.219.3/39098 192.168.219.1/19225 667 4 38 440 0 2098 |
| 77 | 192.168.219.3/39112 192.168.219.1/19225 606 0 1 543 0 2146 |
| 78 | 192.168.219.3/39120 192.168.219.1/19225 492 0 205 453 0 1916 |
| 79 | 192.168.219.3/41146 192.168.219.1/19227 583 0 3 564 0 2332 |
| 80 | 192.168.219.3/41162 192.168.219.1/19227 536 0 1 613 0 2192 |
| 81 | 192.168.219.3/41178 192.168.219.1/19227 499 0 2 649 0 2064 |
| 82 | 192.168.219.3/41192 192.168.219.1/19227 622 6 34 488 0 1660 |
| 83 | 192.168.219.3/43856 192.168.219.2/19225 555 0 1 593 0 2359 |
| 84 | 192.168.219.3/43858 192.168.219.2/19225 618 3 28 502 0 1773 |
| 85 | 192.168.219.3/43872 192.168.219.2/19225 558 0 0 592 0 2318 |
| 86 | 192.168.219.3/43880 192.168.219.2/19225 580 0 1 569 0 2303 |
| 87 | 192.168.219.3/47230 192.168.219.2/19227 646 1 18 485 0 1776 |
| 88 | 192.168.219.3/47242 192.168.219.2/19227 634 0 20 495 0 1582 |
| 89 | 192.168.219.3/47272 192.168.219.2/19227 463 0 1 687 0 1854 |
| 90 | 192.168.219.3/47294 192.168.219.2/19227 636 2 27 486 0 1901 |
| 91 | 192.168.219.3/49716 192.168.219.2/19226 646 2 28 475 0 1832 |
| 92 | 192.168.219.3/49746 192.168.219.2/19226 583 0 0 567 0 2333 |
| 93 | 192.168.219.3/49760 192.168.219.2/19226 628 2 26 495 0 1755 |
| 94 | 192.168.219.3/49766 192.168.219.2/19226 558 0 0 592 0 2412 |
| 95 | 192.168.219.3/54076 192.168.219.1/19226 581 0 2 567 0 2042 |
| 96 | 192.168.219.3/54096 192.168.219.1/19226 554 0 2 594 0 2239 |
| 97 | 192.168.219.3/54114 192.168.219.1/19226 685 4 33 427 0 1859 |
| 98 | 192.168.219.3/54120 192.168.219.1/19226 611 0 3 537 0 2322 |
| 99 | 192.168.219.3/60926 192.168.219.4/19228 681 20 101 347 0 1636 |
| 100 | 192.168.219.3/60930 192.168.219.4/19228 616 0 1 532 0 2310 |
| 101 | 192.168.219.3/60942 192.168.219.4/19228 607 0 1 543 0 2433 |
| 102 | 192.168.219.3/60948 192.168.219.4/19228 597 11 76 293 0 1641 |
| 103 | |
| 104 | 07:37:57 |
| 105 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 106 | 192.168.219.3/34968 192.168.219.4/19230 469 9 255 265 0 1305 |
| 107 | 192.168.219.3/34976 192.168.219.4/19230 580 11 91 316 0 1916 |
| 108 | 192.168.219.3/34982 192.168.219.4/19230 566 0 0 433 0 2092 |
| 109 | 192.168.219.3/34988 192.168.219.4/19230 583 9 63 345 0 1871 |
| 110 | 192.168.219.3/38946 192.168.219.4/19229 449 16 69 464 0 1425 |
| 111 | 192.168.219.3/38950 192.168.219.4/19229 569 10 68 349 0 1848 |
| 112 | 192.168.219.3/38970 192.168.219.4/19229 573 20 66 339 0 1839 |
| 113 | 192.168.219.3/38982 192.168.219.4/19229 553 9 60 378 0 1483 |
| 114 | 192.168.219.3/39070 192.168.219.1/19225 471 3 243 280 0 1279 |
| 115 | 192.168.219.3/39098 192.168.219.1/19225 598 4 37 355 0 1717 |
| 116 | 192.168.219.3/39112 192.168.219.1/19225 522 0 1 476 0 1816 |
| 117 | 192.168.219.3/39120 192.168.219.1/19225 518 0 1 480 0 2031 |
| 118 | 192.168.219.3/41146 192.168.219.1/19227 500 0 3 497 0 1996 |
| 119 | 192.168.219.3/41162 192.168.219.1/19227 448 0 2 548 0 1849 |
| 120 | 192.168.219.3/41178 192.168.219.1/19227 441 0 4 554 0 1693 |
| 121 | 192.168.219.3/41192 192.168.219.1/19227 555 4 34 405 0 1341 |
| 122 | 192.168.219.3/43856 192.168.219.2/19225 471 0 3 525 0 2118 |
| 123 | 192.168.219.3/43858 192.168.219.2/19225 541 1 25 430 0 1446 |
| 124 | 192.168.219.3/43872 192.168.219.2/19225 483 0 1 516 0 2044 |
| 125 | 192.168.219.3/43880 192.168.219.2/19225 492 0 0 507 0 2073 |
| 126 | 192.168.219.3/47230 192.168.219.2/19227 581 3 29 385 0 1453 |
| 127 | 192.168.219.3/47242 192.168.219.2/19227 571 2 22 403 0 1292 |
| 128 | 192.168.219.3/47272 192.168.219.2/19227 393 0 0 604 0 1516 |
| 129 | 192.168.219.3/47294 192.168.219.2/19227 575 2 27 393 0 1660 |
| 130 | 192.168.219.3/49716 192.168.219.2/19226 584 1 25 389 0 1582 |
| 131 | 192.168.219.3/49746 192.168.219.2/19226 513 0 0 486 0 2017 |
| 132 | 192.168.219.3/49760 192.168.219.2/19226 560 1 24 412 0 1370 |
| 133 | 192.168.219.3/49766 192.168.219.2/19226 474 0 0 525 0 2121 |
| 134 | 192.168.219.3/54076 192.168.219.1/19226 504 0 1 494 0 1724 |
| 135 | 192.168.219.3/54096 192.168.219.1/19226 490 0 2 507 0 1906 |
| 136 | 192.168.219.3/54114 192.168.219.1/19226 611 3 25 360 0 1560 |
| 137 | 192.168.219.3/54120 192.168.219.1/19226 520 0 1 479 0 2010 |
| 138 | 192.168.219.3/60926 192.168.219.4/19228 527 9 53 408 0 1473 |
| 139 | 192.168.219.3/60930 192.168.219.4/19228 551 0 0 448 0 1951 |
| 140 | 192.168.219.3/60942 192.168.219.4/19228 538 0 0 461 0 2038 |
| 141 | 192.168.219.3/60948 192.168.219.4/19228 511 9 68 295 1 1701 |
| 142 | |
| 143 | 07:37:58 |
| 144 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 145 | 192.168.219.3/34968 192.168.219.4/19230 293 1 226 211 0 755 |
| 146 | 192.168.219.3/34976 192.168.219.4/19230 424 4 36 354 0 1489 |
| 147 | 192.168.219.3/34982 192.168.219.4/19230 552 0 0 446 0 2249 |
| 148 | 192.168.219.3/34988 192.168.219.4/19230 493 4 42 327 0 1715 |
| 149 | 192.168.219.3/38946 192.168.219.4/19229 425 4 37 340 41 1478 |
| 150 | 192.168.219.3/38950 192.168.219.4/19229 465 5 45 335 0 1586 |
| 151 | 192.168.219.3/38970 192.168.219.4/19229 531 5 41 420 0 1863 |
| 152 | 192.168.219.3/38982 192.168.219.4/19229 525 5 41 427 0 1625 |
| 153 | 192.168.219.3/39070 192.168.219.1/19225 576 4 44 374 0 1787 |
| 154 | 192.168.219.3/39098 192.168.219.1/19225 596 6 41 355 0 1782 |
| 155 | 192.168.219.3/39112 192.168.219.1/19225 501 0 3 494 0 1887 |
| 156 | 192.168.219.3/39120 192.168.219.1/19225 511 0 4 483 0 2070 |
| 157 | 192.168.219.3/41146 192.168.219.1/19227 503 0 3 492 0 2068 |
| 158 | 192.168.219.3/41162 192.168.219.1/19227 449 1 3 545 0 1962 |
| 159 | 192.168.219.3/41178 192.168.219.1/19227 445 0 5 546 0 1907 |
| 160 | 192.168.219.3/41192 192.168.219.1/19227 436 4 248 309 0 1208 |
| 161 | 192.168.219.3/43856 192.168.219.2/19225 480 0 0 519 0 2108 |
| 162 | 192.168.219.3/43858 192.168.219.2/19225 534 3 24 437 0 1644 |
| 163 | 192.168.219.3/43872 192.168.219.2/19225 480 0 0 519 0 2068 |
| 164 | 192.168.219.3/43880 192.168.219.2/19225 490 0 0 508 0 2083 |
| 165 | 192.168.219.3/47230 192.168.219.2/19227 561 3 22 411 0 1556 |
| 166 | 192.168.219.3/47242 192.168.219.2/19227 550 2 22 424 0 1485 |
| 167 | 192.168.219.3/47272 192.168.219.2/19227 398 0 0 601 0 1537 |
| 168 | 192.168.219.3/47294 192.168.219.2/19227 551 1 19 427 0 1712 |
| 169 | 192.168.219.3/49716 192.168.219.2/19226 570 1 20 405 0 1712 |
| 170 | 192.168.219.3/49746 192.168.219.2/19226 494 0 0 503 0 2052 |
| 171 | 192.168.219.3/49760 192.168.219.2/19226 547 1 18 431 0 1673 |
| 172 | 192.168.219.3/49766 192.168.219.2/19226 497 0 0 501 0 1983 |
| 173 | 192.168.219.3/54076 192.168.219.1/19226 495 0 4 499 0 1849 |
| 174 | 192.168.219.3/54096 192.168.219.1/19226 485 0 4 508 0 2037 |
| 175 | 192.168.219.3/54114 192.168.219.1/19226 603 5 37 354 0 1671 |
| 176 | 192.168.219.3/54120 192.168.219.1/19226 516 0 1 482 0 2047 |
| 177 | 192.168.219.3/60926 192.168.219.4/19228 543 5 39 412 0 1708 |
| 178 | 192.168.219.3/60930 192.168.219.4/19228 530 0 0 469 0 2096 |
| 179 | 192.168.219.3/60942 192.168.219.4/19228 510 0 0 489 0 2234 |
| 180 | 192.168.219.3/60948 192.168.219.4/19228 565 4 61 367 0 1956 |
| 181 | |
| 182 | An local port and remote port can be specified, and also optionally a count. |
| 183 | Eg printing output every 1 second, and including timestamps (-T) for local |
| 184 | ports 30000-40000 and remote ports 19225-19227: |
| 185 | ./tcpcong -T -L 30000-40000 -R 19225-19227 1 3 |
| 186 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 187 | |
| 188 | 07:39:11 |
| 189 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 190 | 192.168.219.3/39070 192.168.219.1/19225 668 4 32 455 0 1706 |
| 191 | 192.168.219.3/39098 192.168.219.1/19225 692 4 38 424 0 2110 |
| 192 | 192.168.219.3/39112 192.168.219.1/19225 564 0 2 593 0 2291 |
| 193 | 192.168.219.3/39120 192.168.219.1/19225 599 0 4 555 0 2387 |
| 194 | |
| 195 | 07:39:12 |
| 196 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 197 | 192.168.219.3/39070 192.168.219.1/19225 576 3 27 391 0 1525 |
| 198 | 192.168.219.3/39098 192.168.219.1/19225 580 3 36 379 0 1893 |
| 199 | 192.168.219.3/39112 192.168.219.1/19225 474 1 10 512 0 2009 |
| 200 | 192.168.219.3/39120 192.168.219.1/19225 505 1 9 483 0 2022 |
| 201 | |
| 202 | 07:39:13 |
| 203 | LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs |
| 204 | 192.168.219.3/39070 192.168.219.1/19225 546 6 27 418 0 1659 |
| 205 | 192.168.219.3/39098 192.168.219.1/19225 564 4 40 390 0 1937 |
| 206 | 192.168.219.3/39112 192.168.219.1/19225 479 0 3 514 0 2008 |
| 207 | 192.168.219.3/39120 192.168.219.1/19225 515 0 4 479 0 1982 |
| 208 | |
| 209 | The (-u) option can be specified for recording the duration as miroseconds. |
| 210 | Eg printing output every 1 second, and including timestamps (-T) and |
| 211 | microseconds (-u) for local ports 30000-40000 and remote ports 19225-19227: |
| 212 | ./tcpcong -T -u -L 30000-40000 -R 19225-19227 1 3 |
| 213 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 214 | |
| 215 | 07:39:44 |
| 216 | LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 217 | 192.168.219.3/39070 192.168.219.1/19225 600971 3232 38601 509796 0 1843 |
| 218 | 192.168.219.3/39098 192.168.219.1/19225 667184 5585 26285 453575 0 1969 |
| 219 | 192.168.219.3/39112 192.168.219.1/19225 580982 22 1502 569479 0 2210 |
| 220 | 192.168.219.3/39120 192.168.219.1/19225 600280 201 955 550752 0 2327 |
| 221 | |
| 222 | 07:39:45 |
| 223 | LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 224 | 192.168.219.3/39070 192.168.219.1/19225 567189 2029 25966 404698 0 1612 |
| 225 | 192.168.219.3/39098 192.168.219.1/19225 597201 2263 24073 376454 0 1578 |
| 226 | 192.168.219.3/39112 192.168.219.1/19225 500792 846 9297 489264 0 1850 |
| 227 | 192.168.219.3/39120 192.168.219.1/19225 518700 94 749 480171 0 1967 |
| 228 | |
| 229 | 07:39:46 |
| 230 | LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 231 | 192.168.219.3/39070 192.168.219.1/19225 587340 5324 37035 370066 0 1602 |
| 232 | 192.168.219.3/39098 192.168.219.1/19225 532986 5630 31624 345336 0 1319 |
| 233 | 192.168.219.3/39112 192.168.219.1/19225 481936 1129 6244 510235 0 1909 |
| 234 | 192.168.219.3/39120 192.168.219.1/19225 507196 316 6200 485737 0 1957 |
| 235 | |
| 236 | |
| 237 | the ipv6 example with (-u) option can be shown. |
| 238 | Eg printing output every 1 second, and including timestamps (-T) and |
| 239 | microseconds (-u) for local ports 30000-40000 and remote ports 19225-19227: |
| 240 | ./tcpcong.py -T -u -L 30000-40000 -R 19225-19227 1 3 |
| 241 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 242 | |
| 243 | 11:31:55 |
| 244 | LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 245 | fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 876328 0 0 137957 0 235 |
| 246 | fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 757739 0 0 283114 0 590 |
| 247 | fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 855426 0 0 136134 0 231 |
| 248 | fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 695271 0 0 345443 0 606 |
| 249 | |
| 250 | 11:31:56 |
| 251 | LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 252 | fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 913925 0 0 81995 0 92 |
| 253 | fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 785024 0 0 202819 0 777 |
| 254 | fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 920963 0 0 80715 0 111 |
| 255 | fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 765172 0 0 222897 0 734 |
| 256 | |
| 257 | 11:31:57 |
| 258 | LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs |
| 259 | fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 839563 0 0 98313 0 149 |
| 260 | fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 534816 0 0 329683 0 495 |
| 261 | fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 841706 103 2404 91273 0 132 |
| 262 | fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 633320 0 0 286584 0 565 |
| 263 | |
| 264 | |
| 265 | The distribution of congestion status duration can be printed as a histogram |
| 266 | with the -d option and also optionally a count. Eg printing output every |
| 267 | 1 second for microseconds, and including timestamps (-T): |
| 268 | ./tcpcong.py -d -u -T 1 2 |
| 269 | Tracing tcp congestion control status duration... Hit Ctrl-C to end. |
| 270 | |
| 271 | 07:40:12 |
| 272 | |
| 273 | tcp_congest_state = cwr |
| 274 | usecs : count distribution |
| 275 | 0 -> 1 : 0 | | |
| 276 | 2 -> 3 : 0 | | |
| 277 | 4 -> 7 : 11 | | |
| 278 | 8 -> 15 : 10 | | |
| 279 | 16 -> 31 : 25 | | |
| 280 | 32 -> 63 : 58 | | |
| 281 | 64 -> 127 : 117 | | |
| 282 | 128 -> 255 : 2924 |******* | |
| 283 | 256 -> 511 : 16249 |****************************************| |
| 284 | 512 -> 1023 : 15340 |************************************* | |
| 285 | 1024 -> 2047 : 786 |* | |
| 286 | 2048 -> 4095 : 24 | | |
| 287 | 4096 -> 8191 : 7 | | |
| 288 | 8192 -> 16383 : 0 | | |
| 289 | 16384 -> 32767 : 0 | | |
| 290 | 32768 -> 65535 : 1 | | |
| 291 | 65536 -> 131071 : 0 | | |
| 292 | 131072 -> 262143 : 1 | | |
| 293 | |
| 294 | tcp_congest_state = recovery |
| 295 | usecs : count distribution |
| 296 | 0 -> 1 : 0 | | |
| 297 | 2 -> 3 : 0 | | |
| 298 | 4 -> 7 : 1 | | |
| 299 | 8 -> 15 : 0 | | |
| 300 | 16 -> 31 : 2 | | |
| 301 | 32 -> 63 : 9 | | |
| 302 | 64 -> 127 : 28 | | |
| 303 | 128 -> 255 : 895 |****************************** | |
| 304 | 256 -> 511 : 1190 |****************************************| |
| 305 | 512 -> 1023 : 384 |************ | |
| 306 | 1024 -> 2047 : 66 |** | |
| 307 | 2048 -> 4095 : 2 | | |
| 308 | 4096 -> 8191 : 4 | | |
| 309 | 8192 -> 16383 : 2 | | |
| 310 | 16384 -> 32767 : 0 | | |
| 311 | 32768 -> 65535 : 0 | | |
| 312 | 65536 -> 131071 : 0 | | |
| 313 | 131072 -> 262143 : 2 | | |
| 314 | |
| 315 | tcp_congest_state = disorder |
| 316 | usecs : count distribution |
| 317 | 0 -> 1 : 0 | | |
| 318 | 2 -> 3 : 0 | | |
| 319 | 4 -> 7 : 21 |** | |
| 320 | 8 -> 15 : 59 |***** | |
| 321 | 16 -> 31 : 102 |********* | |
| 322 | 32 -> 63 : 256 |************************* | |
| 323 | 64 -> 127 : 409 |****************************************| |
| 324 | 128 -> 255 : 255 |************************ | |
| 325 | 256 -> 511 : 104 |********** | |
| 326 | 512 -> 1023 : 8 | | |
| 327 | |
| 328 | tcp_congest_state = open |
| 329 | usecs : count distribution |
| 330 | 0 -> 1 : 0 | | |
| 331 | 2 -> 3 : 11 | | |
| 332 | 4 -> 7 : 266 | | |
| 333 | 8 -> 15 : 319 | | |
| 334 | 16 -> 31 : 396 |* | |
| 335 | 32 -> 63 : 488 |* | |
| 336 | 64 -> 127 : 695 |** | |
| 337 | 128 -> 255 : 4395 |************* | |
| 338 | 256 -> 511 : 13329 |****************************************| |
| 339 | 512 -> 1023 : 12727 |************************************** | |
| 340 | 1024 -> 2047 : 3327 |********* | |
| 341 | 2048 -> 4095 : 601 |* | |
| 342 | 4096 -> 8191 : 45 | | |
| 343 | 8192 -> 16383 : 3 | | |
| 344 | 16384 -> 32767 : 1 | | |
| 345 | 32768 -> 65535 : 1 | | |
| 346 | |
| 347 | tcp_congest_state = loss |
| 348 | usecs : count distribution |
| 349 | 0 -> 1 : 0 | | |
| 350 | 2 -> 3 : 0 | | |
| 351 | 4 -> 7 : 0 | | |
| 352 | 8 -> 15 : 0 | | |
| 353 | 16 -> 31 : 0 | | |
| 354 | 32 -> 63 : 0 | | |
| 355 | 64 -> 127 : 0 | | |
| 356 | 128 -> 255 : 1 |****************************************| |
| 357 | 256 -> 511 : 1 |****************************************| |
| 358 | 512 -> 1023 : 0 | | |
| 359 | 1024 -> 2047 : 0 | | |
| 360 | 2048 -> 4095 : 0 | | |
| 361 | 4096 -> 8191 : 0 | | |
| 362 | 8192 -> 16383 : 0 | | |
| 363 | 16384 -> 32767 : 0 | | |
| 364 | 32768 -> 65535 : 1 |****************************************| |
| 365 | |
| 366 | 07:40:14 |
| 367 | |
| 368 | tcp_congest_state = cwr |
| 369 | usecs : count distribution |
| 370 | 0 -> 1 : 0 | | |
| 371 | 2 -> 3 : 7 | | |
| 372 | 4 -> 7 : 162 | | |
| 373 | 8 -> 15 : 591 |* | |
| 374 | 16 -> 31 : 462 | | |
| 375 | 32 -> 63 : 351 | | |
| 376 | 64 -> 127 : 441 | | |
| 377 | 128 -> 255 : 4073 |******** | |
| 378 | 256 -> 511 : 19188 |****************************************| |
| 379 | 512 -> 1023 : 16127 |********************************* | |
| 380 | 1024 -> 2047 : 725 |* | |
| 381 | 2048 -> 4095 : 23 | | |
| 382 | 4096 -> 8191 : 3 | | |
| 383 | 8192 -> 16383 : 2 | | |
| 384 | 16384 -> 32767 : 0 | | |
| 385 | 32768 -> 65535 : 4 | | |
| 386 | 65536 -> 131071 : 0 | | |
| 387 | 131072 -> 262143 : 2 | | |
| 388 | |
| 389 | tcp_congest_state = recovery |
| 390 | usecs : count distribution |
| 391 | 0 -> 1 : 0 | | |
| 392 | 2 -> 3 : 0 | | |
| 393 | 4 -> 7 : 3 | | |
| 394 | 8 -> 15 : 16 | | |
| 395 | 16 -> 31 : 22 | | |
| 396 | 32 -> 63 : 37 |* | |
| 397 | 64 -> 127 : 75 |** | |
| 398 | 128 -> 255 : 1082 |******************************* | |
| 399 | 256 -> 511 : 1364 |****************************************| |
| 400 | 512 -> 1023 : 369 |********** | |
| 401 | 1024 -> 2047 : 67 |* | |
| 402 | 2048 -> 4095 : 0 | | |
| 403 | 4096 -> 8191 : 2 | | |
| 404 | 8192 -> 16383 : 0 | | |
| 405 | 16384 -> 32767 : 0 | | |
| 406 | 32768 -> 65535 : 0 | | |
| 407 | 65536 -> 131071 : 0 | | |
| 408 | 131072 -> 262143 : 5 | | |
| 409 | |
| 410 | tcp_congest_state = disorder |
| 411 | usecs : count distribution |
| 412 | 0 -> 1 : 0 | | |
| 413 | 2 -> 3 : 4 | | |
| 414 | 4 -> 7 : 43 |**** | |
| 415 | 8 -> 15 : 107 |*********** | |
| 416 | 16 -> 31 : 145 |*************** | |
| 417 | 32 -> 63 : 312 |********************************* | |
| 418 | 64 -> 127 : 370 |****************************************| |
| 419 | 128 -> 255 : 256 |*************************** | |
| 420 | 256 -> 511 : 101 |********** | |
| 421 | 512 -> 1023 : 8 | | |
| 422 | |
| 423 | tcp_congest_state = open |
| 424 | usecs : count distribution |
| 425 | 0 -> 1 : 0 | | |
| 426 | 2 -> 3 : 21 | | |
| 427 | 4 -> 7 : 359 | | |
| 428 | 8 -> 15 : 516 |* | |
| 429 | 16 -> 31 : 484 |* | |
| 430 | 32 -> 63 : 522 |* | |
| 431 | 64 -> 127 : 818 |** | |
| 432 | 128 -> 255 : 5081 |************* | |
| 433 | 256 -> 511 : 14852 |****************************************| |
| 434 | 512 -> 1023 : 13753 |************************************* | |
| 435 | 1024 -> 2047 : 3224 |******** | |
| 436 | 2048 -> 4095 : 598 |* | |
| 437 | 4096 -> 8191 : 41 | | |
| 438 | 8192 -> 16383 : 0 | | |
| 439 | 16384 -> 32767 : 1 | | |
| 440 | 32768 -> 65535 : 0 | | |
| 441 | 65536 -> 131071 : 0 | | |
| 442 | 131072 -> 262143 : 1 | | |
| 443 | |
| 444 | tcp_congest_state = loss |
| 445 | usecs : count distribution |
| 446 | 0 -> 1 : 0 | | |
| 447 | 2 -> 3 : 0 | | |
| 448 | 4 -> 7 : 0 | | |
| 449 | 8 -> 15 : 0 | | |
| 450 | 16 -> 31 : 0 | | |
| 451 | 32 -> 63 : 0 | | |
| 452 | 64 -> 127 : 1 |****** | |
| 453 | 128 -> 255 : 0 | | |
| 454 | 256 -> 511 : 2 |************* | |
| 455 | 512 -> 1023 : 6 |****************************************| |
| 456 | 1024 -> 2047 : 0 | | |
| 457 | 2048 -> 4095 : 0 | | |
| 458 | 4096 -> 8191 : 0 | | |
| 459 | 8192 -> 16383 : 0 | | |
| 460 | 16384 -> 32767 : 0 | | |
| 461 | 32768 -> 65535 : 1 |****** | |
| 462 | |
| 463 | |
| 464 | USAGE: |
| 465 | ./tcpcong -h |
| 466 | usage: tcpcong [-h] [-L LOCALPORT] [-R REMOTEPORT] [-T] [-d] [-u] |
| 467 | [interval] [outputs] |
| 468 | |
| 469 | Summarize tcp socket congestion control status duration |
| 470 | |
| 471 | positional arguments: |
| 472 | interval output interval, in seconds |
| 473 | outputs number of outputs |
| 474 | |
| 475 | optional arguments: |
| 476 | -h, --help show this help message and exit |
| 477 | -L LOCALPORT, --localport LOCALPORT |
| 478 | trace local ports only |
| 479 | -R REMOTEPORT, --remoteport REMOTEPORT |
| 480 | trace the dest ports only |
| 481 | -T, --timestamp include timestamp on output |
| 482 | -d, --dist show distributions as histograms |
| 483 | -u, --microseconds output in microseconds |
| 484 | |
| 485 | examples: |
| 486 | ./tcpcong # show tcp congestion status duration |
| 487 | ./tcpcong 1 10 # show 1 second summaries, 10 times |
| 488 | ./tcpcong -L 3000-3006 1 # 1s summaries, local port 3000-3006 |
| 489 | ./tcpcong -R 5000-5005 1 # 1s summaries, remote port 5000-5005 |
| 490 | ./tcpcong -uT 1 # 1s summaries, microseconds, and timestamps |
| 491 | ./tcpcong -d # show the duration as histograms |