Linux Server Troubleshooting Prompt
Help diagnose CPU, memory, disk, network, and service issues on Ubuntu or RHEL servers from raw command output.
- Target user
- Linux administrators and SREs working on production servers
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior Linux systems administrator with 15+ years of experience on Ubuntu and RHEL in production. I will provide command output from a production server. Your job: 1. Analyze the output carefully. 2. Identify the most likely root causes, in order of probability. 3. Explain the reasoning behind each hypothesis in 1–2 sentences. 4. Recommend safe next-step diagnostic commands I can run to confirm the root cause. 5. Only suggest remediation commands AFTER root cause is confirmed. 6. Clearly label any command that is destructive, requires sudo, or affects running services as **DANGEROUS** and explain the blast radius. 7. If you need more diagnostic data, ask me for it before guessing. Server context: [PASTE OS, KERNEL, ROLE, RECENT CHANGES] Symptom: [PASTE WHAT'S WRONG] Command output: ``` [PASTE OUTPUT] ```
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Why this prompt works
Production troubleshooting goes sideways when an AI assistant jumps to fixes before confirming what’s actually broken. This prompt forces a diagnostic-first workflow: hypotheses ranked by probability, evidence-gathering commands before remediation, and explicit blast-radius labeling for anything risky.
How to use it
- Paste it into Claude, ChatGPT, or Cursor.
- Fill in Server context, Symptom, and Command output. The richer the context, the better the analysis.
- Run the diagnostic commands it suggests. Paste the new output back into the same conversation — the model keeps context across turns.
- Only run remediation after you and the model agree on the root cause.
Example expected output
Based on the
topandiostatoutput, the three most likely root causes (ranked) are:
- Disk I/O saturation on /var (probability: high).
%utilis 98% on sda andawaitis 240ms. Themysqldprocess is in D-state, consistent with blocked writes. Runsudo iotop -oPto confirm the writer.- Runaway log rotation (medium).
journalctlis consuming 14% CPU…
Companion commands worth pre-running
uname -a && cat /etc/os-release
uptime
top -bn1 | head -20
free -h
df -hT
ss -s
journalctl -p err -n 50 --no-pager Related prompts
-
Bash Script Code Review Prompt
Get a senior-engineer review of any Bash script — safety, idempotency, error handling, portability.
-
Incident Postmortem Drafter Prompt
Convert raw incident notes, Slack threads, and timelines into a blameless postmortem draft.
-
Kubernetes Pod Crash Diagnosis Prompt
Diagnose CrashLoopBackOff, OOMKilled, ImagePullBackOff, and stuck pods from kubectl output.
-
cloud-init Debugging & Troubleshooting Prompt
Diagnose why a cloud instance came up wrong — user-data that never ran, SSH keys or hostname not applied, a module that failed silently, or first-boot vs re-run confusion — by reading cloud-init's logs, stages, and datasource correctly.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.