Skip to content

Instantly share code, notes, and snippets.

@Matrixbirds
Last active August 12, 2017 17:42
Show Gist options
  • Save Matrixbirds/dd617bc557a46b572b02a605ab5f3826 to your computer and use it in GitHub Desktop.
Save Matrixbirds/dd617bc557a46b572b02a605ab5f3826 to your computer and use it in GitHub Desktop.
network-dump-recipes
# tcpdump usage recipes:
# tcpdump -i <interface> <BPF: Berkeley Packet Filter> [options]
sudo tcpdump -i lo0 '(host localhost) and (port 4399)' -vvv -tt 4
# watch with pipe chain command
watch -cd 'netstat -tan | head -n2; netstat -tan | sort | egrep 4399'
# netstat usage recipes:
# netstat [options]
netstat -tan | head -n2; netstat -tan | sort | egrep 4399
# trace pid by openfile port
lsof -i :4399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment