Courses / Cloud and DevOps Interview Prep / Chapter 2
Module 2 · Linux, scripts and Git · Chapter 2 of 13
Linux and CLI Troubleshooting: Evidence, Isolation and Reversible Fixes
No prerequisites. Next up: Scripts and Git for Safe Change.
Part 1 · First evidence and scope
Scope before action
A page goes off at night: the orders API returns errors and nobody is sure why. On a Linux host the first ten minutes go to gathering evidence, not to changing things.
Triage is the work of deciding what is wrong and how bad it is, before you fix anything; in an outage it means restoring service first and finding the root cause after. Its raw material is evidence: output from the machine that you can read, repeat and share. A guess like "it is probably the database" is a hypothesis. A log line that says the database refused a connection is evidence.
Start with three scoping questions. What changed: a deploy, a config edit, a certificate expiry, a traffic spike? One host or many: if only one of four identical hosts fails, suspect the host; if all four fail, suspect something they share. Since when: the first bad minute usually lines up with a change.
The answers set the blast radius, the part of the system the fault touches. A small blast radius lets you take one host out of service and look at it calmly. A large one calls for the fastest safe mitigation, such as rolling back the last change, with the digging done afterwards.
Until you know the scope, use read-only commands: they show state and change none. Restarting a process destroys its memory, its open connections and often the very evidence you were after. A restart is a mitigation you choose on purpose, not a reflex.