I'm trying to find a way to get the number of bytes transferred from a network interface in the last 24 hours (or any other timeframe), excluding HTTP traffic.
I've come across several threads like this one, but this just gives me one flat number -- optimally, I'd like to get separate numbers for each protocol used.
Can you give me some pointers on how I could achieve this? I'm not looking for software that can do this, I'm looking for code. (Though of course, if the software is open source, I can dig around in it)