This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi,

I am using a Windows PC. I would like to calculate the total network traffic pass though a Gigabit NIC between time t1 and t2. In my case, accuracy is very important. I don't want to miss any packet. And the network speed during t1-t2 is >900Mbps.

Is it possible to use tshark/tcpdump/dumpcap/Winpcap to calculate the total network traffic for a Gigabit NIC with high accuracy?

Assuming that a user sent a 1GB file through the NIC to TCP port 7000, and I use tshark/tcpdump/dumpcap/Winpcap to capture the network traffic and dump it to a pcap file. After that, if I use wireshark to analyze the pcap file and calculate the total network traffic sent to TCP port 7000, am I able to get 1GB exactly?

Some users from other forums told me that the speed of disk I/O will become the bottleneck in my test. The server may not be able to write the pcap file fast enough to disk.

Actually the packets' contents and the pcap file are not important to me. I just want to calculate the total network traffic.

I am looking for a software which can:

  1. check the packet size when a packet pass through a NIC
  2. record the packet size, and then add it to a "cumulative network traffic" variable
  3. turn to the next packet, without recording the previous packet's contents to a pcap file.
  4. no need to write to disk

Is tshark/tcpdump/dumpcap/Winpcap able to perform these functions with high accuracy? If not, what software should I use?

Thanks.

asked 30 Jun '12, 09:25

Patrick_L's gravatar image

Patrick_L
6113
accept rate: 0%


Can't you just query the traffic counters on the interface e.g. by using WMI?

permanent link

answered 02 Jul '12, 00:55

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×832
×146
×89
×72

question asked: 30 Jun '12, 09:25

question was seen: 5,666 times

last updated: 02 Jul '12, 00:55

p​o​w​e​r​e​d by O​S​Q​A