I need to get a table updated with the exchanged bytes (Rx and/or Tx) for each ESTABLISHED TCP connection on a linux machine (well, at least, a list of connections (port ranges), thus not actually all)
My dream would be to extend 'netstat' and have these counters as additional columns. But where to find these infos? Maybe this is available in the kernel ? /proc? *nix tool? Should I stick to libpcap?
Hints: What I CAN'T do is to start a tcpdump for each connections. What I WOULD avoid is having to run this something as root (well, sudo can be discussed)
Thank you for all your inputs...