Tracking TCP connections in Linux
I'm analysing a P2P application and would like to track which peer communicates with which other peer and have some estimate of the communication size.

I was wondering whether there is a simple way to gather information about the established connections (ip and ports) and the total amount of data received and sent.

I want to collect the information at regular intervals and then be able to infer what went on, so it should be a simple command line tool (I will be gathering readings from 50+ machines, so ntop is not really an option).
Tracking TCP connections in Linux
===

I'm analysing a P2P application and would like to track which peer communicates with which other peer and have some estimate of the communication size.

I was wondering whether there is a simple way to gather information about the established connections (ip and ports) and the total amount of data received and sent.

I want to collect the information at regular intervals and then be able to infer what went on, so it should be a simple command line tool (I will be gathering readings from 50+ machines, so ntop is not really an option).