find total amount of network traffic on a particular port
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
find total amount of network traffic on a particular port
I am running some tests and have to measure the total amount of traffic on a port during the duration of the test. Is there any tool or utility on Ubuntu that would let me measure that?
ifconfig will show you the total Rx and Tx bytes for an interface. If you run it before and after your test you should have a good estimate of the traffic your test generated.
iftop may work. (cli)
Check the help (push h once started iftop) but you can configure it to show ports and cumulative usage of each connection (along with its port)
iftop may work. (cli)
Check the help (push h once started iftop) but you can configure it to show ports and cumulative usage of each connection (along with its port)
I don't want it displayed on a screen. I would like a command that keep track of the amount of traffic that has passed through the a particular port in a particular time interval so that I could log it in a log file and combine it with my test results.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.