This project originates from Brendan Gregg's perf-tools project.
It traces for outgoing TCP retransmits while listening for tcp_retransmit_skb and tcp_send_loss_probe kernel functions. And then it writes all the retransmits with corresponding addresses, TCP ports and other relevant data taken from /proc/net/tcp to a file or to Elasticsearch. The output methods are implemented as modules so the tcptracer's functionality can be easily extended without any intervention into the main code.
The project is structured for building the RPM-package with SystemD unit-file. But you can easily use it as a standalone application on any recent Linux box with Ftrace enabled. Just copy everything from the src folder and you're done.
Build the RPM package
- Edit the SPEC-file if needed.
- Run build-rpm.sh script.
Run the application
- Edit config.ini for your needs.
- If you have installed RPM-package with SystemD unit-file:
systemctl start tcptracer
- If you are using the standalone application:
Anyone and everyone is welcome to contribute.
Found a bug or want to request a new feature? Please submit an Issue on this repo.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.