tcpretrans-perf(8)


NAME

   tcpretrans - show TCP retransmits, with address and other details. Uses
   Linux ftrace.

SYNOPSIS

   tcpretrans [-hsp]

DESCRIPTION

   This traces TCP retransmits that are sent by the system  tcpretrans  is
   executed  from,  showing  address, port, and TCP state information, and
   sometimes the PID (although usually not, since retransmits are  usually
   sent  by  the  kernel  on  timeout  events). To keep overhead low, only
   tcp_retransmit_skb() kernel calls are traced (this does not trace every
   packet).

   This  was  written  as  a  proof of concept for ftrace, for older Linux
   systems, and without kernel  debuginfo.  It  uses  dynamic  tracing  of
   tcp_retransmit_skb(),  and  reads /proc/net/tcp for socket details. Its
   use of dynamic tracing and  CPU  registers  is  an  unstable  platform-
   specific workaround, and may require modifications to work on different
   kernels and platforms. This would be better written using a tracer such
   as  SystemTap,  and will likely be rewritten in the future when certain
   tracing features are added to the Linux kernel.

   When   -l   is   used,   this   also   uses    dynamic    tracing    of
   tcp_send_loss_probe() and a register.

   Currently  only  IPv4  is  supported,  on  x86_64. If you try this on a
   different architecture, you'll  likely  need  to  adjust  the  register
   locations (search for %di).

   Since this uses ftrace, only the root user can use this tool.

REQUIREMENTS

   FTRACE  and  KPROBE  CONFIG, tcp_retransmit_skb() kernel function.  You
   may have these already have these on recent  kernels.  And  Perl.   TCP
   tail loss probes were added in Linux 3.10.

OPTIONS

   -h     Print usage message.

   -s     Include kernel stack traces.

   -l     Include TCP tail loss probes.

EXAMPLES

   Trace TCP retransmits
          # tcpretrans

   TIME   Time of retransmit (may be rounded up to the nearest second).

   PID    Process  ID  that  was on-CPU. This is less useful than it might
          sound, as it may usually be 0, for the kernel,  for  timer-based
          retransmits.

   LADDR  Local address.

   LPORT  Local port.

   --     Packet type: "R>" for retransmit, and "L>" for tail loss probe.

   RADDR  Remote address.

   RPORT  Remote port.

   STATE  TCP session state.

OVERHEAD

   The  CPU  overhead  is  relative to the rate of TCP retransmits, and is
   designed to be low as this does not  examine  every  packet.  Once  per
   second the /proc/net/tcp file is read, and a buffer of retransmit trace
   events is retrieved from the kernel and processed.

SOURCE

   This is from the perf-tools collection.

          https://github.com/brendangregg/perf-tools

   Also look under the examples  directory  for  a  text  file  containing
   example usage, output, and commentary for this tool.

OS

   Linux

STABILITY

   Unstable - in development.

AUTHOR

   Brendan Gregg

SEE ALSO

   tcpdump(1)





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.