LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2015, 11:31 AM   #1
salilsurendran
LQ Newbie
 
Registered: May 2015
Posts: 16

Rep: Reputation: Disabled
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?
 
Old 06-02-2015, 11:38 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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.
 
1 members found this post helpful.
Old 06-02-2015, 12:16 PM   #3
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
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)
 
Old 06-02-2015, 01:24 PM   #4
salilsurendran
LQ Newbie
 
Registered: May 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Sefyir View Post
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.
 
Old 06-02-2015, 02:06 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
ethtool ?

or iptraf (does logging)...

Last edited by Habitual; 06-02-2015 at 02:09 PM.
 
Old 06-02-2015, 02:21 PM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
is this part of the same assignment ?:
http://www.linuxquestions.org/questi...se-4175544158/
 
Old 06-26-2015, 11:43 AM   #7
ltwilliams58
LQ Newbie
 
Registered: Jun 2015
Distribution: Mint Ubuntu
Posts: 29

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


Reply

Tags
ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Network Traffic Monitor? DonMegel Linux - Newbie 10 01-14-2015 12:07 PM
how to find amount of network usage in fedora chaitanyasai Linux - Newbie 3 05-21-2012 02:23 AM
Total amount of allocated SHM memory? kresyzig Programming 7 08-28-2010 02:34 AM
tcpdump wont show the correct amount of traffic in single port scan? positrox Linux - Networking 0 08-05-2006 09:04 AM
How to find the amount of data downloaded connected to a network ananthbv Programming 2 10-30-2005 12:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration