Network bandwidth consumption

Hi,
I am trying to figure out how do I measure the network bandwidth consumption from within an Imp. I would like to measure the actual number of bytes received by an Imp and the number of bytes sent out by an imp. Does somebody have any tricks up there sleeves that they can share of point me out or explain how to o this.

Thx
S

The only way to find out every last byte is to sit upstream of the router and tcpdump the connection, then post-process the pcap file I guess.

The numbers shown when your imp disconnects in the IDE just cover the user data - all the maintenance, encryption, TCP and IP overhead are not included.