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

How to calculate the total network traffic pass though a Gigabit NIC with high precision?

0

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%


One Answer:

0

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

answered 02 Jul '12, 00:55

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%