CompTIA Linux+ (XK0-006)TroubleshootingMedium
A system administrator is troubleshooting a web server that is intermittently slow. They suspect a bottleneck in the network interface card's ability to handle traffic. Which directory in the `/proc` filesystem would provide real-time counters and statistics for network interfaces, including received/transmitted bytes, packets, and errors, without requiring external tools like `ethtool`?
- A`cat /proc/net/dev`
- B`cat /proc/meminfo`
- C`cat /proc/cpuinfo`
- D`cat /proc/sys/net/ipv4/ip_forward`
Show answer & explanationAnswer & explanation
Correct answer: A. `cat /proc/net/dev`
`/proc/net/dev` provides a concise summary of network interface statistics, including received and transmitted bytes, packets, errors, and dropped packets for all active interfaces. This is a quick way to check basic network activity and potential issues directly from the kernel's perspective.
Why the other options are wrong
- B. `/proc/meminfo` provides information about system memory usage, not network statistics.
- C. `/proc/cpuinfo` provides details about the CPU, not network statistics.
- D. `/proc/sys/net/ipv4/ip_forward` shows the status of IP forwarding, not interface statistics.
/proc/net/dev
`/proc/net/dev` is a virtual file in the `/proc` filesystem that provides real-time statistics for all network interfaces on a Linux system, including received and transmitted data.
- Contains metrics like bytes, packets, errors, dropped packets for each interface.
- Does not require specific tools; can be viewed with `cat`.
- Useful for quickly assessing network traffic and basic interface health.
Memory trick: For network `dev`ice stats, check `/proc/net/dev`.