Scenario
A production Linux server becomes unresponsive, monitoring alerts show CPU usage persistently above 90%.
Symptoms
- SSH connections are slow or time out
- Application response times increase
toporuptimeshows high load averages
Diagnosis
- SSH into the server using a management IP or out-of-band management (e.g., iDRAC).
- Run
top -b -n1, pressPto sort by CPU, identify the top consumer. - Use
ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu | headfor confirmation. - Examine the process:
ls -l /proc/<PID>/exeandstrace -p <PID> -c -S time 2>&1to trace syscalls. - Use
perf topif installed for performance profiling. - Check system logs:
journalctl -u <service> --since "5 minutes ago".
Commands
- Gather process info:
ps -p <PID> -o pid,ppid,user,start,etime,%cpu,%mem,cmd - Analyze threads:
top -H -p <PID>orps -L -p <PID> - Memory map:
pmap -x <PID> - Stack trace:
pstack <PID>orgdb -batch -ex "thread apply all bt" -p <PID> - Adjust priority with
nice:renice +10 <PID>(lower CPU contention)
Risk Controls
- Confirm the process is not critical before killing it.
- Use
kill -STOP <PID>to pause the process instead of terminating. - If the process is orphaned or zombie, check the parent; restart the parent service if needed.
- For non-core services, use
systemctl restart <service>instead of kill. - Avoid running
perforstraceduring peak hours as they add overhead.
Rollback
- If a process is killed by mistake, immediately restart the service:
systemctl start <service>or manual command. - If priority adjustment causes other issues, restore defaults with
renice 0 <PID>. - If failover affected cluster health, switch to standby node.
Verification
- Run
topand confirm CPU usage is normal (e.g., <50%). - Check application health endpoint:
curl -I http://localhost:8080/health. - Monitor logs for new errors:
tail -f /var/log/syslog | grep -i error. - Verify response times with load testing tools.
When to Submit an OpsGlobal Ticket
- Unable to determine the process origin or ownership.
- The process repeatedly restarts or cannot be killed (e.g., stuck in D state).
- Root cause analysis requires code review or kernel-level investigation.
- Patches or configuration changes need change management approval.
Use cases
Useful for teams handling DevOps issues and needing a clear troubleshooting and delivery workflow.
Problem background
A step-by-step guide for SREs to diagnose and resolve high CPU load issues in production Linux environments, with safety controls and escalation criteria.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.