wireshark

Network protocol analyzer for capturing and inspecting network traffic

brewmacoslinux
Try with needOr install directly
Source

About

Network analyzer and capture tool - without graphical user interface

Commands

tsharkwiresharkdumpcapeditcapmergecapcapinfosrawshark

Examples

Capture packets on default interface and save to file$ tshark -w capture.pcap
Live capture HTTP traffic on eth0 interface$ tshark -i eth0 -f 'tcp port 80' -Y 'http' -V
Read and display packets from saved capture file$ tshark -r capture.pcap -Y 'ip.src == 192.168.1.1'