CompTIA Linux+ (XK0-006)TroubleshootingEasy

A system administrator is investigating a Linux server that is experiencing intermittent network connectivity issues. They suspect a problem with the network interface card (NIC) driver or hardware. Which of the following commands would best provide detailed statistics about network interface errors, such as dropped packets and collisions?

  1. A`ip a`
  2. B`ethtool -S eth0`
  3. C`ss -s`
  4. D`netstat -rn`
Show answer & explanation

Correct answer: B. `ethtool -S eth0`

`ethtool -S <interface>` provides detailed statistics specific to the network interface, including error counts like rx_dropped, tx_errors, and collisions, which are crucial for diagnosing hardware or driver issues. Other commands provide general network information but not these specific error counters.

Why the other options are wrong

  • A. `ip a` shows IP addresses and interface status but not detailed error statistics.
  • C. `ss -s` shows summary statistics for sockets, which is not relevant for NIC hardware errors.
  • D. `netstat -rn` displays the routing table, not detailed interface error statistics.

ethtool -S

The `ethtool -S` command is used to query or control network driver and hardware settings, specifically displaying detailed statistics for a specified network interface.

  • Requires root privileges to modify settings, but not to view statistics.
  • Provides granular counters for receive/transmit errors, dropped packets, collisions, etc.
  • Useful for diagnosing physical layer or driver issues on a network interface.

Memory trick: Errors are 'S'erious, so use 'S'tatistics from 'eth'tool.

More Troubleshooting questions