What is most efficient way to capture total traffic inbound/outbound amount of source IP? I want to save data about total inbound and outbound traffic amount instead of viewing live data flow that disappears after exiting the live view. I have assigned static IP's for my devices and I want to monitor the data amount like that I log them somewhere in order to make them usable with my applications or web-apps. - D:30MB/U:130MB - D:40MB/U:5MB

I feel that it's not very efficient if I log all the data which will be huge and sum them with my app by parsing. I think it consumes a lot of CPU when having a big history, but if there's some kind of command set I can use to write specific IP's inbound and outbound amount to file, that would be pretty good I think.


1 Answer 1


Try to use tcpdump like:

tcpdump -i iface# -w traffic_dump.raw host or host where iface# is corresponding interface on which you want to sniff the traffic - if you don't want to provide it, then just skip -i iface# in parameters.

After that, you can analyze offline your taffic_dump.raw file on various software, like tcpdump -r or wireshark, etc.

You must log in to answer this question.