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

Hello to all, I am curious how can i get the stats from a packet capture manually ( instead of going to statistics->summary menu), such as packet count, total bytes, and avg MBit/sec.

It's just an educational question, i don't want to use it in real life.


asked 22 Dec '12, 03:26

EvilDude's gravatar image

accept rate: 0%

Isn't going to statistics->summary the manual way to get the statistics? You can get to the stats from the CLI with capinfos:

[email protected]:~$ capinfos http.cap 
File name:           http.cap
File type:           Wireshark - pcapng
File encapsulation:  Ethernet
Packet size limit:   file hdr: (not set)
Number of packets:   186
File size:           109184 bytes
Data size:           102706 bytes
Capture duration:    26 seconds
Start time:          Tue Jul 26 10:51:38 2011
End time:            Tue Jul 26 10:52:03 2011
Data byte rate:      3996.21 bytes/sec
Data bit rate:       31969.72 bits/sec
Average packet size: 552.18 bytes
Average packet rate: 7.24 packets/sec
SHA1:                b17a997e66f0b3acd41d6a6f8359d756a1b206fb
RIPEMD160:           eedf16dd6f4d25e0dba9d1b9b94cdbd1548dbf04
MD5:                 150ffdaaafab74613510e33ca2d39bd4
Strict time order:   True
[email protected]:~$

But maybe you mean how you can calculate the individual values themselves? Well, that would require libpcap programming to read the files and keep count of all the necessary data and then output the results. So basically you would want to write your own capinfos tool :-)

(have a look at the capinfos source code for more details)

permanent link

answered 22 Dec '12, 03:52

SYN-bit's gravatar image

SYN-bit ♦♦
accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 22 Dec '12, 03:26

question was seen: 2,948 times

last updated: 22 Dec '12, 03:52

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