State impact, narrow the cause, choose a reversible mitigation, and verify recovery. Every command should answer a question. These examples assume a Linux systemd host; iostat and pidstat come from sysstat, and some observations need privileges.
Troubleshooting questions
How do you troubleshoot CPU, memory, and filesystem problems?
CPU: compare runnable work and per-CPU/thread use with available CPU capacity, affinity, and quotas. Memory: check available memory, pressure, swap activity, OOM events, and cgroup limits. Filesystem: check the actual mount, bytes, inodes, quotas, permissions, and read-only state. Then correlate the constrained resource with the failing request.
uptime
vmstat 1 5
pidstat -u -r -d 1 5
free -h
df -h /var
df -i /var
findmnt -T /var
journalctl -k --since '-10 min' --no-pager
Most first vmstat activity rates cover time since boot; use subsequent interval samples for current activity. Process/memory fields are instantaneous. vmstat documents the distinction.
How do you troubleshoot disk usage in Linux?
Compare df -h PATH with df -i PATH, then scope du -xhd1 PATH to the affected filesystem. If df exceeds reachable file usage, investigate deleted-open files with sudo lsof +L1, mount-hidden data, permissions, and filesystem accounting. Establish file ownership/retention before cleanup, then test application writes and usage growth. Filesystem answers.
How do you troubleshoot high load average?
Linux load includes runnable tasks and tasks in uninterruptible sleep; it is not CPU percentage. Compare vmstat runnable/blocked counts, per-core utilization, task states, and I/O latency. High load with idle CPU and D-state tasks points toward blocked work; it does not identify the particular dependency. CPU quotas can also constrain a service while the host looks idle.
ps -eo pid,ppid,stat,wchan:24,comm
iostat -xz -y 1 5
cat /proc/pressure/cpu
cat /proc/pressure/io
Pressure Stall Information measures time lost to resource contention where the kernel supports it. It helps distinguish busy resources from tasks actually stalled by contention. See PSI.
How do you troubleshoot high iowait?
Iowait is CPU accounting for idle time with outstanding I/O; it does not prove a particular disk is saturated. Inspect block-device latency/queues with iostat -xz -y 1 5, process I/O with pidstat -d, D-state waits, kernel errors, and remote filesystem behavior. Compare with baseline and request latency; mitigate the supported cause and verify queues drain.
await includes queueing and service time. %util near 100% can indicate saturation for a serial device, but is not a universal capacity threshold for parallel SSDs, RAID, or virtual storage. See iostat.
How do you troubleshoot slow networking in Linux?
Separate DNS time, connection establishment, TLS, and application response time. Inspect interface errors/drops, socket state/retransmissions, routes, and both ends of the connection; compare an unaffected client or destination. A healthy ping leaves TCP/application failures possible. Networking questions and packet checks.
Systems internals, vmstat, netcat, shell scripting: how do you use them together?
Use vmstat 1 5 to separate runnable work, blocked tasks, swapping, and CPU activity. Use nc -vz -w 3 HOST PORT to test a bounded TCP connection; netcat flags differ by implementation. A script can collect timestamped checks with timeouts and exit codes. Netcat success proves neither TLS validation nor application correctness.
Only three server metrics: which and why?
For a general serving host, choose CPU saturation, memory pressure, and filesystem free capacity. They answer whether work can run, memory contention threatens progress, and storage allocation can continue. Explain scope: CPU pressure/queueing is stronger than utilization alone, bytes can miss inode exhaustion, and a network appliance needs different priorities.
If "three metrics" means exactly three numeric time series, propose CPU PSI some avg10, memory PSI some avg10 where supported, and available bytes on the critical filesystem. State the blind spots, including inode limits and network saturation; there is no universally sufficient trio.
What metrics would you monitor for a newly built service?
Traffic, error rate, latency percentiles, and saturation are the four golden signals. Add queue age/completion/correctness for async work, dependency behavior, and results split by route and release version. Define success from the user operation, then alert on meaningful impact and sustained risk. See Google's monitoring chapter.
Low free memory: is that automatically a problem?
No. Linux uses spare RAM for caches. free -h's available estimate, sustained reclaim/swap activity, memory PSI, and OOM/cgroup evidence are more useful together. Nonzero swap usage alone does not establish present thrashing. See free.
More Linux troubleshooting interview drills
Work through these original ESRE scenarios, with Kyle Rankin's Linux Journal series as source reading:
- High load diagnosis: explain a slow API with idle CPU and blocked tasks. Linux Journal original.
- Local network diagnosis: distinguish a loopback-only listener from a working remote service. Linux Journal original.
- Remote network diagnosis: isolate a failing address family and distinguish DNS, TCP, TLS, and HTTP. Linux Journal original.
These are 2010 articles. For present-day diagnosis, distinguish Linux load from CPU utilization, use ip and ss for address/route/socket checks, and treat traceroute timeouts as missing replies rather than proof of a broken hop. The networking guide covers those distinctions.
Give a complete answer in 45 seconds
Use this original practice scenario: after a rollout, the API's p99 latency triples and blocked tasks rise; host CPU still has idle time.
"I would confirm which requests and versions are affected, compare the changed version with the control, then inspect blocked-task waits and storage/dependency latency. If the rollout is generating excess I/O and rollback is compatible, I would stop expansion and roll back a small group. I would verify request success, latency, and backlog drain under normal demand. Falling load alone is insufficient because the average decays slowly."
The scenario establishes correlation, not a proven root cause. A restart without a recovery check is an incomplete answer. For longer output-based practice, use the existing Linux failure scenarios. Next: coding and scripting.