Show network interface packet and error counters with netstat
Build a paste-ready command, then review its compatibility and effects before running it.
read-onlyno known side effects Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsnetstatnetstat must be installed and available on PATH.
Version supportnetstat Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsKernel Interface tableRepresentative successful output; values vary with the selected target and system state.
Known errorsnetstat: command not foundnetstat is missing or is not available on PATH.
Verifynetstat -iThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01netstatCommandRuns the netstat stage of this one-liner.
02-iOptionDisplays network interface packet and error counters.
Example output
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP TX-OK TX-ERR TX-DRP
enp1s0 1500 884210 0 12 642991 0 0
wg0 1420 19342 0 0 18104 0 0
Illustrative output — exact values vary by system and data.
Official sources
Related commands