I am wondering how to track network traffic on my Mac. Just like an activity monitor does, showing bytes / packets of inputs and outputs.
I know this is a bit vague, but I'm not sure the best place to start.
EDITOR: I want to do this in code, and not use the existing piece of software.
source
share