DevOps, SRE & Cloud Interview · Live Troubleshooting · Lesson 1 of 2
Linux triage: 'the server is slow'
The most common practical prompt in DevOps/SRE loops is a live scenario: 'a server is slow — debug it.' Interviewers grade the method — walking the resources in order and narrating hypotheses — not memorized flags. Have a fixed first minute.
The first 60 seconds
uptime— load averages: is there pressure, and is it rising or falling?dmesg -T | tail— kernel events: OOM-killer, disk errors, network flaps.top/htop— which process; CPU user vs system vs iowait.free -h— memory and swap: swapping thrashes everything.df -handiostat -xz 1— disk full and I/O saturation.ss -s— socket/connection pressure.
- Services:
systemctl status app(state, restarts, last log lines) andjournalctl -u app --since '10 min ago'for the service's logs. - Processes:
ps auxto inspect;killsends SIGTERM (graceful) —kill -9(SIGKILL) is the last resort because the process cannot clean up. - Frame it with USE: for each resource (CPU, memory, disk, network) check Utilization, Saturation, Errors — the checklist that guarantees no blind spots.
Narrate the funnelSay the hypothesis before each command: 'Load is 20 but CPU is mostly idle — that smells like processes blocked on I/O, so I'm checking
iostat.' A silent candidate typing commands scores far worse than one reasoning out loud with the same commands.Disk-full liars
df -h says space is fine but writes fail → check inodes (df -i). You deleted a huge log but space did not return → a process still holds the file open (lsof +L1); restart it. Both are beloved interview curveballs.◆ Lock it in
- Have a fixed first minute:
uptime → dmesg → top → free → df/iostat → ss. - High load + idle CPU = suspect iowait; check
iostatand disk saturation. systemctl status+journalctl -ufor services; narrate hypotheses out loud (USE method).
Feynman drill — say it out loudTalk through your first 60 seconds on a slow server, naming which resource each command rules in or out.
Step 1 rate your confidence · Step 2 pick your answer
Load average is 25 but top shows the CPU 90% idle. What is the strongest first hypothesis?
Step 1 — how sure are you?