Linux diagnostics becomes difficult when a machine is slow, intermittently unavailable, or failing only under workload. A high load average, kernel warning, or full disk can look like the cause, but any one observation may be a symptom of a deeper dependency. Reliable troubleshooting asks which resource is constrained, when the condition started, what changed, and whether independent signals support the same explanation.
The commands below are diagnostic examples, not outputs from a live system or a tested remediation. Availability and formatting depend on distribution, permissions, kernel features, and installed utilities. Start with read-only observation, preserve relevant evidence, and obtain authorization before altering services, storage, or network settings on production hosts.
Locate the failure in time before changing anything
Record the user’s symptom, affected service, first observed time, host, workload, and recent changes. A web request timing out is different from the machine being unable to boot, and a batch job running slowly is different from the kernel being blocked on storage. Check whether the problem affects all applications or just one process, network route, filesystem, or tenant. A precise initial scope reduces the temptation to “fix” the loudest dashboard alert.
On a systemd-based host, journalctl -b examines entries for the current boot where the journal is accessible. journalctl -b -1 can show the previous boot if persistent or otherwise available records exist. Filtering by unit and time window can isolate application startup, crashes, or service failures. A missing prior-boot journal does not prove that the system had no earlier errors; logs may be volatile, rotated, inaccessible, or forwarded elsewhere.
Use dmesg or equivalent kernel journal information to find driver, hardware, memory, or filesystem observations. Kernel messages should be interpreted with their time source and boot context. An error reported before the user noticed the slowdown may be relevant, but age alone does not establish causality. Preserve the raw warning and supporting counters before resetting a service or clearing an error counter.
Separate CPU demand, load, and actual pressure
Load average is not simply a percentage of CPU utilization. On Linux it includes runnable tasks and certain tasks waiting in uninterruptible states, so a high value can reflect storage waits as well as CPU competition. Interpret it against available processors, workload patterns, and the processes involved. A short spike during a known backup may be normal; sustained pressure with user-facing latency deserves a closer examination.
Commands such as uptime, top, ps, and pidstat where installed can show process activity and trends. Compare CPU utilization, run-queue behavior, and blocked tasks. If pressure stall information is enabled, /proc/pressure/cpu, /proc/pressure/memory, and /proc/pressure/io offer useful observations of tasks stalled on those resources. Linux kernel documentation distinguishes some and full pressure states; the values must be interpreted for the exact supported kernel.
Do not kill a high-CPU process merely because it ranks first. It may be performing necessary work or responding to another fault. Identify process owner, arguments, recent deployment, queue backlog, and downstream dependencies. A single brief sample is less useful than a time series that overlaps the reported slowdown.
Memory symptoms are not the same as low free RAM
Linux deliberately uses memory for caches, so a small “free” number is not a diagnosis. Inspect available memory, swapping behavior, major page faults, OOM-killer events, and process or cgroup memory limits. A container may experience an out-of-memory kill while the host still has available RAM because it reached its own cgroup limit. Conversely, system-wide pressure can slow many services without an immediate OOM event.
free -h, vmstat, and relevant cgroup files can help establish the current state. Correlate the data with service logs and workload allocation. If swap activity is high, investigate whether it reflects temporary memory pressure, long-lived inactive pages, storage latency, or a mis-sized workload. Disabling swap globally as a first response can make the failure more abrupt rather than solving its cause.
For recurring memory problems, monitor growth by process and time, identify allocations that track increased workload, and reproduce cautiously in a controlled environment. “Memory leak” should be a hypothesis supported by retained-object or resident-set evidence, not a synonym for high memory utilization.
Disks can be full, slow, or unreliable in different ways
Use df -h to inspect filesystem capacity and df -i where supported to check inode exhaustion. A filesystem may have remaining bytes but no available inodes, or its reserved space and quotas may affect a particular user. du can help find directory consumption but may be expensive on large production trees; choose targeted paths and avoid scanning sensitive data without authorization.
Performance symptoms require other evidence. iostat can show throughput, queueing, and latency indicators when installed, while kernel logs may reveal I/O errors or device resets. High utilization on one disk is not necessarily a problem if the workload has predictable response time; growing latency and blocked processes are stronger signals of impact. Storage virtualization and network-backed volumes can hide the actual bottleneck beneath the guest’s visible device.
Before deleting data or running destructive repair commands, preserve the relevant logs, determine backup status, and identify the filesystem’s supported recovery tool. A disk alert may require hardware intervention, while a full filesystem may require application-level retention changes rather than indiscriminate removal of log files.
Investigate sockets, routes, and name resolution separately
A service may listen locally but remain unreachable to clients because of firewall policy, routing, DNS, load balancing, or an authentication problem. Use ss -lnt to list listening TCP sockets, and apply additional supported flags when process identity or UDP data is needed. A listening socket does not prove that the application can complete requests; it shows that a socket was present at the time of inspection.
Inspect addresses and routes with ip addr and ip route, test the intended DNS lookup with the organization’s resolver tools, and distinguish name resolution from TCP connection and application response. A successful ping is not proof that an HTTPS application is healthy; ICMP may also be disabled while the application works. Compare one successful client path to one failing path using the same destination and time window.
Effective use of Linux network diagnostic commands requires an explicit hypothesis at each layer; one successful command does not prove end-to-end application connectivity.
For a suspected CPU bottleneck, compare the application’s latency with runnable tasks, processor utilization, throttling statistics and the timeframe of the complaint. A high CPU percentage during a legitimate batch job may be normal; a container subject to a tight CPU quota may experience throttling even when the physical host has unused cycles. A system-wide load average should not be interpreted as a percentage of CPU consumed, particularly when storage-waiting tasks are included. Describe the exact measurement window and whether the workload is steady or bursty.
For a suspected network outage, record the interface, destination address, protocol, route and expected DNS name before changing firewall rules. A failed ping can reflect filtered ICMP while an authorized TCP application remains reachable. Conversely, a successful ping does not prove the application port, certificate negotiation or identity service works. Test the business protocol using tools approved in the environment, and collect connection or service logs that can distinguish path failure from application rejection. Avoid broad packet captures containing sensitive payloads unless justified and access-controlled.
For a service that restarts repeatedly, investigate the journal entries immediately before its exit, the process exit status, configured resource limits, dependencies and recent package or configuration changes. Do not increase the restart limit until the cause is understood, because repeated startup may stress an already degraded dependency or overwrite useful logs. If configuration correction is required, preserve the previous file, perform the smallest controlled change and verify that the application handles a representative transaction after restart. A process listed as running is not the same as a service functioning for its users.
Correlate system signals into a reproducible explanation
Suppose a web server slows down after an application release. The journal shows no crash, but request latency rises while I/O pressure and storage response time increase. A new logging configuration may be writing many synchronous events, or an unrelated backup may be saturating the shared volume. Both explanations fit part of the evidence. Compare the time series, recent changes, affected processes, and storage path before deciding whether to adjust an application setting or storage capacity.
A second case involves a process that repeatedly restarts. The service manager may display a restart loop, but root cause may be a missing secret, failed DNS lookup, invalid permission, resource limit, or bad application configuration. Review the application’s actual failure message and the dependency it expected. Merely raising the restart limit hides the symptom and can increase resource pressure.
When a finding is confirmed, record the condition, source of evidence, attempted reversible change, observed result, and any remaining uncertainty. Investigations should preserve the distinction between a command that was suggested and a command that was actually executed and verified. That record helps future operators avoid repeating guesses and prevents an attractive dashboard explanation from becoming an unsupported diagnosis.
Good Linux troubleshooting combines time, process, memory, I/O, network, and service evidence into one coherent account. It does not require the most commands; it requires enough independent observations to justify the next safe action.