LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   find total amount of network traffic on a particular port (https://www.linuxquestions.org/questions/linux-networking-3/find-total-amount-of-network-traffic-on-a-particular-port-4175544278/)

salilsurendran 06-02-2015 11:31 AM

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?

suicidaleggroll 06-02-2015 11:38 AM

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.

Sefyir 06-02-2015 12:16 PM

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)

salilsurendran 06-02-2015 01:24 PM

Quote:

Originally Posted by Sefyir (Post 5371076)
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.

Habitual 06-02-2015 02:06 PM

ethtool ?

or iptraf (does logging)...

schneidz 06-02-2015 02:21 PM

is this part of the same assignment ?:
http://www.linuxquestions.org/questi...se-4175544158/

ltwilliams58 06-26-2015 11:43 AM

http://serverfault.com/questions/195...ddress-on-port appears to contain a solution


All times are GMT -5. The time now is 10:42 AM.