brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: ethtool -S shows the error counters that the Linux network card keeps itself

Linux
~/tips/tip-linux-ethtool-s-nic-counters

ethtool -S eth0 | grep -iE 'err|drop|miss|crc'

Read the card's own statistics to spot CRC errors, missed packets and other link trouble.

The kernel keeps a few general counters per interface, but the network card and its driver usually keep many more. ethtool -S prints all of them.

ethtool -S eth0 | grep -iE 'err|drop|miss|crc'

The full output can run to a hundred lines or more, and the names differ per driver, so I’d filter it. Counters like rx_crc_errors point at a bad cable, a bad port or interference. rx_missed_errors or rx_no_buffer_count mean the card received packets it had no room for, which is a load problem rather than a cable problem.

A counter on its own says little, because it counts since the driver loaded. What matters is whether it is still going up. Run the command twice with a minute in between, or let watch do it:

watch -d -n 5 "ethtool -S eth0 | grep -iE 'err|drop|miss|crc'"

The -d highlights whatever changed since the last run, so a growing error count jumps out.

Not every counter means trouble. Some drivers count things like flow control frames or multicast under names that sound alarming. Look up the exact name in the documentation of your driver before you replace hardware. Virtual interfaces such as bridges often have no statistics at all, and ethtool then says the operation is not supported.

Further reading: ethtool(8) manual page

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link