The Need for Network Diagnostics
When troubleshooting network performance issues on a Linux server—such as dropped packets, unusually high latency, or suspected network congestion—system administrators often turn to heavy tools like tcpdump or iftop. While these tools are excellent for deep packet inspection, they are often overkill when you simply need a rapid, high-level overview of how much data a specific network interface is pushing.
The ip command (which replaced the legacy ifconfig utility) includes a powerful statistical flag that allows you to instantly view detailed transmission metrics, error rates, and packet drops for every network adapter on the system.
Using the ip -s link Command
To view the raw network statistics for all interfaces on your server, open your terminal and run the following command:
ip -s link
The -s flag stands for “statistics.” When combined with the link object, the command outputs a highly detailed block of data for each interface (e.g., eth0, wlan0, lo).
Understanding the Output
For each interface, you will see two primary rows of statistics: RX (Receive / Inbound traffic) and TX (Transmit / Outbound traffic).
RX: bytes packets errors dropped missed mcast
12543234 15234 0 0 0 345
TX: bytes packets errors dropped carrier collsns
8934521 11432 0 0 0 0
- bytes / packets: The total amount of data successfully processed by the interface since the server last booted.
- errors: The number of corrupted or malformed packets received. A consistently rising number here usually indicates a failing hardware cable, a bad switch port, or severe electromagnetic interference.
- dropped: The number of perfectly healthy packets that the Linux kernel purposefully discarded because the receive buffer was completely full (indicating the server is overwhelmed and cannot process data fast enough).
Targeting a Specific Interface
If your server has dozens of virtual network interfaces (e.g., Docker containers or VPN tunnels), running the command against all of them is messy. You can append the name of a specific interface to isolate the output.
To check the statistics for eth0 only, run:
ip -s link show eth0
Continuous Monitoring with watch
If you are actively diagnosing an ongoing issue, you don’t want to spam the Enter key to re-run the command over and over. You can combine it with the watch command to create a live, real-time dashboard that updates every 2 seconds:
watch -n 2 ip -s link show eth0
This allows you to stare at the dropped or errors columns in real-time as you attempt to reproduce the network fault.