Overview
Process listing is essential for performance tuning and killing stuck jobs. Core tools are ps, top, and the friendlier htop.
Understand USER, PID, %CPU, %MEM, and STAT columns.
Implementation
ps aux shows all processes. top refreshes live—press M for memory sort, P for CPU. pgrep -a nginx finds PIDs by name. systemctl status shows service processes.
Use kill -15 PID before kill -9.
When implementing guidance from Show Running Processes in Linux terminal, start in a controlled environment that mirrors production versions of operating systems, runtimes, and network policies. Capture a baseline before changes: export configs, snapshot VMs, or tag releases in source control so rollback stays straightforward if behavior regresses.
Document prerequisites, expected outcomes, and verification steps in a short runbook. Automated checks—smoke tests, health endpoints, or query validations—catch regressions early when platforms receive patches. Security belongs in every workflow: apply least privilege, rotate secrets, and review audit logs after deployment.
If results differ across machines, compare environment variables, permission models, time zones, and regional settings. Intermittent issues often trace to caching layers, stale DNS, or duplicated services bound to the same port.
Example
ps aux --sort=-%mem | head
htop
pgrep -af java
sudo lsof -i :8080
Tips
- Install htop via package manager.
- Containers show host PIDs with proper namespaces context.
- atop logs historical CPU.
- strace for deep debugging only on non-prod.
- Re-verify after reboots, certificate renewals, or failover exercises.
- Align monitoring and alerts with the failure modes described in this guide.
- Keep vendor documentation links handy for breaking changes between versions.
- Pair automation with a manual spot check during initial production rollout.