1Demonstrations of tcpcong, the Linux eBPF/bcc version. 2 3This tool traces linux kernel's tcp congestion control status change functions, 4then calculate duration of every status and record it, at last prints it as 5tables or histogram, which can be used for evaluating the tcp congestion 6algorithm's performance. 7 8For example: 9 10./tcpcong 11Tracing tcp congestion control status duration... Hit Ctrl-C to end. 12^C 13LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 14192.168.219.3/34968 192.168.219.4/19230 884 12 102 507 0 2721 15192.168.219.3/34976 192.168.219.4/19230 869 12 133 490 0 2737 16192.168.219.3/34982 192.168.219.4/19230 807 0 0 699 0 3158 17192.168.219.3/34988 192.168.219.4/19230 892 16 88 508 0 2540 18192.168.219.3/38946 192.168.219.4/19229 894 13 97 500 0 2697 19192.168.219.3/38950 192.168.219.4/19229 840 10 73 579 1 1840 20192.168.219.3/38970 192.168.219.4/19229 862 17 91 534 0 2339 21192.168.219.3/38982 192.168.219.4/19229 812 13 92 587 0 2102 22192.168.219.3/39070 192.168.219.1/19225 855 7 61 580 0 2826 23192.168.219.3/39098 192.168.219.1/19225 880 8 47 568 0 2557 24192.168.219.3/39112 192.168.219.1/19225 674 2 10 819 0 2867 25192.168.219.3/39120 192.168.219.1/19225 757 1 11 736 0 2978 26192.168.219.3/41146 192.168.219.1/19227 736 1 10 758 0 2972 27192.168.219.3/41162 192.168.219.1/19227 662 2 10 830 0 2889 28192.168.219.3/41178 192.168.219.1/19227 646 2 11 846 0 2858 29192.168.219.3/41192 192.168.219.1/19227 812 9 67 615 0 2204 30192.168.219.3/43856 192.168.219.2/19225 745 1 5 754 0 3067 31192.168.219.3/43858 192.168.219.2/19225 827 4 36 636 0 2130 32192.168.219.3/43872 192.168.219.2/19225 739 0 2 764 0 3035 33192.168.219.3/43880 192.168.219.2/19225 747 0 3 756 0 3144 34192.168.219.3/47230 192.168.219.2/19227 830 4 38 632 0 2554 35192.168.219.3/47242 192.168.219.2/19227 782 3 32 687 0 2136 36192.168.219.3/47272 192.168.219.2/19227 611 1 3 889 0 2629 37192.168.219.3/47294 192.168.219.2/19227 832 3 38 630 0 2631 38192.168.219.3/49716 192.168.219.2/19226 846 4 44 610 0 2562 39192.168.219.3/49746 192.168.219.2/19226 765 0 4 736 0 2998 40192.168.219.3/49760 192.168.219.2/19226 812 2 47 644 0 2273 41192.168.219.3/49766 192.168.219.2/19226 724 0 2 779 0 3106 42192.168.219.3/54076 192.168.219.1/19226 690 1 9 804 0 2939 43192.168.219.3/54096 192.168.219.1/19226 715 2 10 778 0 2974 44192.168.219.3/54114 192.168.219.1/19226 878 6 61 558 0 2742 45192.168.219.3/54120 192.168.219.1/19226 738 0 9 757 0 2959 46192.168.219.3/60926 192.168.219.4/19228 711 11 80 702 0 1870 47192.168.219.3/60930 192.168.219.4/19228 785 0 0 720 0 3325 48192.168.219.3/60942 192.168.219.4/19228 762 0 1 743 0 3342 49192.168.219.3/60948 192.168.219.4/19228 877 11 102 514 0 2654 50 51The example shows all tcp socket's congestion status duration for milliseconds, 52open_ms column is the duration of tcp connection in open status whose cwnd can 53increase; dod_ms column is the duration of tcp connection in disorder status 54who receives disordered packet; rcov_ms column is the duration of tcp 55connection in recovery status who receives 3 duplicated acks; cwr_ms column 56is the duration of tcp connection who receives explicitly congest notifier and 57two acks to reduce the cwnd. the last column chgs prints total status change 58number of the socket. 59 60An interval can be provided, and also optionally a count. Eg, printing output 61every 1 second, and including timestamps (-T): 62./tcpcong -T 1 3 63Tracing tcp congestion control status duration... Hit Ctrl-C to end. 64 6507:37:55 66LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 67192.168.219.3/34968 192.168.219.4/19230 742 15 82 311 0 1678 68192.168.219.3/34976 192.168.219.4/19230 700 12 98 340 0 1965 69192.168.219.3/34982 192.168.219.4/19230 634 0 1 516 0 2471 70192.168.219.3/34988 192.168.219.4/19230 692 12 94 354 0 1941 71192.168.219.3/38946 192.168.219.4/19229 722 12 90 323 0 2006 72192.168.219.3/38950 192.168.219.4/19229 420 7 264 439 1 951 73192.168.219.3/38970 192.168.219.4/19229 724 14 90 323 0 1986 74192.168.219.3/38982 192.168.219.4/19229 686 13 87 365 0 1675 75192.168.219.3/39070 192.168.219.1/19225 653 5 46 446 0 1998 76192.168.219.3/39098 192.168.219.1/19225 667 4 38 440 0 2098 77192.168.219.3/39112 192.168.219.1/19225 606 0 1 543 0 2146 78192.168.219.3/39120 192.168.219.1/19225 492 0 205 453 0 1916 79192.168.219.3/41146 192.168.219.1/19227 583 0 3 564 0 2332 80192.168.219.3/41162 192.168.219.1/19227 536 0 1 613 0 2192 81192.168.219.3/41178 192.168.219.1/19227 499 0 2 649 0 2064 82192.168.219.3/41192 192.168.219.1/19227 622 6 34 488 0 1660 83192.168.219.3/43856 192.168.219.2/19225 555 0 1 593 0 2359 84192.168.219.3/43858 192.168.219.2/19225 618 3 28 502 0 1773 85192.168.219.3/43872 192.168.219.2/19225 558 0 0 592 0 2318 86192.168.219.3/43880 192.168.219.2/19225 580 0 1 569 0 2303 87192.168.219.3/47230 192.168.219.2/19227 646 1 18 485 0 1776 88192.168.219.3/47242 192.168.219.2/19227 634 0 20 495 0 1582 89192.168.219.3/47272 192.168.219.2/19227 463 0 1 687 0 1854 90192.168.219.3/47294 192.168.219.2/19227 636 2 27 486 0 1901 91192.168.219.3/49716 192.168.219.2/19226 646 2 28 475 0 1832 92192.168.219.3/49746 192.168.219.2/19226 583 0 0 567 0 2333 93192.168.219.3/49760 192.168.219.2/19226 628 2 26 495 0 1755 94192.168.219.3/49766 192.168.219.2/19226 558 0 0 592 0 2412 95192.168.219.3/54076 192.168.219.1/19226 581 0 2 567 0 2042 96192.168.219.3/54096 192.168.219.1/19226 554 0 2 594 0 2239 97192.168.219.3/54114 192.168.219.1/19226 685 4 33 427 0 1859 98192.168.219.3/54120 192.168.219.1/19226 611 0 3 537 0 2322 99192.168.219.3/60926 192.168.219.4/19228 681 20 101 347 0 1636 100192.168.219.3/60930 192.168.219.4/19228 616 0 1 532 0 2310 101192.168.219.3/60942 192.168.219.4/19228 607 0 1 543 0 2433 102192.168.219.3/60948 192.168.219.4/19228 597 11 76 293 0 1641 103 10407:37:57 105LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 106192.168.219.3/34968 192.168.219.4/19230 469 9 255 265 0 1305 107192.168.219.3/34976 192.168.219.4/19230 580 11 91 316 0 1916 108192.168.219.3/34982 192.168.219.4/19230 566 0 0 433 0 2092 109192.168.219.3/34988 192.168.219.4/19230 583 9 63 345 0 1871 110192.168.219.3/38946 192.168.219.4/19229 449 16 69 464 0 1425 111192.168.219.3/38950 192.168.219.4/19229 569 10 68 349 0 1848 112192.168.219.3/38970 192.168.219.4/19229 573 20 66 339 0 1839 113192.168.219.3/38982 192.168.219.4/19229 553 9 60 378 0 1483 114192.168.219.3/39070 192.168.219.1/19225 471 3 243 280 0 1279 115192.168.219.3/39098 192.168.219.1/19225 598 4 37 355 0 1717 116192.168.219.3/39112 192.168.219.1/19225 522 0 1 476 0 1816 117192.168.219.3/39120 192.168.219.1/19225 518 0 1 480 0 2031 118192.168.219.3/41146 192.168.219.1/19227 500 0 3 497 0 1996 119192.168.219.3/41162 192.168.219.1/19227 448 0 2 548 0 1849 120192.168.219.3/41178 192.168.219.1/19227 441 0 4 554 0 1693 121192.168.219.3/41192 192.168.219.1/19227 555 4 34 405 0 1341 122192.168.219.3/43856 192.168.219.2/19225 471 0 3 525 0 2118 123192.168.219.3/43858 192.168.219.2/19225 541 1 25 430 0 1446 124192.168.219.3/43872 192.168.219.2/19225 483 0 1 516 0 2044 125192.168.219.3/43880 192.168.219.2/19225 492 0 0 507 0 2073 126192.168.219.3/47230 192.168.219.2/19227 581 3 29 385 0 1453 127192.168.219.3/47242 192.168.219.2/19227 571 2 22 403 0 1292 128192.168.219.3/47272 192.168.219.2/19227 393 0 0 604 0 1516 129192.168.219.3/47294 192.168.219.2/19227 575 2 27 393 0 1660 130192.168.219.3/49716 192.168.219.2/19226 584 1 25 389 0 1582 131192.168.219.3/49746 192.168.219.2/19226 513 0 0 486 0 2017 132192.168.219.3/49760 192.168.219.2/19226 560 1 24 412 0 1370 133192.168.219.3/49766 192.168.219.2/19226 474 0 0 525 0 2121 134192.168.219.3/54076 192.168.219.1/19226 504 0 1 494 0 1724 135192.168.219.3/54096 192.168.219.1/19226 490 0 2 507 0 1906 136192.168.219.3/54114 192.168.219.1/19226 611 3 25 360 0 1560 137192.168.219.3/54120 192.168.219.1/19226 520 0 1 479 0 2010 138192.168.219.3/60926 192.168.219.4/19228 527 9 53 408 0 1473 139192.168.219.3/60930 192.168.219.4/19228 551 0 0 448 0 1951 140192.168.219.3/60942 192.168.219.4/19228 538 0 0 461 0 2038 141192.168.219.3/60948 192.168.219.4/19228 511 9 68 295 1 1701 142 14307:37:58 144LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 145192.168.219.3/34968 192.168.219.4/19230 293 1 226 211 0 755 146192.168.219.3/34976 192.168.219.4/19230 424 4 36 354 0 1489 147192.168.219.3/34982 192.168.219.4/19230 552 0 0 446 0 2249 148192.168.219.3/34988 192.168.219.4/19230 493 4 42 327 0 1715 149192.168.219.3/38946 192.168.219.4/19229 425 4 37 340 41 1478 150192.168.219.3/38950 192.168.219.4/19229 465 5 45 335 0 1586 151192.168.219.3/38970 192.168.219.4/19229 531 5 41 420 0 1863 152192.168.219.3/38982 192.168.219.4/19229 525 5 41 427 0 1625 153192.168.219.3/39070 192.168.219.1/19225 576 4 44 374 0 1787 154192.168.219.3/39098 192.168.219.1/19225 596 6 41 355 0 1782 155192.168.219.3/39112 192.168.219.1/19225 501 0 3 494 0 1887 156192.168.219.3/39120 192.168.219.1/19225 511 0 4 483 0 2070 157192.168.219.3/41146 192.168.219.1/19227 503 0 3 492 0 2068 158192.168.219.3/41162 192.168.219.1/19227 449 1 3 545 0 1962 159192.168.219.3/41178 192.168.219.1/19227 445 0 5 546 0 1907 160192.168.219.3/41192 192.168.219.1/19227 436 4 248 309 0 1208 161192.168.219.3/43856 192.168.219.2/19225 480 0 0 519 0 2108 162192.168.219.3/43858 192.168.219.2/19225 534 3 24 437 0 1644 163192.168.219.3/43872 192.168.219.2/19225 480 0 0 519 0 2068 164192.168.219.3/43880 192.168.219.2/19225 490 0 0 508 0 2083 165192.168.219.3/47230 192.168.219.2/19227 561 3 22 411 0 1556 166192.168.219.3/47242 192.168.219.2/19227 550 2 22 424 0 1485 167192.168.219.3/47272 192.168.219.2/19227 398 0 0 601 0 1537 168192.168.219.3/47294 192.168.219.2/19227 551 1 19 427 0 1712 169192.168.219.3/49716 192.168.219.2/19226 570 1 20 405 0 1712 170192.168.219.3/49746 192.168.219.2/19226 494 0 0 503 0 2052 171192.168.219.3/49760 192.168.219.2/19226 547 1 18 431 0 1673 172192.168.219.3/49766 192.168.219.2/19226 497 0 0 501 0 1983 173192.168.219.3/54076 192.168.219.1/19226 495 0 4 499 0 1849 174192.168.219.3/54096 192.168.219.1/19226 485 0 4 508 0 2037 175192.168.219.3/54114 192.168.219.1/19226 603 5 37 354 0 1671 176192.168.219.3/54120 192.168.219.1/19226 516 0 1 482 0 2047 177192.168.219.3/60926 192.168.219.4/19228 543 5 39 412 0 1708 178192.168.219.3/60930 192.168.219.4/19228 530 0 0 469 0 2096 179192.168.219.3/60942 192.168.219.4/19228 510 0 0 489 0 2234 180192.168.219.3/60948 192.168.219.4/19228 565 4 61 367 0 1956 181 182An local port and remote port can be specified, and also optionally a count. 183Eg printing output every 1 second, and including timestamps (-T) for local 184ports 30000-40000 and remote ports 19225-19227: 185./tcpcong -T -L 30000-40000 -R 19225-19227 1 3 186Tracing tcp congestion control status duration... Hit Ctrl-C to end. 187 18807:39:11 189LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 190192.168.219.3/39070 192.168.219.1/19225 668 4 32 455 0 1706 191192.168.219.3/39098 192.168.219.1/19225 692 4 38 424 0 2110 192192.168.219.3/39112 192.168.219.1/19225 564 0 2 593 0 2291 193192.168.219.3/39120 192.168.219.1/19225 599 0 4 555 0 2387 194 19507:39:12 196LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 197192.168.219.3/39070 192.168.219.1/19225 576 3 27 391 0 1525 198192.168.219.3/39098 192.168.219.1/19225 580 3 36 379 0 1893 199192.168.219.3/39112 192.168.219.1/19225 474 1 10 512 0 2009 200192.168.219.3/39120 192.168.219.1/19225 505 1 9 483 0 2022 201 20207:39:13 203LAddrPort RAddrPort Open_ms Dod_ms Rcov_ms Cwr_ms Los_ms Chgs 204192.168.219.3/39070 192.168.219.1/19225 546 6 27 418 0 1659 205192.168.219.3/39098 192.168.219.1/19225 564 4 40 390 0 1937 206192.168.219.3/39112 192.168.219.1/19225 479 0 3 514 0 2008 207192.168.219.3/39120 192.168.219.1/19225 515 0 4 479 0 1982 208 209The (-u) option can be specified for recording the duration as miroseconds. 210Eg printing output every 1 second, and including timestamps (-T) and 211microseconds (-u) for local ports 30000-40000 and remote ports 19225-19227: 212./tcpcong -T -u -L 30000-40000 -R 19225-19227 1 3 213Tracing tcp congestion control status duration... Hit Ctrl-C to end. 214 21507:39:44 216LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 217192.168.219.3/39070 192.168.219.1/19225 600971 3232 38601 509796 0 1843 218192.168.219.3/39098 192.168.219.1/19225 667184 5585 26285 453575 0 1969 219192.168.219.3/39112 192.168.219.1/19225 580982 22 1502 569479 0 2210 220192.168.219.3/39120 192.168.219.1/19225 600280 201 955 550752 0 2327 221 22207:39:45 223LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 224192.168.219.3/39070 192.168.219.1/19225 567189 2029 25966 404698 0 1612 225192.168.219.3/39098 192.168.219.1/19225 597201 2263 24073 376454 0 1578 226192.168.219.3/39112 192.168.219.1/19225 500792 846 9297 489264 0 1850 227192.168.219.3/39120 192.168.219.1/19225 518700 94 749 480171 0 1967 228 22907:39:46 230LAddrPort RAddrPort Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 231192.168.219.3/39070 192.168.219.1/19225 587340 5324 37035 370066 0 1602 232192.168.219.3/39098 192.168.219.1/19225 532986 5630 31624 345336 0 1319 233192.168.219.3/39112 192.168.219.1/19225 481936 1129 6244 510235 0 1909 234192.168.219.3/39120 192.168.219.1/19225 507196 316 6200 485737 0 1957 235 236 237the ipv6 example with (-u) option can be shown. 238Eg printing output every 1 second, and including timestamps (-T) and 239microseconds (-u) for local ports 30000-40000 and remote ports 19225-19227: 240./tcpcong.py -T -u -L 30000-40000 -R 19225-19227 1 3 241Tracing tcp congestion control status duration... Hit Ctrl-C to end. 242 24311:31:55 244LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 245fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 876328 0 0 137957 0 235 246fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 757739 0 0 283114 0 590 247fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 855426 0 0 136134 0 231 248fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 695271 0 0 345443 0 606 249 25011:31:56 251LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 252fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 913925 0 0 81995 0 92 253fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 785024 0 0 202819 0 777 254fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 920963 0 0 80715 0 111 255fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 765172 0 0 222897 0 734 256 25711:31:57 258LAddrPort6 RAddrPort6 Open_us Dod_us Rcov_us Cwr_us Los_us Chgs 259fe80::bace:f6ff:fe14:d21c/32810 fe80::bace:f6ff:fe43:fe96/19226 839563 0 0 98313 0 149 260fe80::bace:f6ff:fe14:d21c/32812 fe80::bace:f6ff:fe43:fe96/19226 534816 0 0 329683 0 495 261fe80::bace:f6ff:fe14:d21c/32814 fe80::bace:f6ff:fe43:fe96/19226 841706 103 2404 91273 0 132 262fe80::bace:f6ff:fe14:d21c/32816 fe80::bace:f6ff:fe43:fe96/19226 633320 0 0 286584 0 565 263 264 265The distribution of congestion status duration can be printed as a histogram 266with the -d option and also optionally a count. Eg printing output every 2671 second for microseconds, and including timestamps (-T): 268./tcpcong.py -d -u -T 1 2 269Tracing tcp congestion control status duration... Hit Ctrl-C to end. 270 27107:40:12 272 273tcp_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 294tcp_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 315tcp_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 328tcp_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 347tcp_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 36607:40:14 367 368tcp_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 389tcp_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 410tcp_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 423tcp_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 444tcp_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 464USAGE: 465./tcpcong -h 466usage: tcpcong [-h] [-L LOCALPORT] [-R REMOTEPORT] [-T] [-d] [-u] 467 [interval] [outputs] 468 469Summarize tcp socket congestion control status duration 470 471positional arguments: 472 interval output interval, in seconds 473 outputs number of outputs 474 475optional 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 485examples: 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 492