Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:07:22+00:00 2026-06-01T16:07:22+00:00

I have an application that has a TCP client and a server. I set

  • 0

I have an application that has a TCP client and a server. I set up the client and server on separate machines. Now I want to measure how much bandwidth is being consumed ( bytes sent and received during a single run of the application). I have discovered that wireshark is one such tool that can help me get this statistic. However, wireshark seems to be GUI dependent. What I wanted was a way to automate the measuring and reporting of this statistic. I dont care about the information about individual packets captured by wireshark. I dont need that information. Is there some way to run wireshark so that all it does is write to a file, the total bytes sent and received between two hosts while the application was running on both ends?

Also, is there a better way to capture this statistic ? Through netstat or /proc/dev/net or any other tool ?

Both my machines have ubuntu 10.04 or later running on them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:07:23+00:00Added an answer on June 1, 2026 at 4:07 pm

    Bro is an appropriate tool to measure connection-oriented statistics. You can either record a trace of your application communication or analyze it in realtime:

    bro -r <trace>
    bro -i <interface>
    

    Thereafter, have a look at the connection log (conn.log) in the same directory for the amount of bytes sent and received by the application. Specifically, you’re interested in the TCP payload size, which conn.log exposes via the columns orig_bytes and resp_bytes. Here is an example:

    bro-cut id.orig_h id.resp_h conn_state orig_bytes resp_bytes < conn.log | head 
    

    which yields the following output:

    192.168.1.102   192.168.1.1     SF      301     300
    192.168.1.103   192.168.1.255   S0      350     0
    192.168.1.102   192.168.1.255   S0      350     0
    192.168.1.103   192.168.1.255   S0      560     0
    192.168.1.102   192.168.1.255   S0      348     0
    192.168.1.104   192.168.1.255   S0      350     0
    192.168.1.104   192.168.1.255   S0      549     0
    192.168.1.103   192.168.1.1     SF      303     300
    192.168.1.102   192.168.1.255   S0      -       -
    192.168.1.104   192.168.1.1     SF      311     300
    

    Each row represents a single connection, transport-layer ports omitted. The last two columns represent the bytes sent by the originator (first column) and responder (second column). The column conn_state represents the connection status. Please refer to the documentation for all possible field values. Some important values are:

    • S0: Connection attempt seen, no reply.
    • S1: Connection established, not terminated.
    • SF: Normal establishment and termination. Note that this is the same symbol as for state S1. You can tell the two apart because for S1 there will not be any byte counts in the summary, while for SF there will be.
    • REJ: Connection attempt rejected.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that has a GUI and TCP server. The TCP server
i have file transfer application (Server-Client) TCP [.net 4] why is backgroundworker gives me
I have two utilities written in C++, TCP/IP server and client that I have
I have a TcpClient application that send a message from client to the server.
I have a client/server application that depends on MS SQL database for backend storage,
I'm using Java to create a client/server application that communicates using TCP. The network
I currently have a client-server application that involves a Silverlight client and a .NET
Just a quick question. I have a network C application (TCP server) which has
I have a File Transfer Application that sends files and folders. (Server - client)
I have a .NET 3.5 server application that usually has about 8 clients. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.