Linux troubleshooting interviews test how candidates move from a reported symptom to a defensible diagnosis. Strong candidates establish impact, preserve useful evidence, distinguish competing explanations, and choose a proportionate recovery step. Knowing a command is not enough: they should explain what its output can prove, what remains uncertain, and how they would validate recovery without creating another incident.
This guide to 100+ Linux Troubleshooting Interview Questions and Answers contains 120 questions across beginner, intermediate, and experienced levels. It covers failed services, boot problems, CPU and memory pressure, storage faults, networking, access controls, containers, and incident coordination. The emphasis is diagnostic reasoning and safe recovery, rather than a general Linux command catalogue or routine administration checklist.
How can recruiters detect AI-assisted cheating, deepfakes, and impersonation during Linux troubleshooting interviews?
A Linux troubleshooting interview may ask a candidate to interpret a service failure, explain high load with low CPU use, or choose the next safe test when a filesystem becomes read-only. A polished command list is less useful if the candidate cannot connect observations to hypotheses, account for operational risk, or explain how recovery will be verified. Unauthorized real-time assistance can hide those gaps.
Sherlock AI helps recruiters detect potential AI-assisted cheating, deepfakes, candidate impersonation, and unauthorized real-time assistance during Linux troubleshooting interviews.
Pair interview-integrity checks with a small, role-specific incident scenario. Change one observation, such as a healthy host-wide memory reading alongside a container OOM event, and ask the candidate to revise the diagnosis. Review suspicious signals in context rather than treating a signal alone as proof of misconduct.
Linux Troubleshooting Interview Questions
Select questions that match the role and operational environment. State the Linux distribution, init system, kernel and tool versions, service impact, and available access. Ask what evidence the candidate would collect before making a change, and what result would support or weaken the proposed explanation.
Linux Troubleshooting Interview Questions for Beginners
Start with bounded symptoms, basic service and log inspection, process state, disk capacity, and connectivity. These questions assess whether a candidate can gather useful observations without confusing a symptom with its cause.
How do you begin troubleshooting a Linux host without making the incident worse?
How do you identify the affected host, operating system and running kernel?
How do you establish when an incident started and what changed?
A command fails: how do you capture its exit status and error output correctly?
How do you investigate a command-not-found error?
A script exists but will not execute: what do you check?
How do you troubleshoot a permission-denied error on a file path?
How do you check whether a Linux service has failed?
How do you find the relevant logs for one systemd service?
How do you inspect errors from the current and previous boot?
A service is running but users cannot use it: what do you test next?
How do you check whether a process is listening on the expected port?
How do you distinguish a local connection failure from a remote network problem?
How do you check an interface's address and link state?
How do you investigate a missing or incorrect default route?
A hostname fails but an IP address works: how do you troubleshoot DNS?
Why can ping fail while a web application still works?
How do you investigate an HTTP error without disabling TLS verification?
How do you check whether clock skew is contributing to an incident?
How do you investigate a full filesystem?
How can a filesystem run out of space when it still has free bytes?
Why can df and du report different disk usage?
How do you check which filesystem and mount options apply to a path?
How do you investigate a read-only filesystem error safely?
How do you find a process consuming CPU?
What does a high load average tell you, and what does it not tell you?
How do you interpret low free memory without assuming a memory leak?
How do you check whether swapping is affecting an application?
How do you investigate a process that appears stuck?
What does a zombie process mean during troubleshooting?
How do you check whether a process was killed by the OOM killer?
How do you inspect process arguments and environment without leaking secrets?
How do you troubleshoot an unexpectedly empty or missing log?
A scheduled job works manually but fails automatically: what do you compare?
How do you investigate a missing shared library error?
How do you check whether a disk or filesystem error is in kernel logs?
How do you decide between restarting a service and continuing diagnosis?
How do you verify that a remediation actually restored service?
What information should a useful Linux incident handoff contain?
How do you build a safe, reproducible troubleshooting test?
Linux Troubleshooting Interview Questions for Intermediate
Explore incidents that cross service, resource, storage, network, and security boundaries. Ask the candidate to explain tool assumptions, privilege requirements, and why one test is more informative than another.
A systemd service repeatedly restarts: how do you find the original failure?
How do you troubleshoot a systemd start timeout or dependency failure?
How do you investigate systemd unit changes that appear to be ignored?
How do you diagnose a service that works in a shell but fails under systemd?
How do you troubleshoot a boot that stops in emergency mode?
How do you investigate a slow boot without assuming blame output identifies the root cause?
How do you diagnose a systemd timer that did not run when expected?
How do you investigate missing journal history after reboot?
How do you distinguish CPU saturation from CPU throttling?
How do you diagnose high load with low CPU utilization?
How do you investigate sustained I/O latency without trusting one utilization number?
How do you distinguish a memory leak from useful cache growth?
How do you troubleshoot a cgroup memory limit when the host has free RAM?
How do you diagnose file-descriptor exhaustion in one process?
How do you investigate a process that cannot create new threads or processes?
How do you use strace safely to investigate a blocked application?
How do you investigate a service crash using a core dump?
How do you diagnose deleted files that still consume disk space?
How do you distinguish filesystem capacity, inode and quota failures?
How do you investigate a filesystem that will not unmount?
How do you troubleshoot a failed mount without running a blind repair?
How do you diagnose an LVM filesystem that did not grow with its logical volume?
How do you troubleshoot an NFS mount that intermittently hangs?
How do you isolate DNS search-domain, NSS and resolver differences?
How do you troubleshoot a TCP connection timeout versus an immediate refusal?
How do you investigate packet loss with interface counters and packet capture?
How do you diagnose an MTU or path-MTU problem?
How do you investigate TLS certificate errors while preserving verification?
How do you troubleshoot SSH authentication without weakening server security?
How do you distinguish Unix permissions from SELinux or AppArmor denials?
How do you investigate firewall rules without flushing the firewall?
How do you troubleshoot a container that cannot reach a service the host can reach?
How do you investigate a container OOM kill or repeated restart?
How do you diagnose DNS failures that occur only inside containers?
How do you troubleshoot package-manager locks or interrupted updates safely?
How do you investigate a binary that fails after a library or OS update?
How do you diagnose a service's growing log volume without deleting evidence?
How do you troubleshoot certificate or token failures caused by clock problems?
How do you compare a working host and a failing host without exposing secrets?
How do you turn a one-time fix into a verified preventive action?
Linux Troubleshooting Interview Questions for Experienced
Use these scenarios to assess incident leadership and difficult production judgment. Strong answers weigh user impact, competing hypotheses, evidence quality, diagnostic cost, recovery options, and data protection.
How do you lead diagnosis when many Linux services degrade simultaneously?
How do you distinguish a shared dependency failure from unrelated host symptoms?
How do you design a low-overhead evidence collection plan during an outage?
How do you investigate intermittent latency that disappears during manual testing?
How do you diagnose a noisy neighbor on a shared Linux host?
How do you use pressure stall information to explain workload contention?
How do you investigate container CPU throttling despite low node-wide CPU usage?
How do you distinguish global OOM, cgroup OOM and userspace memory-pressure actions?
How do you investigate reclaim or swap thrashing without hiding the cause?
How do you diagnose NUMA-related performance problems?
How do you investigate storage latency across the application, filesystem and device layers?
How do you respond to filesystem corruption while protecting recoverable data?
How do you diagnose a storage stack with inconsistent capacity or device identity?
How do you investigate thin-provisioning exhaustion before extending the wrong layer?
How do you diagnose persistent D-state tasks during a storage or network-filesystem incident?
How do you investigate a kernel panic or unexpected reboot?
How do you plan safe evidence collection from an apparently hung kernel?
How do you troubleshoot a host that cannot boot after a kernel update?
How do you diagnose boot failures involving encrypted volumes or initramfs?
How do you investigate a service failure caused by systemd sandboxing?
How do you diagnose DNS latency across applications, local caches and upstream resolvers?
How do you investigate connection failures caused by ephemeral-port or connection-tracking pressure?
How do you diagnose asymmetric routing or reverse-path filtering problems?
How do you investigate TCP retransmissions without assuming packet loss is the only cause?
How do you troubleshoot a load-balanced service when only some requests fail?
How do you diagnose network problems across container namespaces and host networking?
How do you investigate a Kubernetes node under resource or filesystem pressure?
How do you investigate a suspected Linux security incident while preserving evidence?
How do you troubleshoot an access failure after an identity-provider or group change?
How do you investigate stale credentials or certificate rotation failures without revealing secrets?
How do you diagnose cascading failures caused by retries and resource exhaustion?
How do you distinguish an application deadlock from slow external dependencies?
How do you investigate file-descriptor leaks without simply increasing limits?
How do you troubleshoot a regression that appears only after several days of uptime?
How do you decide whether to fail over, roll back or repair in place?
How do you validate a recovery when basic health checks pass but users still fail?
How do you investigate a performance regression after a security patch?
How do you design a rollback-safe production diagnostic experiment?
What makes a Linux incident postmortem technically useful and blameless?
How would you explain an unresolved Linux incident and the next diagnostic step?
Linux Troubleshooting Interview Questions and Answers
These answers follow the question bank in the same order and begin with direct responses candidates can adapt in an interview. Commands are illustrative, not instructions to run against an unknown production host. Use authorized targets, preserve secrets and evidence, account for diagnostic overhead, and obtain the appropriate approval before disruptive recovery or security-sensitive changes.
Linux Troubleshooting Interview Questions and Answers for Beginners
The beginner answers demonstrate a safe investigation order, explain what common observations mean, and connect any proposed remediation to a concrete recovery check.
1. How do you begin troubleshooting a Linux host without making the incident worse?
I first confirm the affected host, user-visible symptom, business impact and my authority to investigate. I ask whether another responder is already changing the system, then agree on one incident timeline and a safe communication channel. A slow application is a symptom, not permission to reboot its server.
I preserve a small baseline: UTC time, uptime, recent service errors, resource usage and the exact failing operation. Read-only commands are preferable, but even a recursive disk scan can overload failing storage. I therefore choose narrow queries, short sampling windows and protected output locations with available space.
My next step is a testable hypothesis, such as “requests fail because the service cannot open its configuration,” followed by the least intrusive observation that distinguishes it from alternatives. Before any change, I state the expected result, rollback and stop condition. Recovery is confirmed with the original user operation, not merely a clean command exit.
2. How do you identify the affected host, operating system and running kernel?
I verify identity before interpreting logs or proposing commands. Hostnames alone are insufficient when machines are rebuilt, cloned or accessed through a container. I compare the hostname with the approved inventory, instance identifier and expected environment, without posting sensitive identifiers into a public incident channel.
Bash command
os-release identifies the installed userspace distribution, while uname -r reports the running kernel release and uname -m its machine architecture. An installed kernel package is not proof that the host booted into it. In a container, the operating-system file can describe the image while the kernel is shared with its host.
I also record the affected application's version and whether this is a VM, container or physical host. This prevents applying a Debian-specific package command or a newer systemd option to an incompatible system. If the identity disagrees with the ticket, I stop changes and resolve that mismatch first.
3. How do you establish when an incident started and what changed?
I establish the last known successful operation, first observed failure and first alert separately. An alert can lag the actual failure, and a user report may describe an older intermittent problem. I record time zones and clock uncertainty before correlating hosts.
On a systemd host, I inspect a narrow journal window around the suspected start, then widen it if the first failure is outside that window. Deployment records, configuration revisions, package-manager history and infrastructure change records provide candidate changes. File modification times or shell history alone are incomplete evidence: timestamps can be preserved, and another user or automation may have made the change.
I build a short sequence of observations and mark hypotheses explicitly. For example, a deployment preceding connection errors makes it worth comparing listeners and configuration, but does not establish causation. An authorized rollback or controlled reproduction can strengthen the explanation; a timestamp coincidence cannot. I retain the original evidence even if a quick mitigation restores service.
4. A command fails: how do you capture its exit status and error output correctly?
I save the exit status immediately because the next command replaces $?. I also capture standard error separately from normal output; the error text often identifies the failing layer. This Bash pattern assumes an existing private writable diagnostic directory and an approved, safe-to-repeat command:
Bash command
The command name is a placeholder, not a utility to install. Using an if also prevents an expected failure from being lost to a surrounding set -e policy. I check that redirections themselves succeeded: a full filesystem can prevent the command from starting.
A nonzero status must be interpreted using that program's documentation; it is not always an operational failure. In Bash, a pipeline normally reports its final command's status. I avoid adding tee during diagnosis unless I deliberately capture PIPESTATUS immediately or account for pipefail. Output is redacted before sharing.
5. How do you investigate a command-not-found error?
I distinguish “the shell cannot locate the command” from “the located program cannot run.” In Bash, a missing command normally produces status 127; that is different from an application starting and reporting its own error.
Bash command
Here tool_name is the failing command. I check spelling and case, whether it belongs to an installed package or an activated language environment, and whether the failure occurs only under cron, a service or a different account. type -a can reveal that an interactive success actually uses an alias or function unavailable elsewhere.
If the trusted executable exists, I compare its directory with the failing process's PATH and test its documented absolute path when safe. I do not add the current directory or an untrusted directory to PATH. Installation or configuration changes should use approved packages and normal change controls. Finally, I repeat the original operation under the original account and execution context.
6. A script exists but will not execute: what do you check?
I start with the exact error. Permission denied, bad interpreter, exec-format error and no-such-file errors point to different causes, even when the script itself exists. For a trusted script, these inspections do not execute its contents:
Bash command
I check execute permission, directory traversal permissions, the shebang's interpreter path, Unix versus CRLF line endings and a possible noexec mount. A missing interpreter can produce “No such file or directory” for an existing script. For a known Bash script, bash -n ./job.sh checks shell syntax without running commands, but does not prove runtime correctness.
I repair the specific deployment defect through the approved workflow and retest as the intended user. Running everything with root, changing all permissions or invoking an interpreter merely to evade an intentional noexec policy is not a troubleshooting fix.
7. How do you troubleshoot a permission-denied error on a file path?
I identify the account performing the failing operation and what it is trying to do: read a file, modify it, create a sibling or remove it. These operations require different permissions. A readable file can still be inaccessible if a parent directory lacks search permission.
Bash command
namei is commonly supplied by util-linux and getfacl by the ACL package; availability varies. I inspect the relevant parent directories' ACLs too, including the ACL mask, and check symlink destinations. My own id is only a starting point: a long-running service may have different groups or a private filesystem view.
If ordinary modes and ACLs permit access, I examine SELinux/AppArmor audit evidence and service sandbox settings with authorized log access. I fix the narrow ownership, group, ACL or policy mismatch rather than making the path world-writable. Verification repeats the exact operation as the affected identity and confirms that unrelated users did not gain access.
8. How do you check whether a Linux service has failed?
On a systemd-managed host, I inspect both the human-readable state and the service's result. I use the actual unit name; distributions may name the same daemon differently.
Bash command
A failed state indicates a recorded service failure, but inactive can mean intentionally stopped or a successful one-shot job. Conversely, active does not prove that requests succeed. I compare the exit result, timestamps and recent unit logs with the symptom, and check whether a restart loop is hiding short-lived failures.
systemctl --failed helps identify related failures, not necessarily their cause. User services require the corresponding --user context. Status and logs may expose secrets, and complete log access can require approved privileges. I preserve the failure evidence before restarting or clearing failed state, then validate the identified dependency, configuration or startup issue rather than treating a restart as the diagnosis.
9. How do you find the relevant logs for one systemd service?
I select the exact unit, boot and incident time range instead of searching all system logs for a familiar error word. On a systemd host, this example shows the latest 200 matching entries from a short recent window:
Bash command
I replace the unit and time window with the incident's actual values. A line limit is useful for triage but can omit the original failure, so I inspect earlier matching records when a restart or retry is already underway. I retain informational context rather than filtering only error priority.
If nothing appears, I verify the instance name, user versus system manager and journal-reading privileges. The application may write to its own files, a container logging system or a separate journal namespace. I correlate request identifiers and process start times without assuming every message from that unit belongs to the same invocation. Sensitive payloads are removed from shared excerpts.
10. How do you inspect errors from the current and previous boot?
On a systemd host I first determine which boots are actually retained, then inspect the relevant boot rather than assuming a reboot preserved all evidence.
Bash command
0 selects the current boot in the normal local query, and -1 the previous retained boot. The warning filter also includes more severe priorities, but priority filtering can hide important preceding information. I widen the severity and time scope around a suspicious event. Adding -k limits the query to kernel messages when that is the layer under investigation.
An absent previous boot is not evidence that it was healthy: journaling may have been volatile, retention may have removed it, or my account may lack access. I seek centralized logs or console records next. Before rebooting again, I preserve relevant current evidence and document the uncertainty in the timeline.
11. A service is running but users cannot use it: what do you test next?
A running process proves only that something is alive. I translate the complaint into a concrete request, then test the request path in stages: local listener, application response, dependency access, proxy or load balancer, and the user's network path. I use approved read-only health checks with short timeouts, not a transaction that creates real orders or payments.
If a local request fails, I inspect application logs, the bound address and readiness conditions. If it succeeds locally but fails remotely, I compare DNS answers, address family, routing, access controls and proxy behavior. A response from the wrong virtual host can look healthy while the intended hostname is broken.
I also distinguish liveness from readiness: a service may accept connections while its database pool is exhausted. On systemd, the meaning of “started” depends on the service type and its readiness integration. The next diagnostic step follows the first failing boundary; I do not restart a healthy backend because the front-end path is failing.
12. How do you check whether a process is listening on the expected port?
I inspect the expected transport, port and network namespace. With iproute2, a TCP listener check can be narrow and numeric:
Bash command
I replace 8443 with the application's configured port. A listener on 127.0.0.1 is reachable only through loopback in that namespace; a wildcard or specific interface address has different reachability. An IPv6 listener does not automatically prove IPv4 acceptance because dual-stack behavior depends on socket settings. For UDP, I inspect ss -lunp; UDP does not use TCP's LISTEN handshake semantics.
Process attribution may require approved elevated privileges, so missing owner details are not proof of an ownerless socket. A host-level query may also miss a listener inside a container namespace. I compare the socket with the deployed configuration and expected process, then perform an application-level request. A listening port alone cannot demonstrate TLS correctness, authentication success or a healthy dependency.
13. How do you distinguish a local connection failure from a remote network problem?
I compare the same request from progressively wider locations: inside the service's execution context, from the host using its intended interface, and from an affected client. The destination hostname, port, protocol, address family and authentication should remain equivalent; otherwise I may be testing different services.
A failure on loopback suggests a listener or application problem, although a service intentionally bound only to another address will not answer there. Success on the host but failure from a client shifts attention toward routing, access controls, proxies or the return path. An immediate refusal and a timeout are useful distinctions, but neither alone identifies the responsible device.
For HTTPS, I preserve the hostname and certificate verification when directing a test to a known backend; curl's --resolve can do this without editing DNS. I use short timeouts and record the resolved address and response. I stop at the first reproducible difference, gather evidence on both sides of that boundary, and avoid indiscriminate firewall changes.
14. How do you check an interface's address and link state?
I inspect link state and addressing separately with iproute2. An administratively enabled interface can still lack carrier, while an address can remain configured on a disconnected interface.
Bash command
eth0 is a placeholder; interface names vary by distribution and hardware. I check the expected interface, IPv4/IPv6 address, prefix length and scope. Link-local-only addressing may explain why nearby communication works but the intended remote service does not. For virtual interfaces, an UNKNOWN operational state is not automatically a fault.
I compare error and drop counters across a short interval because cumulative totals do not establish a current incident. If the address is missing, I inspect the configured network manager's DHCP or static-profile logs rather than assigning an arbitrary address. Any approved repair must account for remote-access risk. I verify the restored address, route and actual application connection without unnecessarily cycling the interface.
15. How do you investigate a missing or incorrect default route?
I check the route to the actual failed destination, not just whether a line named default exists. With iproute2, these read-only queries provide a starting point:
Bash command
The documentation address is a placeholder for the real destination; route lookup does not send a probe packet. I examine the selected interface, gateway and source address. A host can reach a directly connected network without any default route, and a more specific route can override its default. IPv4 and IPv6 must be considered separately.
If the result is unexpected, I inspect policy-routing rules and the relevant tables, along with VPN, DHCP or network-manager changes. I compare against the approved configuration rather than inventing a gateway. A route change can cut off SSH, so a repair requires an authorized rollback plan and appropriate console access. Verification includes the intended connection and the management path.
16. A hostname fails but an IP address works: how do you troubleshoot DNS?
I first ensure the comparison is valid: connecting to an IP can bypass hostname-based routing or break HTTPS certificate matching. A transport connection to an IP succeeding is evidence of reachability, not proof that only DNS is wrong.
On a glibc-based system, I test the normal name-service path:
Bash command
The hostname is a placeholder. Where systemd-resolved is actually used, resolvectl status and resolvectl query reveal selected links, servers and lookup results. A direct DNS tool can then compare the configured resolver's answer, but it may bypass /etc/hosts and other NSS sources that the application uses.
I check spelling, search domains, VPN-specific DNS, address-family differences and whether only one client or resolver is affected. I retain timeout, NXDOMAIN and other response distinctions instead of calling all failures “DNS down.” The fix targets the incorrect record, routing or resolver configuration; verification uses both normal application resolution and the original request, without permanently hard-coding an address.
17. Why can ping fail while a web application still works?
Ping tests ICMP echo behavior, not the application's TCP, UDP or HTTP path. A firewall can drop echo requests while permitting HTTPS, and a host or router may rate-limit ICMP replies. Therefore, ping failure alone does not prove that the web server is unavailable.
I compare the actual destination addresses and address families too: the browser and ping might use different IPv4/IPv6 addresses, and a browser may use a proxy. If I use ping, I bound the test, for example ping -c 3 -W 2 host.example.invalid with iputils, replacing the placeholder hostname. Raw-socket permissions or local ICMP policy can also affect the tool itself.
The decisive check is a bounded request to the intended application, with TLS verification and normal routing preserved. Conversely, a successful ping proves neither that the web port is listening nor that authentication and dependencies work. I report ping as one observation and avoid requesting broad ICMP or firewall changes simply to make a diagnostic command succeed.
18. How do you investigate an HTTP error without disabling TLS verification?
I separate DNS, connection, TLS and HTTP outcomes. An HTTP status is received after a successful HTTP exchange; certificate verification failure occurs earlier and is not fixed by ignoring certificates. For an approved read-only endpoint:
Bash command
The hostname and path are placeholders. I capture curl's exit status immediately as well. By default, curl can exit successfully after receiving HTTP 404 or 500, so I interpret the status separately. A 401/403 points toward access or policy, while a 5xx requires checking which proxy or application generated it; the code is a starting point, not a root cause.
For TLS errors, I verify hostname, validity dates, clock and trust chain, using an approved CA bundle for a private CA when appropriate. I do not use --insecure. Verbose output can expose credentials and headers, so any deeper capture is restricted and redacted.
19. How do you check whether clock skew is contributing to an incident?
I compare the failing host's UTC time with an approved trusted reference, then inspect its actual synchronization service. A local time-zone display difference is not necessarily clock skew.
Bash command
The second command applies to systemd systems. It summarizes clock and synchronization state, but a synchronization service being enabled does not guarantee a small current offset. On hosts using chrony, I inspect chronyc tracking and source status; on systemd-timesyncd, I use its supported status and journal interfaces instead. Tool availability and access policies vary.
I correlate an observed offset with certificate validity, token acceptance, scheduled tasks or cross-host log ordering. The time skew must be large enough and in the right direction to explain the symptom. I correct the approved synchronization configuration rather than abruptly setting a production clock by hand. Verification checks synchronization stability and repeats the original authentication or application request, while preserving notes about any unreliable earlier timestamps.
20. How do you investigate a full filesystem?
I identify the filesystem containing the failing path rather than assuming the root filesystem is full. On a GNU/Linux host:
Bash command
I replace the example path with the actual destination. The first query shows filesystem capacity and type; the second checks inode availability. I compare the error with available blocks, quotas and mount state before deciding that deleting data will help.
Next I inspect known high-growth directories using a narrowly scoped du -x -h --max-depth=1 with GNU coreutils. This still traverses files and can be expensive, so I avoid a whole-server scan during storage distress. Logs, temporary output, failed retention and unexpected mounts are candidate explanations, not automatic deletion targets.
With the owner, I choose an approved retention action, move eligible data to verified capacity, or extend the correct storage layer. I preserve incident logs and never blindly remove database files. Verification includes free capacity, growth rate and a successful application write through its normal workflow.
21. How can a filesystem run out of space when it still has free bytes?
Free bytes are only one allocation requirement. A filesystem with a finite inode supply can exhaust its inodes through millions of small files while retaining substantial block capacity. A user's or project's quota can also prevent allocation even though filesystem-wide capacity remains available.
Bash command
With GNU df, the second query shows inode totals and usage where the filesystem reports them meaningfully. Inode behavior differs by filesystem, so I do not assume every filesystem has ext4's allocation model. I inspect the exact error, the application's identity and any applicable quota using the filesystem's supported tools; quota inspection may require administrator help.
I locate the source of excessive file creation within a bounded directory scope. The recovery might be approved cleanup of expired cache files, a quota adjustment or capacity planning, not deletion of arbitrary files. Afterward, I confirm that the application can create new files and that inode or quota consumption no longer grows unexpectedly.
22. Why can df and du report different disk usage?
df reports filesystem-level allocation, whereas du walks named files it can access and estimates their usage. They are measuring related but different things. I first compare the same filesystem, unit scale and time window, noting permission errors or skipped directories.
A common explanation is a large file that was unlinked while a process still holds it open. Its blocks remain allocated, so df counts them but an ordinary pathname walk cannot find the file. Other causes include filesystem metadata, snapshots, files hidden beneath mount points, sparse-file apparent size and filesystem-specific sharing or compression.
I use a scoped du -x and, where installed and authorized, an open-file tool such as lsof +L1 to investigate deleted-but-open files. I avoid reading every process's files or stopping services without need. If a stale log descriptor is responsible, the owner can arrange the application's documented reopen or controlled restart. I then recheck space and application health; deleting the pathname again cannot release an already-unlinked open file.
23. How do you check which filesystem and mount options apply to a path?
I query the mounted filesystem that actually contains the path, rather than relying only on an intended /etc/fstab entry. With util-linux:
Bash command
I substitute an existing affected path, or its existing parent if the final file has not been created. The result helps reveal a read-only mount, an unexpected remote filesystem, a noexec restriction or a missing mount that left the application writing into the parent filesystem.
The observation belongs to the command's mount namespace. A container or systemd service with filesystem isolation can see different mounts, so a correct host-level result may not describe the failing process. I compare that execution context using approved tools and appropriate privileges.
I record source identity, mount target and filesystem type before considering a repair. An approved correction should restore the intended mount or path configuration, not remove protections blindly. Verification repeats the relevant read, write or execution operation from the application's context.
24. How do you investigate a read-only filesystem error safely?
I treat an unexpected read-only filesystem as a possible protection response, not simply a permission problem. First I inspect the affected path's actual mount options and the kernel messages around the first write failure. The mount might be intentionally read-only, imposed by a service sandbox, or remounted after storage or filesystem errors.
For example, ext4 can be configured with errors=remount-ro; forcing it writable without understanding the error risks additional damage. Other filesystems have different failure behavior, so I identify the type before consulting its recovery procedure. I also correlate device resets, I/O errors and the underlying storage service's status.
If corruption or hardware trouble is plausible, I escalate promptly, reduce unnecessary writes through an approved service response and protect recoverable data. I do not run a generic repair against a mounted production filesystem. Recovery follows the filesystem and storage owner's documented process, with verified device identity and backup considerations. Success means stable storage, clean relevant diagnostics and an approved application write, not merely a mount flag changing.
25. How do you find a process consuming CPU?
I start with repeated observations, because a single CPU snapshot can catch a legitimate burst. With procps-ng tools, I can shortlist processes and then observe a confirmed PID:
Bash command
The PID is a placeholder. ps CPU percentage is an average over the process's lifetime, while later top samples describe recent intervals. I check the selected tool's display conventions: a multithreaded process can exceed 100% when percentages represent individual logical CPUs.
I compare CPU use with traffic, throughput and latency before calling it runaway behavior. High useful processing differs from a retry loop or busy spin. If necessary, thread-level observation narrows the culprit without immediately attaching a heavy profiler. I record process identity and start time to avoid PID reuse mistakes. Any change, such as reducing an approved batch workload, is verified against both application responsiveness and the work that still needs to finish.
26. What does a high load average tell you, and what does it not tell you?
On Linux, load average reflects runnable tasks plus tasks in uninterruptible sleep, commonly waiting for I/O. The familiar three values summarize different recent time horizons; they are not CPU percentages or a direct measure of application response time.
I compare load with available CPU capacity, current CPU utilization, runnable tasks and blocked tasks. A load of eight means something different on a two-CPU machine than on a large server. Even that comparison is incomplete when the workload has a cgroup CPU limit or restricted CPU affinity. Host-wide numbers can hide the application's effective constraint.
High load with busy CPUs suggests CPU contention, while high load with relatively idle CPUs prompts investigation of blocked tasks and storage or network-filesystem waits. A short vmstat 1 5 sample and process-state inspection help distinguish these directions. I correlate the trend with user impact, then investigate the constrained layer. I do not kill processes or add CPU solely because one load number looks large.
27. How do you interpret low free memory without assuming a memory leak?
Linux uses otherwise idle RAM for useful caches, so a small free value alone does not demonstrate a leak. With procps-ng, I examine the available estimate as well as total, cache and swap figures:
Bash command
Available memory estimates what can be supplied to applications without swapping; it is not a promise that every allocation will succeed. Tool versions can calculate displayed “used” memory differently, so I avoid building a diagnosis around that single column. A container's own memory limit can also matter even when host memory is plentiful.
I look for a sustained decline in available memory, increasing application resident memory, reclaim pressure, swap activity or OOM evidence, correlated with workload. A leak usually needs a trend across comparable traffic and application-level investigation, not one large process snapshot. I do not drop caches to make a dashboard look better. Any approved capacity or workload mitigation is followed by observing memory pressure and request latency under representative demand.
28. How do you check whether swapping is affecting an application?
Allocated swap does not by itself show that an application is currently suffering. Cold pages can remain swapped out after earlier pressure has passed. I inspect activity over a short interval and correlate it with response times.
Bash command
With procps-ng, si and so indicate swap-in and swap-out rates. The first report's rate counters summarize time since boot, so I focus on subsequent interval reports for the current incident. I also inspect available memory and, where permitted, the affected process's VmSwap in /proc/PID/status; that process field is not a complete accounting of every shared-memory arrangement.
Sustained swapping alongside reclaim pressure, I/O delay and latency strengthens the case for memory pressure. Brief swap traffic without symptoms may be benign. I identify workload growth, concurrency or memory limits before selecting an approved mitigation. I do not run swapoff on a pressured host because pulling pages back can worsen exhaustion. Verification checks that activity and latency stabilize, not merely that swap usage falls to zero.
29. How do you investigate a process that appears stuck?
I distinguish “not producing output” from “not making progress.” I confirm the PID and expected work, then inspect state, elapsed time and a small amount of supporting evidence. With procps-ng:
Bash command
The PID is a placeholder. S often means a normal interruptible wait; D suggests an uninterruptible kernel wait, often involving I/O; T means stopped or traced. None alone proves a deadlock. Wait-channel details depend on kernel support and permissions and may be unavailable.
I compare repeated observations with application counters, recent logs, open connections and dependency health. A process waiting for input may be healthy, whereas an unchanged queue and repeated timeout logs point elsewhere. More intrusive tracing needs authorization, a short duration and secret-handling precautions. I avoid immediately sending a force-kill: it loses evidence and may not resolve a kernel wait. The safe response targets the underlying dependency or follows the application's controlled recovery procedure, then verifies actual progress.
30. What does a zombie process mean during troubleshooting?
A zombie is a process that has already exited but whose termination status has not yet been collected by its parent or reaper. It is not still executing application code, so repeatedly sending it kill signals is not useful. A small transient number can occur normally while parents reap children.
I identify the zombie's parent and check whether the count is persistent or growing. With procps-ng, the STAT field shows Z; I correlate parent PID and start time rather than acting on a bare reused PID. A growing population can indicate broken child handling and eventually pressure process-table limits, even though zombies do not retain a running process's full address space.
I investigate the parent's logs and lifecycle, especially in containers where the init/reaping arrangement matters. The durable fix is correct child collection. A controlled restart of the responsible parent may be an approved mitigation, but restarting an unrelated service is not. I verify that the parent resumes reaping and that new zombies do not accumulate.
31. How do you check whether a process was killed by the OOM killer?
I look for affirmative evidence rather than treating every abrupt exit as an OOM kill. Kernel logs around the failure can identify an out-of-memory decision and its victim; on a systemd host I inspect the relevant kernel journal window with authorized access. I match timestamp, process identity and service invocation, because PIDs can be reused.
A shell or container exit status of 137 commonly indicates SIGKILL, but administrators, supervisors and timeouts can send the same signal. It is not proof of OOM. On cgroup v2, changes in the affected group's memory.events counters, including oom_kill, provide additional evidence, but cumulative counters need a time correlation.
I distinguish host-wide exhaustion from a workload memory limit. Where systemd-oomd is deployed, I also inspect its records because userspace pressure intervention can occur before the kernel OOM killer runs. The mitigation addresses workload demand or a justified limit/capacity issue. Verification observes memory pressure and application stability under normal load rather than simply restarting the victim.
32. How do you inspect process arguments and environment without leaking secrets?
I begin with fields that answer the question without revealing command-line arguments: PID, parent, executable name, owner and start time. Full arguments and environment variables can contain passwords, tokens, database connection strings and personal data, so a broad ps or environment dump is not a safe incident attachment.
If an argument or environment setting is essential, I inspect it locally with the authorized identity and select only the minimum necessary values. For example, comparing a trusted PATH or locale setting is safer than collecting every variable. I also check deployment configuration, where the intended setting may be visible without exposing a running process's secrets.
Linux provides /proc/PID/cmdline and /proc/PID/environ, but access controls apply and the environment view does not reliably represent every later application-level change. I do not upload raw files, terminal recordings or support bundles without review. The handoff records a redacted finding, such as “service uses the old endpoint,” and verification confirms the corrected process started with the intended configuration.
33. How do you troubleshoot an unexpectedly empty or missing log?
I first determine where this invocation is supposed to log. The expected file might be obsolete after a deployment switched output to journald, a container collector or a remote service. I confirm the process is running and the tested action should actually emit a message at the configured level.
For systemd units, I inspect the configured standard-output/error destination and the correct unit or journal namespace. I also check time filters, reader permissions and whether journald storage, retention or rate limiting explains missing records. For file logging, I check path ownership, mount state, capacity, rotation history and whether the process still holds an older rotated file open.
An empty log does not establish an absence of errors. I preserve existing files and avoid truncating or restarting merely to generate activity. With authorization, I trigger one harmless known request and follow its expected record through the logging path. Verification checks both application logging and delivery to the intended retention destination, with sensitive content appropriately protected.
34. A scheduled job works manually but fails automatically: what do you compare?
I compare execution contexts rather than assuming the scheduler ran the same command I typed. Important differences include user and supplementary groups, shell, PATH, working directory, environment, umask, credentials, resource limits and access to a terminal. Relative paths and an interactive shell's aliases are frequent causes.
For cron, I inspect the correct user's crontab, scheduler logs and captured output. Cron implementations differ, and a user's crontab format is not identical to a system crontab that includes a user field. For a systemd timer, I inspect both the timer's triggering evidence and the associated service's result; a timer firing does not prove the job succeeded.
I reproduce only a safe version of the job under the intended account with explicit paths and required nonsecret settings. I avoid launching a second backup, payment run or data import while the first might still be active. The fix makes the required context explicit. Verification includes the next actual scheduled execution and its intended output, not just another manual run.
35. How do you investigate a missing shared library error?
I preserve the exact missing library name and distinguish a missing file from an incompatible architecture or symbol version. The glibc loader considers embedded search paths, permitted environment settings, its cache and system directories; an interactive shell and service can therefore resolve dependencies differently.
For a trusted installed binary, ldd can show unresolved dependencies. I never use it on an untrusted executable because some implementations or interpreter arrangements can execute code. A safer initial inspection uses trusted binary-analysis tooling, for example:
Bash command
This lists direct requirements, not the complete dependency tree, and should still be performed in an appropriate analysis environment for suspicious files. I compare architecture, package ownership and recent deployment or package changes. Recovery uses the correct approved package or rebuilt application, not a downloaded random library, a global LD_LIBRARY_PATH workaround or a symlink between incompatible major versions. I then verify loader resolution and the application's original operation in its normal service context.
36. How do you check whether a disk or filesystem error is in kernel logs?
I inspect kernel messages around the incident, not just the last line containing “error.” On a systemd host with authorized journal access:
Bash command
I look for time-correlated I/O failures, device timeouts or resets, filesystem errors and read-only transitions. A message naming a block device must be mapped to the affected filesystem and current storage stack; device names can change across boots. lsblk and findmnt help establish that mapping without writing to the disk.
Where the journal is unavailable, util-linux dmesg can inspect the kernel ring buffer, subject to kernel access restrictions. Its retained history is finite, and converted wall-clock timestamps can be imperfect, so I record the limitations. I do not clear the buffer or run a repair based on a keyword match. Repeated or escalating errors warrant storage-owner escalation and data-protection planning. Recovery is verified against fresh diagnostics and application I/O, not a successful reboot alone.
37. How do you decide between restarting a service and continuing diagnosis?
I weigh user impact against the evidence a restart would destroy and the risk it introduces. A stateless service with healthy replicas and a documented recovery procedure differs from a database doing recovery or a singleton holding important in-memory state. A restart is a mitigation choice, not an explanation.
Before an approved restart, I capture the current failure, process identity, bounded logs and a few relevant resource observations. I confirm whether traffic must be drained, whether startup dependencies are healthy, and whether the unit's stop/start behavior can meet the recovery window. Repeated automatic restarts can already be worsening a dependency failure.
I prefer continued diagnosis when users remain served and the failing condition is valuable or dangerous to interrupt. I prefer a controlled mitigation when impact is substantial and the recovery path is understood. In either case, I state a rollback or escalation condition. Afterward, I test the user-facing operation and monitor the original symptom; a temporarily green service state does not close the root-cause investigation.
38. How do you verify that a remediation actually restored service?
I define recovery criteria before making the change, using the original symptom and a representative user path. If users could not authenticate, a listening port or anonymous health endpoint is insufficient. If writes failed, a read-only homepage is not the decisive test.
I repeat an approved safe transaction with the correct hostname, account, network path and relevant data context. I compare error rate, latency, throughput and queue depth with a known-good baseline, and check fresh logs for the original error. On a systemd service, active state is one supporting signal, not the acceptance criterion.
I also check for collateral damage: another replica, background processing or management connectivity may have degraded during the fix. The observation window should cover the behavior that failed, such as a normal traffic peak or the next scheduled job, rather than an arbitrary few seconds. I record what passed, what remains untested and any ongoing monitoring owner. If symptoms recur, the earlier recovery claim is revised instead of repeatedly restarting without investigation.
39. What information should a useful Linux incident handoff contain?
A useful handoff lets the next responder continue without repeating risky work. I include the affected host or workload, distribution and kernel, user-visible impact, current severity, first-failure and last-known-good times, and any uncertainty about clocks or scope.
I separate observations from hypotheses. Each important observation includes the time, execution context, exact safe command or test, relevant result and a protected evidence location. For systemd incidents, the boot and unit invocation context help avoid confusing a previous process with the current one. I summarize changes already attempted, who authorized them, their measured effects and whether rollback remains available.
Finally, I state current service health, unresolved risks, the strongest remaining hypothesis, the next discriminating test and who owns it. “Probably networking” is not actionable; “local request succeeds, the same client request times out, route differs after VPN change” is. Credentials, raw environments and unnecessary customer data stay out of the handoff. The next responder should know both what to do and what not to repeat.
40. How do you build a safe, reproducible troubleshooting test?
I write down one hypothesis, the smallest input that demonstrates it and the result that would disprove it. I prefer a disposable test environment or a private directory with synthetic data, matching the relevant software version, identity and configuration without copying production secrets.
For a shell experiment using GNU coreutils, I can create an owned workspace:
Bash command
I keep inputs small and explicitly limit duration, output volume and concurrency. GNU timeout can bound many user-space tests, but a timeout is not a rollback and does not guarantee interruption of a kernel-blocked task. I never use it as permission to launch an unsafe operation.
I record commands, versions, exit status and expected versus actual output, then repeat the test to check consistency. After the evidence is saved, I remove only the confirmed test artifacts I created. Production verification remains a separate, authorized step with its own recovery criteria.
Linux Troubleshooting Interview Questions and Answers for Intermediate
The intermediate answers emphasize correlated evidence, targeted diagnostics, and reversible recovery. Commands and configuration details depend on the actual distribution, tools, service names, and deployment.
41. A systemd service repeatedly restarts: how do you find the original failure?
Start at the first failed activation, before repeated restarts obscure the initiating error. On systemd, inspect the configured restart policy, recorded exit result and a bounded journal window:
Bash command
Replace the example unit and time window. Journal access may require an authorized administrator; configuration and logs can contain secrets. Distinguish a process exit, signal, watchdog failure, startup timeout and an OOM event. Correlate the earliest message with deployment, dependency and kernel evidence. A start-rate-limit message usually describes the restart loop's consequence, not its initial cause.
Preserve evidence before obtaining approval to pause a damaging loop. Correct the demonstrated fault, then perform a controlled start and exercise the real application path. Resetting failed state or increasing restart limits alone does not repair the application. Verify that both restart count and user-visible errors remain stable through representative traffic.
42. How do you troubleshoot a systemd start timeout or dependency failure?
Separate failure to execute the service from failure to complete its startup contract. A notify-type daemon must signal readiness; a forking daemon may be tracked incorrectly if its PID information is wrong. Review the actual service type, startup commands and timeout rather than immediately extending the deadline.
Bash command
Use the journal to identify the earliest failed prerequisite and inspect that unit separately. After= establishes ordering but does not, by itself, require another unit to start. A dependency being active also does not prove an external database or DNS endpoint is usable.
With appropriate log access, correlate timestamps with application progress and dependency latency. Approve a timeout change only when legitimate startup work exceeds an evidence-based budget. Repair readiness signaling or the prerequisite when that is the cause, then verify startup duration and a real request without weakening failure detection.
43. How do you investigate systemd unit changes that appear to be ignored?
Compare three things: the unit files on disk, systemd's loaded properties and the already-running process. They can legitimately differ. Confirm the exact unit instance and whether the service belongs to the system manager or a user manager.
Bash command
Review authorized output privately because command arguments and unit configuration may expose credentials. Check override precedence, a masked unit, the wrong template instance and runtime drop-ins. Some list-valued directives need an explicit empty assignment before replacement; confirm the particular directive's rules.
An approved daemon-reload refreshes systemd's unit definitions, whereas service reload applies the application's supported configuration reload. Neither automatically makes every setting affect an existing process. Determine whether a controlled restart is needed and protect availability before doing it. Finally read back effective properties, confirm the new process start time when applicable, and test the behavior the change was intended to alter.
44. How do you diagnose a service that works in a shell but fails under systemd?
Reproduce the difference in execution context rather than assuming the executable is broken. A successful interactive run may rely on the operator's identity, current directory, shell initialization, environment, terminal or unrestricted filesystem view. Inspect only the relevant unit settings, not a wholesale environment dump.
Bash command
Systemd does not interpret an ExecStart= line as an arbitrary interactive shell command. Pipes, redirections and shell startup files should not be assumed. Also check executable paths, supplemental groups, runtime directories and resource limits. A private temporary directory can explain why a file visible in the shell is absent to the service.
Use an approved staging reproduction with the service identity and minimal documented environment. Do not solve the discrepancy by running as root or disabling sandboxing. Correct the specific path, dependency or permission requirement, then verify the original unit under its intended protections.
45. How do you troubleshoot a boot that stops in emergency mode?
First establish whether the console is an initramfs recovery shell or the installed system's systemd emergency target. They have different tools and access to the root filesystem. Obtain authorized console access and preserve the earliest boot error before editing anything.
Bash command
These commands apply when the normal userspace tools and journal are available. Common evidence includes a missing device, stale filesystem UUID, failed encrypted-volume activation or a required mount that timed out. Compare the failed unit with /etc/fstab, actual device identity and recent storage changes. Do not assume an absent device means filesystem corruption.
Keep a copy of the original configuration and confirm backups before an approved correction. Avoid blanket removal of mount dependencies, blind repair or forcing a damaged filesystem writable. If corruption is indicated, stop and plan filesystem-specific offline recovery. Resume boot only after the diagnosed prerequisite is restored, then verify required mounts and application data access.
46. How do you investigate a slow boot without assuming blame output identifies the root cause?
Use boot timing to form a hypothesis, not to select the longest line for disabling. Systemd starts many units concurrently, and a slow unit may be waiting on another component. Some service types provide little meaningful activation-duration information.
Bash command
Compare the firmware, kernel, initrd and userspace phases where the platform exposes them. Inspect the critical chain for the target users actually need, then correlate its timestamps with device discovery, network readiness and service logs. blame reports activation time; it does not capture every queued delay or prove that removing a unit will shorten the critical path.
Compare equivalent boots rather than a cold hardware boot with a warm virtual-machine restart. Journal access and boot plots may reveal internal topology. Change only the confirmed bottleneck through the approved configuration process, retaining rollback access. Verify both time to meaningful application readiness and required functionality; reaching a target sooner while missing storage is not successful optimization.
47. How do you diagnose a systemd timer that did not run when expected?
Inspect the timer and its target service separately. An active timer means scheduling is enabled, not that the workload completed successfully.
Bash command
Substitute the configured calendar expression in the last command. Check whether the schedule is wall-clock based or monotonic, its timezone, clock synchronization, accuracy window and any randomized delay. A persistent calendar timer can catch a missed activation after downtime, but persistence does not apply identically to every timer type.
If the target unit was already active, an elapsed timer generally does not start another concurrent instance. A oneshot service retained as active after exit can therefore defeat repeated execution. User timers also depend on the user manager's lifetime. With authorized access, distinguish no activation, skipped conditions and a failed job. Correct the demonstrated scheduling or service issue with approval, then verify the next expected activation and the job's actual output, not only its exit status.
48. How do you investigate missing journal history after reboot?
First check whether history is absent or simply inaccessible to the current account. On a systemd journal host, compare available boots and journal storage usage, then review the effective journald configuration and its drop-ins.
Bash command
Volatile journals under /run do not survive reboot. Persistent journals normally use /var/log/journal; the behavior of Storage=auto depends on that directory's existence. Defaults can vary by systemd build and distribution, so inspect the installed configuration rather than assuming a universal default. Early boot logging can remain volatile if flushing to persistent storage fails.
Also investigate retention limits, storage pressure, journal namespaces and whether the machine identity changed. Existing journal metadata does not guarantee every earlier message was retained. Enabling approved persistent retention prevents future gaps but cannot recreate lost history. Preserve any remote log copies, resolve storage or access problems, and verify survival across a planned reboot with a harmless identifiable test message and an agreed retention budget.
49. How do you distinguish CPU saturation from CPU throttling?
Measure the CPUs the workload can actually use. High host-wide idle time can coexist with a saturated single core, restricted affinity or a cgroup CPU quota. Sample per-CPU utilization and runnable work during the slow request window; separate user, system and virtualization steal time.
For a verified cgroup v2 path, inspect quota and throttling counters:
Bash command
The path is illustrative; discover the service's real control group and read its ancestors too. Compare counter deltas over the incident interval, not cumulative totals since creation. Increasing throttled periods supports quota enforcement, whereas sustained runnable work with busy eligible CPUs supports saturation. Counter details and available fields depend on kernel version.
Thermal or frequency throttling is a different mechanism requiring platform telemetry; cgroup counters do not prove it. Obtain approval before changing quotas or CPU placement because other tenants may be affected. Verify application latency, throughput and neighboring workloads after the change, rather than judging success from CPU percentage alone.
50. How do you diagnose high load with low CPU utilization?
A high load average includes runnable tasks and tasks in uninterruptible sleep, so low CPU usage does not rule out serious pressure. First verify that the load and utilization refer to the same host, namespace and time interval. Then look for a population of blocked tasks rather than one interesting process.
Bash command
The first vmstat report includes averages since boot; subsequent reports describe the sampling interval. Pressure files require kernel support, and wait-channel visibility may be restricted. Persistent D-state tasks can be waiting on local storage, network filesystems or other kernel paths. A wait-channel name is a lead, not a complete root-cause diagnosis.
Correlate blocked-task counts with device latency, NFS retransmissions, reclaim and application timeouts. Ordinary sleeping tasks waiting for work should not be treated as CPU saturation. Repair the demonstrated dependency with approval; repeatedly killing or restarting blocked clients can add load without removing the wait. Verify blocked work drains and request latency recovers.
51. How do you investigate sustained I/O latency without trusting one utilization number?
Correlate application latency with interval-based storage measurements and the actual device stack. A filesystem may sit above LVM, RAID, a virtual disk and a remote storage service; one device's statistics do not explain every layer.
Bash command
The first two commands require sysstat; field names vary by version. The -y option suppresses iostat's since-boot report. Compare read/write latency, request sizes, throughput, queue depth and workload concurrency. Near-100% utilization can indicate saturation for a serial device, but modern parallel devices and arrays cannot be judged from that number alone. Averages can also hide brief tail-latency spikes.
Check kernel errors and whether the delay is before submission, in device service or in application synchronization. Keep sampling bounded; do not add an uncontrolled disk benchmark during an outage. If an approved change reduces competing work or corrects a storage fault, repeat the same workload measurements and confirm user-visible latency improves without merely shifting the queue elsewhere.
52. How do you distinguish a memory leak from useful cache growth?
Track growth against workload and memory type before calling it a leak. Low free RAM with stable available memory and useful page cache can be normal. Persistent growth in private anonymous memory after comparable work finishes deserves a different investigation from file-backed cache growth.
Bash command
Use the verified application PID, and obtain permission for process-level memory inspection. On supported kernels, smaps_rollup summarizes mapping accounting; PSS apportions shared pages rather than counting every shared mapping fully for every process. Reading mapping details has overhead, so use spaced samples instead of rapid fleet-wide polling.
Compare RSS/PSS trends with request count, worker count, cache limits and allocator or garbage-collector telemetry. Anonymous growth can still be an intentional application cache, and a heap allocator may retain freed pages without an active object leak. Reproduce a steady workload and idle period in staging before using heavier profiling. Do not drop kernel caches as a diagnostic cure. Verify an approved code or cache-bound change stabilizes memory over equivalent workload cycles and preserves latency.
53. How do you troubleshoot a cgroup memory limit when the host has free RAM?
Host free RAM does not override a workload's cgroup budget. Identify the process's actual cgroup, the hierarchy version and any stricter ancestor limit. On cgroup v2, inspect usage, limits, memory composition and event deltas for the affected group.
Bash command
Replace the illustrative path with the verified one. Also examine memory.high, memory.stat and relevant ancestor groups. High-boundary events indicate pressure-related reclaim; max, OOM and OOM-kill counters describe different outcomes. An OOM-kill counter alone does not establish whether the initiating pressure was global or local, so correlate kernel and runtime records. Cgroup v1 uses different interfaces.
Include cache, shared memory and child processes when estimating the workload's footprint. Raising a limit without checking parent capacity may just move the failure. With approval, correct a leak, reduce concurrency or right-size the budget. Verify representative peak usage, pressure and successful requests, not only that a replacement process starts.
54. How do you diagnose file-descriptor exhaustion in one process?
Confirm the failing operation's error first. EMFILE points to a process descriptor limit, whereas ENFILE indicates system-wide open-file pressure. Inspect the limit of the running process, not the limit of your diagnostic shell.
Bash command
Use a verified PID and authorized /proc access. The GNU find example counts a changing directory, so it is a sample rather than an atomic total. If find fails because access is denied or the process exits, wc can still print zero; inspect stderr and the pipeline statuses before accepting the count. Classify descriptors as sockets, files, pipes and event handles using a scoped inspection. Avoid dumping every target path into a broadly shared incident ticket.
Compare counts over equivalent traffic intervals and check whether connections or files are closed after work completes. A high stable count may be legitimate concurrency; monotonically increasing counts suggest a lifecycle problem. Any approved limit increase must consider application compatibility and host capacity. Preserve evidence before a controlled restart, fix the leak or concurrency issue, and verify counts return to a stable baseline after repeated request cycles.
55. How do you investigate a process that cannot create new threads or processes?
Capture the actual creation failure and identify which limit applies. A message about temporary resource unavailability can result from per-user task limits, a cgroup PID limit or system-wide task exhaustion; it does not automatically mean RAM is exhausted.
Bash command
Scope process listings on large hosts and use authorized access. Check the affected cgroup's pids.current, pids.max and event counters, including ancestors. On Linux, the relevant user and cgroup accounting includes threads, so counting only process leaders can conceal the problem. Creation can also fail because allocation or address-space requirements cannot be met.
Look for runaway worker creation, unreaped children and retry loops before raising any ceiling. A shell's ulimit does not describe a service launched by another manager. Obtain approval to reduce concurrency, repair worker lifecycle handling or change a justified limit. Verify new work can start, task counts stabilize and sufficient capacity remains for administration and neighboring services.
56. How do you use strace safely to investigate a blocked application?
Use tracing only after lighter evidence identifies a specific process and question, such as whether requests wait on a socket or a synchronization primitive. Attaching strace can pause and slow the target, requires appropriate ptrace permission and may expose confidential arguments or payloads. Get production approval and prefer staging or one low-traffic worker.
For an approved GNU/Linux diagnostic window:
Bash command
Replace the PID after verifying process identity; GNU timeout and available syscall names depend on installed versions. The filter deliberately avoids broad data-buffer capture, but the result still needs restricted handling. Confirm the tracer detaches when the window ends.
Long syscall durations reveal where a thread waits, not why the dependency is slow. A futex wait alone does not prove deadlock, and tracing one thread can miss the relevant worker. Correlate with application stacks and request timing, then verify recovery through an application-level test.
57. How do you investigate a service crash using a core dump?
Identify the exact crash instance before opening a dump. Record boot, timestamp, executable build, signal and deployment version; PIDs can be reused. On systems configured with systemd-coredump, begin with metadata:
Bash command
Narrow the selection by time and other match fields when several crashes exist. A journal entry can remain after the actual core file has been removed, and truncation or permissions may prevent useful analysis. Missing dumps can also reflect collection policy rather than absence of a crash.
Core files may contain tokens, customer data and cryptographic material. Access and export require explicit authorization and restricted storage. Analyze offline with the matching binary, libraries and debug symbols; avoid untrusted debugger auto-load scripts. A backtrace identifies the crash location but does not establish the original corruption source. Correlate with preceding logs and reproduce using sanitized inputs in staging. Verify a proposed fix under the triggering workload, and retain or dispose of the dump according to the approved evidence policy.
58. How do you diagnose deleted files that still consume disk space?
An unlinked file can keep its allocated blocks while a process still holds it open. This explains some cases where filesystem usage remains high after a log disappears from directory listings. Use a targeted open-file inspection rather than deleting more files.
Bash command
This selects unlinked open files for the verified process; broader host inspection requires appropriate privileges and can be expensive. Correlate the filesystem device and inode, link count, process and allocated size. Several descriptors can reference the same file, so summing every output row can exaggerate recoverable space.
For a rotated log, the safe remedy is usually the application's documented reopen operation, performed with approval, or a controlled restart when necessary. Preserve required evidence first. Do not truncate arbitrary /proc/PID/fd paths: that can corrupt live data or discard logs. After the application closes the final reference, verify descriptor state and free space. Then repair the rotation integration so future rotations reliably transfer the writer to the new log.
59. How do you distinguish filesystem capacity, inode and quota failures?
Begin with the exact failing path, identity and error. A byte-capacity failure, inode exhaustion and a quota violation require different remedies, even if the application reports them all as a failed write.
Bash command
These examples use GNU df and util-linux findmnt. Inspect the filesystem containing the path, not an assumed root volume. Then query the applicable user, group or project quota using that filesystem's supported tooling and authorized identity. Quota accounting can deny allocation while df still shows free space; reserved capacity and filesystem metadata requirements can also affect what a particular writer can allocate.
Check whether creation of a small new file fails while extending an existing file succeeds, but use an approved disposable test location only. Do not generate a large test write on a stressed volume. Choose approved retention cleanup, quota adjustment or capacity expansion based on evidence. Verify with the original application's identity and operation, and monitor both inode and byte headroom afterward.
60. How do you investigate a filesystem that will not unmount?
Determine what is keeping the specific mount busy before choosing an unmount method. Open files, process working directories, nested mounts and swap files can all hold references. Confirm the mount namespace too: a container can see a different mount tree from the host.
Bash command
Use the actual mountpoint. Complete process visibility may require administrator privileges; keep inspection scoped because network filesystem lookups can themselves block. Inspect identified processes and their role rather than using a command that kills every holder. A session whose current directory is on the mount can be the simplest cause.
Coordinate with owners to stop writes, move working directories and release dependencies in the correct order. An approved normal unmount is preferable. Lazy unmount detaches a pathname without proving that all references or pending I/O are gone, while forced unmount carries filesystem-specific risks. Neither is a general repair. Verify the mount is absent in the relevant namespaces and that no required service silently writes into the now-uncovered directory.
61. How do you troubleshoot a failed mount without running a blind repair?
Read the mount error and corresponding kernel messages before attempting another mount. A missing helper, wrong filesystem type, unsupported option, inaccessible server or incorrect device identifier can look like a damaged filesystem from the application's perspective.
Bash command
The findmnt verification checks filesystem-table usability; it is not a filesystem integrity test. Some metadata and journal inspection requires authorized administrator access. Confirm the device UUID, expected filesystem, mountpoint and any encryption or LVM layers. Review the installed filesystem tools and kernel support, especially after a package or kernel change.
Do not run generic repair against an unidentified or mounted device. Even a read-only mount can replay a journal on some filesystems, so forensic recovery requires filesystem-specific handling. Preserve the original configuration and obtain approval for the smallest demonstrated correction. If actual corruption or failing hardware is suspected, prioritize backups or imaging and an offline recovery plan. Verify the correct source, options and application access after the approved mount succeeds.
62. How do you diagnose an LVM filesystem that did not grow with its logical volume?
Treat the logical volume and its filesystem as separate capacity layers. A successful LV extension does not prove that the filesystem growth step ran or succeeded. Confirm the exact mounted source before considering another change.
Bash command
LVM inspection may require administrator access. Compare reported units and account for filesystem metadata; not every numerical difference is missing capacity. Review the original extension command and its result, including whether filesystem resizing was requested and supported.
The appropriate next step depends on the filesystem: ext-family growth uses resize2fs, while XFS growth uses its own tooling and requires a mounted filesystem. Check installed versions, supported online-growth conditions, backups and available lower-layer capacity. Thin-pool limits add another independent constraint. Obtain approval for the filesystem-specific operation rather than extending the LV repeatedly or attempting a shrink to match. Verify new filesystem capacity, expected mount identity, kernel health and a representative application write afterward.
63. How do you troubleshoot an NFS mount that intermittently hangs?
Correlate hangs with NFS client retransmissions, server response time and the affected mount's negotiated protocol and options. First identify whether all clients fail or only one path or export does.
Bash command
These client tools come from distribution NFS packages and may not be installed. The first nfsiostat report covers time since mounting; later reports are interval deltas. Avoid recursive directory walks over a stalled mount. Compare client RPC timing with server load, storage latency, connectivity and failover events. A reachable TCP port does not establish that an export is answering filesystem operations normally.
Hard-mounted NFS clients can continue retrying, leaving application tasks blocked. Switching to soft behavior merely to stop hangs can introduce application errors and data-integrity risks. Timeout wrappers also cannot guarantee immediate termination of tasks blocked in uninterruptible kernel waits. Coordinate an approved restoration of the server or network dependency; collect evidence before disruptive remounts. Verify real reads and authorized writes, falling retransmission rates and recovery of previously blocked clients.
64. How do you isolate DNS search-domain, NSS and resolver differences?
Test the naming path the application actually uses. A successful direct DNS query does not prove that libc name resolution will return the same result, because NSS can consult local files and other sources before DNS.
Bash command
Use the real approved hostname. The resolvectl commands apply only where systemd-resolved manages resolution; getent follows the installed libc/NSS behavior. Compare the hosts: entry in /etc/nsswitch.conf, /etc/hosts, resolver configuration, per-link DNS servers and search or routing domains. Check whether the application uses glibc, another libc, a language-specific resolver or DNS-over-HTTPS.
Compare the fully qualified name with the short name, and inspect A versus AAAA behavior. A trailing dot is useful for testing an absolute DNS name but should not be blindly substituted into TLS URLs. A direct query bypasses parts of NSS and may bypass split-DNS routing. Correct the specific managed resolver configuration with approval, then verify the original application from the same namespace and identity.
65. How do you troubleshoot a TCP connection timeout versus an immediate refusal?
An immediate refusal usually means a reset or explicit rejection reached the client; a timeout means completion was not observed within the deadline. Neither result identifies the guilty component by itself. A firewall can reject actively, and a silent drop, bad return route or overloaded destination can all produce a timeout.
Bash command
Replace the documentation address with the authorized destination. Inspect the listener on the server, not only on the client, and check address family and bind address. For an approved test, use the application's protocol with bounded connection and total timeouts. Avoid repeated probing that amplifies an incident.
If necessary, obtain permission for narrow captures at both endpoints. Compare outgoing SYNs, returning SYN-ACKs or resets and the return path. Local policy failures can instead appear as permission errors. Fix the demonstrated listener, route or policy issue through the approved process, then verify both new connections and a complete application transaction.
66. How do you investigate packet loss with interface counters and packet capture?
Measure counter changes during the failure window and identify the layer where loss appears. Old cumulative errors may describe an incident from weeks ago. Compare the physical interface, virtual interfaces and relevant switch or cloud-network evidence.
Bash command
Replace the interface name; driver-specific ethtool statistics and permissions vary. CRC errors, missed receives and software drops suggest different investigations, and some driver counters overlap. A TCP retransmission by itself does not locate the lost packet.
With explicit capture authorization, select a single relevant flow, a short duration, a packet count limit and restricted output storage. Packet headers can still contain sensitive metadata; avoid payload capture unless justified. Compare captures on both ends and check tcpdump's own dropped-packet count before treating an absent packet as network loss. Offload can change how packet sizes and checksums appear at the host. After an approved cable, queue, driver or policy correction, repeat the same traffic and verify error-rate deltas and application behavior.
67. How do you diagnose an MTU or path-MTU problem?
Suspect path MTU when small exchanges succeed but larger transfers stall, especially across tunnels or overlays. First confirm that DNS, connection establishment and TLS negotiation are not the actual failure. Compare interface MTUs with encapsulation overhead and the route taken by the failing flow.
Bash command
Use the verified interface and an authorized destination. Tracepath sends probes and may infer path MTU without elevated privileges, but filtering, asymmetric routes or load balancing can make its result incomplete. Successful ICMP probes also do not guarantee that the application takes an identical path.
With approval, inspect a narrow capture for repeated large segments and relevant ICMP fragmentation-needed or IPv6 Packet Too Big messages. Host offload can distort apparent packet sizes in local captures. Do not globally disable path-MTU discovery or reduce every interface's MTU based on one timeout. Correct the demonstrated tunnel MTU or necessary control-message handling through the network change process, then verify large application transfers in both directions and ordinary traffic.
68. How do you investigate TLS certificate errors while preserving verification?
Read the precise verification failure and preserve the hostname being validated. Expiry, a not-yet-valid certificate, hostname mismatch, an incomplete chain and an untrusted issuer require different corrections. Check the client's time, application trust store and proxy path before replacing certificates.
For a bounded test, set endpoint to the approved hostname-based HTTPS URL:
Bash command
An HTTP error after a verified handshake is separate from a TLS validation failure. If testing a particular backend, use curl's hostname-preserving resolution override rather than replacing the URL hostname with an IP address. The correct SNI name and certificate identity must remain in use.
Compare the served chain with the approved certificate deployment and check whether the application uses the OS CA bundle or its own store. Do not use insecure mode or trust a certificate merely because the failing endpoint supplied it. Deploy the verified chain or approved CA through change control, then retest from the actual client environment. Ensure any diagnostic logs exclude authorization headers and tokens.
69. How do you troubleshoot SSH authentication without weakening server security?
Separate transport, host verification and user authentication failures. A host-key warning is not a reason to remove known-host entries without independently verifying the server's identity. For an authorized account, compare client debug messages with server-side authentication records at the same time.
Bash command
The first command displays effective client configuration; the second attempts authentication and, if successful, runs the harmless command true. Use only an approved target and account. Debug output may reveal usernames, hostnames and key paths, so sanitize it before sharing. Check which key is offered, agent availability, intended username, account status and supported authentication methods.
On the server, an authorized administrator can inspect effective sshd configuration, including applicable Match blocks, and validate syntax before any reload. Check ownership, directory traversal, key-file permissions and security-policy denials. Do not enable password login or obsolete algorithms as a shortcut. Correct the demonstrated issue, keep a recovery session available during approved changes and verify a fresh login.
70. How do you distinguish Unix permissions from SELinux or AppArmor denials?
Evaluate discretionary permissions and mandatory access control independently. Correct mode bits do not prove that SELinux or AppArmor permits the operation, and a policy denial should not be assumed merely because the application says permission denied.
Bash command
Check the actual process UID, supplemental groups, ACL mask and directory traversal permissions. Then inspect the active security framework. On SELinux systems, compare process and file contexts and query time-bounded AVC records with authorized audit access. On AppArmor systems, identify the process's loaded profile and matching denial records. Correlate the denied operation and path with the application's legitimate requirement.
A missing log entry is inconclusive if collection or permissions are incomplete. Do not disable enforcement or generate a broad allow policy from unreviewed denials. An approved fix may restore an expected label, correct an ACL or narrowly amend the relevant profile. Verify the original operation succeeds while enforcement remains active, and test that unrelated access is still denied.
71. How do you investigate firewall rules without flushing the firewall?
Identify the firewall owner and backend before interpreting rules. Firewalld, nftables, legacy iptables and container networking software may manage different parts of the effective packet path. Do not flush rules to see whether connectivity returns.
For an authorized administrator on an nftables system:
Bash command
Treat the output as sensitive network configuration. Follow the relevant address family, hook, interface, source, destination and port through chain priorities and policies. Distinguish input traffic to the host from forwarded container traffic, and account for NAT changing addresses along the path. Compare rule-counter deltas for one approved test flow rather than reading cumulative counts as proof.
An accept decision in one chain may not end evaluation by every other applicable component. If ordinary counters are insufficient, a narrowly scoped tracing change needs separate approval, a time limit and rollback. Make any correction through the authoritative firewall manager so it persists predictably. Verify the intended connection and representative denied traffic, while preserving administrative access and checking external security controls.
72. How do you troubleshoot a container that cannot reach a service the host can reach?
A container uses its own networking context unless configured otherwise. Its loopback address normally refers to the container, so a host service bound only to host loopback may be unreachable even though a host-side test succeeds. Establish the runtime, network mode, destination and exact failure first.
For Docker, with authorized daemon access:
Bash command
Restrict inspection to needed fields; full container configuration can include secrets. Compare the container's route, DNS result, source address, proxy settings and trust store with the host. Use existing approved diagnostic tools in the container rather than installing packages into a production image. A host request and a forwarded container request can encounter different firewall and NAT paths.
For orchestrated workloads, include network policy and service discovery. Obtain approval before changing a listener, network attachment or policy; switching to host networking hides isolation problems and broadens exposure. Verify the original application connection from its real namespace, then test that intended isolation from unrelated services remains intact.
73. How do you investigate a container OOM kill or repeated restart?
Inspect the previous termination, not just the currently healthy replacement. Record timestamps, exit status, restart policy and runtime events, then correlate them with kernel memory evidence. Exit code 137 indicates a SIGKILL-style termination convention but does not by itself prove an OOM kill.
For Docker, with authorized daemon access:
Bash command
Limit shared output because state errors can include sensitive details. Check the configured memory and swap budgets, workload peaks and ancestor constraints. The current container's counters may not retain all evidence from a replaced instance. Also distinguish application exits, health-check-driven orchestration actions and manual kills from memory pressure.
Do not disable the OOM safeguard to keep the process alive. An approved mitigation might reduce worker concurrency, repair a leak or adjust a justified limit after confirming node capacity. Preserve the failed instance's logs before recycling evidence. Verify sustained representative traffic, stable memory headroom and absence of new restarts; a successful container start alone is not recovery.
74. How do you diagnose DNS failures that occur only inside containers?
Inspect resolution inside the failing container rather than copying the host's successful result. Compare the configured nameserver, search list, runtime network and application's resolver implementation. A loopback DNS address in the container usually does not reach a resolver listening only on host loopback.
In Docker, default-bridge and user-defined networks have different DNS behavior. User-defined networks normally use Docker's embedded resolver, while default-bridge containers receive resolver configuration based on the host. Verify the actual runtime setup instead of assuming a universal nameserver address.
Use a bounded lookup from the affected container with its existing approved tooling. Compare a fully qualified name with the short service name and distinguish an NXDOMAIN response from a timeout. Check whether UDP and TCP DNS traffic reach the intended resolver and whether a VPN or split-DNS route changed. Avoid redirecting private names to public DNS as a workaround. Apply approved fixes to the runtime or orchestrator's managed DNS configuration, then verify the application and a newly created equivalent workload receive the intended settings.
75. How do you troubleshoot package-manager locks or interrupted updates safely?
Identify whether a package transaction is active before treating a lock as stale. A background updater may legitimately own it. Check process identity, start time, logs and progress; the existence of a lock pathname alone does not establish that a live lock is held.
On Debian-family systems, after confirming no transaction is running:
Bash command
This reports incomplete package state; it does not complete an interrupted update. Preserve package logs and verify free space, filesystem health and repository access. Do not delete lock files or kill a package manager merely to make another invocation start, because concurrent database changes or interrupted maintainer scripts can worsen the failure.
With approval, follow the installed distribution's documented recovery sequence. Completing configuration can execute maintainer scripts and restart services, so it belongs in a controlled change window with backups and rollback planning. RPM/DNF systems have different transaction and recovery tools; do not transplant dpkg instructions. Finally verify package consistency, intended versions and affected services, including any required reboot or deferred restart.
76. How do you investigate a binary that fails after a library or OS update?
Capture the exact loader or runtime error and correlate it with the package transaction. A missing library, missing symbol version, wrong architecture and application crash are separate failure classes. Preserve the known-good build identifiers before replacing files.
Bash command
GNU binutils can inspect ELF metadata without intentionally launching the binary; still use trusted, updated tooling and handle untrusted artifacts in isolation. Compare interpreter path, required shared objects, symbol versions and runtime search paths with the approved package set. The service environment can choose a different library from an interactive shell.
Do not invent a symlink between incompatible library versions, copy a random shared object into a system directory or use ldd on an untrusted executable. An approved recovery should restore a consistent supported package set or deploy a rebuilt application, accounting for security fixes and dependent software. Verify startup, representative operations and any long-running workers that may still have old libraries mapped.
77. How do you diagnose a service's growing log volume without deleting evidence?
Measure the growth rate and identify the emitting component before applying retention changes. A full logging volume may be the secondary effect of a retry loop, repeated authentication failure or unexpectedly enabled debug output.
Bash command
These commands apply to journal-backed logging; file logs and runtime logging drivers need separate accounting. A bounded sample can reveal repetition but is not a statistically complete count. Correlate message rate with requests, deployments, CPU and disk I/O, and check whether one event is duplicated by multiple collectors.
Preserve relevant evidence with access controls before an approved logging or retention adjustment. Deleting an active log may not release space and can break rotation expectations. Rate limiting can protect storage but also suppress diagnostic events, so it should not conceal the underlying error. Correct the emitting fault or unintended verbosity, verify rotation and retention behavior, and observe both reduced byte growth and continued delivery of important application and audit events.
78. How do you troubleshoot certificate or token failures caused by clock problems?
Compare the failing system's actual UTC time with a trusted synchronization source and the verifier's validity window. A correct-looking local display can still hide clock offset, while a timezone difference alone does not imply incorrect absolute time.
Bash command
The chronyc commands apply where chronyd is installed and accessible; other time services have different inspection tools. Check source reachability, synchronization status, remaining correction and recent suspend, migration or reboot events. Record the clock uncertainty when aligning logs across machines.
Certificate not-before/not-after checks and token validity claims can fail differently on clients and servers. Inspect only approved metadata; never paste a live token into a public decoder. Do not disable certificate checks or enlarge token tolerance as an unexplained workaround. Repair time-source reachability or configuration through change control. A sudden clock step can disrupt databases and leases, so coordinate the correction strategy. Verify synchronization converges, then retest authentication and renew credentials only if their actual validity requires it.
79. How do you compare a working host and a failing host without exposing secrets?
Choose a genuinely comparable healthy host: same role, release, architecture, traffic pattern and dependency path. Build an allowlisted evidence set around the suspected difference instead of collecting entire configurations or environments.
Compare kernel and package versions, executable build identifiers, relevant mount options, effective service limits and selected nonsecret configuration. Normalize timestamps and host-specific identifiers before a private diff. For example, GNU sha256sum can compare an approved configuration artifact without printing its contents, but hashes of predictable secrets can still leak information and should not be shared.
A difference is a hypothesis, not proof. A healthy host may have an obsolete setting that should not be copied, and two apparently identical hosts may use different external endpoints. Use the smallest approved staging or canary change to test the suspected cause. Keep the original values and an explicit rollback condition. Verify the affected request path under equivalent traffic, then record which difference was causal, which was incidental and which uncertainty remains. Share a sanitized summary rather than raw diagnostic bundles.
80. How do you turn a one-time fix into a verified preventive action?
Separate immediate recovery from the preventive change. Record the failure mechanism, the evidence supporting it and the conditions under which it can recur. If a restart restored service but the cause is unknown, say so rather than declaring prevention complete.
Turn the demonstrated mechanism into a specific owned action: repair a descriptor lifecycle bug, add a bounded queue, validate mount identifiers during deployment or alert on a meaningful capacity trend. Define acceptance criteria before implementation. For a descriptor leak, that might require counts to plateau after repeated representative traffic cycles while error rate remains within the service objective.
Reproduce safely in staging, verify that the regression test fails before the fix and passes afterward, and review operational overhead and security effects. Roll out through the approved change process with a canary, rollback condition and monitoring window tied to the original failure timescale. Update the runbook with detection, interpretation and recovery steps. Close the action only when evidence shows the preventive control works, not merely when a ticket or code change exists.
Linux Troubleshooting Interview Questions and Answers for Experienced
The experienced answers focus on layered failure analysis, resource isolation, complex recovery, and organizational learning. No single metric or command substitutes for context, controlled validation, and an explicit stop condition.
81. How do you lead diagnosis when many Linux services degrade simultaneously?
I would establish the user impact, affected failure domains and earliest reliable timestamp, then appoint one incident lead and separate investigation from mitigation. If unrelated services on several hosts fail together, I would first compare their shared DNS, identity, network, storage and deployment dependencies. If only one host fails, local contention or a host-level change becomes more plausible.
I would preserve a small synchronized evidence set: representative failed requests, service errors, kernel messages and resource-pressure trends. A fast comparison between one affected and one unaffected host often provides more discrimination than collecting everything from every host. I would record competing explanations and assign each investigator a specific question, preventing simultaneous configuration changes from destroying the experiment.
Recovery should reduce impact without spreading the fault. For example, draining a suspect host is reasonable only after checking spare capacity and whether the replacement path shares the failing dependency. I would make one reversible mitigation at a time, retain its previous configuration and validate real transactions, error rates and queue recovery before expanding it. Root-cause investigation can continue after service is stabilized.
82. How do you distinguish a shared dependency failure from unrelated host symptoms?
I would build a dependency matrix rather than infer a common cause from simultaneous alerts. For each affected service, I would record its host, zone, resolver, identity provider, storage target and upstream endpoint, plus a comparable unaffected service. A shared dependency becomes a strong candidate when failures follow its boundaries and the earliest evidence originates there.
For example, high application latency, many waiting threads and low host CPU might all follow a slow database. Alternatively, one noisy workload could cause local CPU pressure while an unrelated certificate expiration breaks a different service. Matching timestamps alone does not distinguish these cases, especially when monitoring batches alerts or clocks differ.
I would test the narrowest discriminating path: a bounded request from affected and unaffected hosts to the same dependency, with DNS, connection and application timing separated. Existing traces and dependency-side request IDs help establish ordering. I would avoid bypassing authentication or creating synthetic load during overload. A scoped routing change or rollback is justified only after checking its blast radius; recovery should occur in the predicted cohort while the control remains stable.
83. How do you design a low-overhead evidence collection plan during an outage?
I would start with the decision the evidence must support: CPU contention, storage delay, memory pressure or a remote dependency. Each collector needs a target, duration, sampling rate, output limit and stop condition. I would prefer existing metrics and bounded reads over installing new agents or repeatedly walking an entire filesystem.
A first pass might collect a minute of resource counters and a narrow service-log window from one affected host and one control. Counter deltas matter more than a single lifetime total. I would record host identity, boot ID, timestamps, tool versions and whether a command had sufficient permissions. Missing access should be reported as missing evidence, not interpreted as a clean result.
Tracing is an escalation, not a default. I would select one process or cgroup and a small event set, measure collector overhead, and stop if latency or disk use worsens. perf and eBPF availability depend on the kernel, installed tooling and security policy. Output can reveal paths, addresses or application data, so it belongs in restricted storage with retention limits. I would remove temporary instrumentation and confirm that it stopped.
84. How do you investigate intermittent latency that disappears during manual testing?
I would make the measurement resemble the failing workload: the same client location, identity, request size, connection reuse and concurrency. A manual request may hit a warm cache or healthy backend and miss a millisecond-scale stall. I would correlate tail latency and error samples with request IDs, scheduler pressure, storage latency and background-job schedules rather than rely on averages.
I would preserve bounded evidence continuously or on an existing latency trigger. For an authorized read-only endpoint, a single curl probe can separate timing phases:
Bash command
These values are cumulative milestones, not independent durations; proxies and connection reuse also affect interpretation. I would not turn this into an aggressive polling loop. If slow requests coincide with a quota window or log rotation, I would test that explanation on a canary under representative load. Validation must cover the recurrence interval and failing request class, not merely a successful probe immediately after the change.
85. How do you diagnose a noisy neighbor on a shared Linux host?
I would identify the contested resource and the workloads sharing it before blaming the largest process. A CPU-intensive batch job can be harmless on idle CPUs, while modest random I/O can disrupt latency-sensitive database reads. I would compare application latency with per-workload CPU, memory and I/O activity, pressure signals and the host's physical topology.
On a cgroup-v2 host, I would inspect the victim and suspected neighbor, including ancestor limits and the effective CPU set. For storage, I would map both workloads to the underlying device or shared array; different mount points do not guarantee isolation. In a virtual machine, host-side contention may require hypervisor or provider evidence rather than guest counters alone.
The safest discriminating experiment is often to reduce or relocate one authorized batch workload while holding user traffic stable. I would choose a bounded change and observe whether the victim improves, then restore the previous policy if it does not. A permanent fix might use placement, scheduling or resource controls, but overly tight limits can create a new bottleneck. I would verify both workloads' service objectives after the change.
86. How do you use pressure stall information to explain workload contention?
Pressure stall information measures time lost waiting for CPU, memory or I/O resources, which helps explain why a workload is slow even when utilization averages look acceptable. With kernel PSI support enabled, I would read the host files and, on cgroup v2, the affected workload's pressure files:
Bash command
some represents periods when at least some tasks are stalled; full represents simultaneous stalling of all non-idle tasks in the measured scope. System-level CPU full is undefined and reported as zero on kernels exposing that field; it must not be interpreted as proof of no CPU contention. Per-cgroup CPU pressure has different scope.
I would compare recent averages and changes in cumulative stall time with the incident window and a healthy baseline. High memory pressure suggests reclaim-related delay, but does not identify which allocation or limit caused it. I would combine PSI with cgroup events, workload activity and storage evidence, then test a scoped reduction in competing demand. Success means lower user latency without merely moving pressure to another workload.
87. How do you investigate container CPU throttling despite low node-wide CPU usage?
Low node-wide CPU usage does not rule out a container exhausting its own CPU budget. I would locate the workload's actual cgroup from runtime metadata or /proc/PID/cgroup, confirm cgroup v1 versus v2, and inspect the limit at every relevant ancestor. CPU affinity or cpuset placement can also restrict the workload to a busy subset of otherwise idle CPUs.
For cgroup v2, this read-only example assumes the correct workload path has already been verified:
Bash command
I would take interval deltas of throttling counters and correlate them with request latency. A historical nonzero count alone proves little. CPU weights govern relative sharing and are not the same as a hard bandwidth ceiling. Parallel workers can consume a period's budget rapidly even if a longer average appears modest.
If evidence supports throttling, I would canary a justified quota or concurrency change through the orchestrator, preserving the prior settings. I would check node headroom and neighbor impact, then verify reduced throttling and improved tail latency under the same workload.
88. How do you distinguish global OOM, cgroup OOM and userspace memory-pressure actions?
I would identify who initiated the termination before changing memory limits. An exit code such as 137 suggests SIGKILL in common runtime reporting, but does not identify its sender. I would align the PID, cgroup, boot and termination timestamp across kernel, service-manager and orchestrator records.
Candidate | Evidence to correlate |
|---|---|
Global kernel OOM | Kernel OOM report and system-wide memory pressure |
Cgroup-constrained OOM | Kernel context, limit hierarchy and local memory-event deltas |
Userspace pressure action | Agent or systemd-oomd decision logs and policy |
On cgroup v2, memory.events can include descendant events; memory.events.local narrows attribution. An oom_kill increment alone is insufficient because it can count a process killed by any kernel OOM killer. I would compare oom, max, usage and ancestor limits with the kernel report. systemd-oomd, when configured, can act before kernel OOM and requires its own evidence.
Mitigation depends on the cause: reduce demand, correct an undersized limit or repair a leak. Raising one limit can endanger the host. I would use a capacity-checked canary and verify survival, pressure and neighboring services through a representative peak.
89. How do you investigate reclaim or swap thrashing without hiding the cause?
I would distinguish memory occupancy from repeated work caused by an oversized working set. I would correlate memory PSI, application latency, major faults, reclaim activity and swap-in/swap-out rates over the same interval. Swap space being occupied is not evidence of active thrashing; old cold pages can remain there harmlessly.
I would examine which workload is growing and whether memory is anonymous, file-backed, shared or kernel-accounted. A cgroup limit can force reclaim even when the host has available RAM. Storage congestion can also make otherwise manageable paging disproportionately slow. These hypotheses require different remedies, so I would compare the workload's limit and usage with host and device evidence.
I would not drop caches or run swapoff as a diagnostic shortcut. Cache dropping can cause costly rereads, while swapoff needs memory for displaced pages and can deepen the outage. A safer mitigation is reducing batch concurrency or moving an identified workload after checking destination capacity. Any policy change should preserve the original setting. I would validate lower stall time and sustained application progress, then address the working-set growth or allocation behavior rather than celebrate a temporary fall in usage.
90. How do you diagnose NUMA-related performance problems?
I would first verify that the host exposes multiple NUMA nodes and that the affected workload is large or latency-sensitive enough for placement to matter. Remote memory access is a hypothesis, not a conclusion from seeing uneven node usage. I would compare CPU affinity, allowed memory nodes, per-node capacity and page placement with a healthy run.
Where numactl tooling is installed, numactl --hardware describes topology and numastat -p PID helps inspect a process's placement. /proc/PID/numa_maps and the allowed CPU and memory-node lists provide additional context, subject to permissions. I would also investigate reclaim, huge-page behavior and workload changes; these can resemble a locality problem.
An application may have first-touched memory on one node and later moved its workers elsewhere. Changing policy does not automatically relocate all existing pages, and cpuset restrictions can override a broader memory policy. I would test coordinated CPU and memory placement on one replica, retaining its previous configuration. Binding too tightly may exhaust a node while others have spare memory. Validation needs throughput, tail latency and per-node pressure under representative load, not only a more balanced memory chart.
91. How do you investigate storage latency across the application, filesystem and device layers?
I would follow one slow operation through the stack: application queue, system call, filesystem, logical block device, physical device and any remote storage service. A slow database commit may reflect fsync latency; a slow read may never reach the device if it is waiting on an application lock. I would align request timing with the relevant layer rather than assume all disk-associated symptoms originate in hardware.
With sysstat installed, a bounded device sample is:
Bash command
-y omits the initial since-boot report. I would compare latency, queue depth, throughput and errors, map logical volumes to their backing devices, and avoid double-counting the same I/O at multiple layers. Device averages can hide tail latency, while %util does not universally describe saturation on parallel devices or arrays.
Only after identifying a gap would I add targeted tracing, with permission, overhead and output limits. I would not run a write benchmark on a production volume. Recovery might reduce competing writes or move traffic, but must preserve durability. I would validate the original operation's latency and correctness, not just improved device graphs.
92. How do you respond to filesystem corruption while protecting recoverable data?
I would treat suspected corruption as a data-preservation incident. First I would stop or redirect writes through the application owner, record the exact filesystem errors and map the affected filesystem to its real backing device. I would check for hardware, path or storage-controller faults before assuming the filesystem itself is the original cause.
I would establish what recoverable copies exist and protect them before repair. A snapshot on the same failing storage is not an independent backup, and some read-only mounts can still replay a journal unless filesystem-specific options prevent it. Where practical, an approved image or recovery copy should be the diagnostic target.
The repair procedure must match the filesystem and supported tool version. For XFS, an offline xfs_repair -n can assess proposed changes, but it is not a guarantee of recoverability. I would not use destructive log-clearing options as a routine fix or run an offline repair tool against a mounted filesystem. After a reviewed repair or restore, I would validate filesystem access, application-level consistency and recent writes, then address the underlying storage fault before returning full traffic.
93. How do you diagnose a storage stack with inconsistent capacity or device identity?
I would reconcile identity and capacity layer by layer before resizing or repairing anything. Device names such as /dev/sdb are not durable identities, particularly after replacement, reboot or path changes. I would compare stable identifiers with the storage inventory and confirm which mount namespace the application actually uses.
Layer | Question to resolve |
|---|---|
Array or virtual disk | Was the intended volume expanded or replaced? |
Host paths and multipath | Do all paths describe the same device and size? |
Partition, PV and LV | Has each applicable layer recognized the new capacity? |
Filesystem and mount | Is the application using that filesystem? |
lsblk -b -o NAME,TYPE,SIZE,FSTYPE,UUID,WWN,MOUNTPOINTS is useful with a util-linux version supporting those columns; explicit columns avoid relying on changing defaults. I would cross-check LVM or multipath reports where applicable, accounting for root-only device inspection and transient discovery state.
Duplicate filesystem UUIDs from cloning, stale paths or a bind mount can explain misleading output. I would stop if identity remained ambiguous. Any approved rescan or growth operation would target verified stable identities, preserve backups and be followed by readback at every layer plus an application-level capacity check.
94. How do you investigate thin-provisioning exhaustion before extending the wrong layer?
I would distinguish the filesystem's free space from the thin pool's backing capacity. A thin logical volume can advertise a large virtual size while its shared data pool or metadata area is nearly exhausted. Extending that virtual volume alone may make the risk worse without adding physical backing.
For an LVM installation, an authorized administrator can inspect the relevant pool using:
Bash command
I would confirm the installed LVM fields, pool health, monitoring configuration and free extents. Snapshot churn may consume capacity unexpectedly. I would also check whether the underlying array is itself thin-provisioned; host-visible spare space does not prove the array has room.
The immediate goal is to prevent further allocation failures, often by reducing nonessential writers while preserving critical service. Pool data and metadata growth require a reviewed, layer-specific procedure and available backing storage. I would not delete snapshots or attempt metadata repair blindly. After remediation, I would verify pool status, application writes and filesystem health, then alert on both data and metadata growth early enough for the actual capacity-provisioning lead time.
95. How do you diagnose persistent D-state tasks during a storage or network-filesystem incident?
I would identify what the tasks are waiting for, rather than repeatedly send signals. D state generally indicates an uninterruptible kernel wait; it can arise from local storage, a network filesystem or another kernel path. A kill signal may remain pending until the wait can complete, so repeated SIGKILL does not repair the dependency.
I would group affected threads by wait channel and, when permitted, inspect their kernel stacks. /proc/PID/stack requires kernel stack-trace support and ptrace-style access checks. A shared NFS or block-layer stack across unrelated applications is stronger evidence than one process name. I would correlate it with mount details, device errors and server or network health.
I would avoid commands that recursively touch the stalled mount, because diagnostics themselves can join the blocked queue. A timeout wrapper cannot necessarily terminate a task stuck in an uninterruptible wait. Recovery should restore the unavailable dependency or follow an approved failover and fencing plan. I would not switch a hard NFS mount to soft semantics casually, since application-visible errors can threaten data integrity. Before returning traffic, I would verify blocked work completes and that pending writes and locks are consistent.
96. How do you investigate a kernel panic or unexpected reboot?
I would first distinguish a kernel panic from a watchdog reset, power loss, administrator reboot or hypervisor action. An abrupt end to logs proves only that logging stopped. I would correlate the previous boot's journal with serial-console output, platform events and any persistent crash records, using boot IDs and reliable timestamps.
If kdump was configured before the incident, I would preserve the vmcore and analyze it with the matching kernel symbols and tools. A missing dump can reflect an unconfigured capture kernel, an inaccessible destination or a failure that prevented capture; it does not rule out panic. Dumps can contain credentials and customer data and need restricted handling.
I would record the kernel build, loaded modules, taint information, firmware and recent changes. A taint flag supplies context, not proof that a particular module caused the crash. Recovery might use a previously supported kernel after compatibility and security review, with console access and a rollback path. I would verify the expected kernel actually booted, required devices and services work, and the triggering workload no longer reproduces the failure. Production crash testing requires a separate approved window.
97. How do you plan safe evidence collection from an apparently hung kernel?
I would establish what still responds: remote monitoring, SSH, serial console, out-of-band management and the storage subsystem. Failure of SSH alone is not proof that the kernel is hung. I would preserve console output and platform events before deciding whether the fastest recovery path would destroy the only useful evidence.
If an approved runbook and kernel support permit it, targeted diagnostic SysRq actions can report blocked tasks or CPU backtraces. These actions are not free: output can flood a slow console, consume logging capacity or expose sensitive context. I would select the smallest useful dump rather than repeatedly request all diagnostics. Lockup-watchdog messages may already provide the relevant stack.
I would not improvise a forced crash or reboot. A crash capture is useful only if the dump kernel, reserved memory and destination were prepared and the service owner accepts the outage. Before resetting a stateful node, I would coordinate failover and fencing to prevent two writers. After recovery, I would preserve the evidence bundle, confirm service and data consistency, and reproduce the suspected failure in a safer environment with better instrumentation.
98. How do you troubleshoot a host that cannot boot after a kernel update?
I would identify the failing stage from the console: firmware or bootloader selection, kernel startup, initramfs discovery, root mount or ordinary service startup. A black screen can be a graphics problem rather than total boot failure, so I would check an alternate console or approved remote management path before rebuilding anything.
If available, I would boot the previous known-good supported kernel as a controlled recovery, retaining the failing entry for diagnosis. I would compare the selected kernel with its installed modules, initramfs and boot arguments. A missing storage driver, incomplete package transaction, full boot filesystem or incompatible external module can explain a failure after an otherwise successful update. Secure Boot signature failures require a supported signing or package fix, not disabling verification by default.
From the working kernel or rescue environment, I would preserve package and boot logs, then repair only the identified mismatch using that distribution's tooling. Regeneration must target the intended installed kernel; rescue media's running kernel may be different. I would keep a tested fallback entry and validate the new kernel through a supervised boot, device discovery, networking and application checks before considering the incident resolved.
99. How do you diagnose boot failures involving encrypted volumes or initramfs?
I would locate the failure in the unlock-and-mount chain: device discovery, encrypted-volume identification, key acquisition, device-mapper creation, LVM activation or root-filesystem mounting. A missing unlock prompt, rejected credential and missing root device imply different next steps. I would retain console messages while excluding passphrases, recovery keys and key material from the incident record.
On a dracut-based distribution, the emergency report at /run/initramfs/rdsosreport.txt can contain valuable context, but it must be reviewed for sensitive details before sharing. I would compare the intended LUKS identity, root identifier and boot arguments with the installed configuration, then check that the initramfs contains the required storage, cryptographic and key-acquisition components. Other distributions use different tooling.
A TPM-bound unlock failure after an update may reflect changed measurements rather than damaged ciphertext. I would follow the approved recovery-key process and repair the supported enrollment or boot configuration, not reformat or recreate the encrypted volume. Header backups are sensitive recovery assets and must be protected. After a scoped rebuild, I would preserve the fallback boot path and validate both normal unlock and the documented recovery procedure without exposing credentials.
100. How do you investigate a service failure caused by systemd sandboxing?
I would compare the failing operation with the service's effective sandbox rather than reproduce it only in a privileged shell. The shell may see a different root directory, temporary directory, mount namespace, capability set or network namespace. I would inspect systemctl cat app.service, relevant systemctl show properties and the journal, redacting any embedded secrets.
I would map the error to a specific restriction. For example, a write can fail under ProtectSystem= even when Unix ownership is correct; PrivateTmp= can hide another process's temporary files; and a syscall filter can block an operation the executable expects. I would also check SELinux or AppArmor evidence, because relaxing a systemd setting will not repair an unrelated mandatory-access denial.
The fix should preserve the security boundary. I would prefer a supported state directory or narrowly scoped writable path over disabling the sandbox. Any required capability or syscall exception needs justification and a canary. Directive availability and behavior depend on systemd, kernel support and whether this is a system or user service. I would retain the old drop-in, reload appropriately, restart only if needed and verify both functionality and the intended restrictions.
101. How do you diagnose DNS latency across applications, local caches and upstream resolvers?
I would measure resolution along the application's actual path, not assume a fast dig result proves DNS is healthy. Applications may use libc NSS, their own resolver, a local caching service or a container-specific stub. They may also cache results for different durations.
Measurement point | What it helps distinguish |
|---|---|
Application request timing | Lookup delay versus connection or server delay |
| The configured NSS path |
| systemd-resolved behavior where it is used |
Bounded query to a specific resolver | That resolver and network path |
I would compare identical names and record A/AAAA behavior, search-domain expansion, response codes, retries and cache state. A direct upstream query bypasses parts of the application's path, so its result is a comparison, not a substitute. Split DNS and VPN routing can make two resolvers legitimately return different answers.
I would correlate slow lookups with resolver logs and limited packet evidence, keeping query names private. I would not flush every cache first, because that removes evidence and can amplify upstream load. A scoped resolver or configuration correction should be validated with the affected application through both warm-cache and expiry behavior.
102. How do you investigate connection failures caused by ephemeral-port or connection-tracking pressure?
I would separate local socket allocation from state exhaustion in a firewall, NAT gateway or host conntrack table. I would capture the application's exact error, destination distribution and new-connection rate. Ephemeral-port exhaustion can produce local allocation failures, whereas conntrack pressure may drop traffic elsewhere in the path.
I would inspect socket summaries and states in the correct network namespace, the configured local port range and any reserved ports. A large TIME_WAIT population is normal evidence of connection churn, not automatically a fault. The available connection space depends on source and destination tuples and application binding behavior, so comparing one socket count with the range size is insufficient.
Where Linux conntrack is involved, I would compare nf_conntrack_count with nf_conntrack_max and correlate drops or insertion failures; those controls may be absent when the module or datapath is not used. I would avoid dumping a huge table during overload. The first remedy is often bounded connection reuse, concurrency or retries. Increasing limits requires memory and network-capacity analysis. I would never flush conntrack as a diagnostic shortcut, and would validate successful new connections without disrupting established sessions.
103. How do you diagnose asymmetric routing or reverse-path filtering problems?
I would trace the forward and return paths separately using the same source address, destination, network namespace and policy-routing context as the failed flow. A SYN arriving at the server does not prove its reply takes a viable path. Multiple interfaces, VPNs, VRFs or source-based rules can produce legitimate asymmetry that a simple default-route check misses.
For an example IPv4 path, read-only inspection could include:
Bash command
Addresses and interface names must be replaced with verified values; marks or VRFs may require additional lookup arguments. Linux IPv4 reverse-path filtering uses the maximum setting from all and the receiving interface. Strict mode can reject an otherwise reachable source whose best reverse route uses a different interface.
I would correlate routing decisions with narrow captures and firewall evidence before changing policy. I would prefer fixing an unintended route. If asymmetry is intentional, any scoped filtering adjustment needs security review and a retained prior setting, not a global disable. Validation should include both directions, failover paths and anti-spoofing expectations.
104. How do you investigate TCP retransmissions without assuming packet loss is the only cause?
I would treat retransmissions as evidence that the sender did not receive the expected acknowledgment in time, not as proof of a bad cable. Data loss, acknowledgment loss, reordering, excessive delay and a receiver that cannot keep up can produce different but related symptoms. A packet-analysis tool can also misclassify events when the capture itself drops packets.
I would compare per-connection TCP information from ss -ti with interface and protocol-counter deltas over the incident interval. I would then use narrowly scoped captures at both endpoints where authorized, recording clock quality and capture-drop counts. NIC offloads can make host captures show unusually large segments or apparent checksum errors that were not transmitted that way on the wire.
The sequence and acknowledgment timeline helps distinguish a missing segment from delayed acknowledgment or a zero-window episode. I would also check receiver CPU pressure, queueing and path-MTU behavior before altering TCP timers or offloads. Any targeted network or capacity change should be reversible and canaried. Validation requires lower user-visible delay and retransmission rates for comparable traffic, without reducing throughput or merely changing how the counters are collected.
105. How do you troubleshoot a load-balanced service when only some requests fail?
I would segment failures by backend, zone, address family, client path, request type and connection age. Intermittent errors often become consistent once grouped correctly: one backend may have an old certificate, a different application build or a failing storage mount. A green load-balancer probe can miss failures in authenticated or stateful requests.
I would correlate request IDs across the load balancer and application, confirm the actual backend reached, and compare its configuration and dependency health with a working peer. For an authorized direct-backend test, curl can retain the intended hostname and TLS verification:
Bash command
This only isolates the intended path if proxies, service meshes and routing are understood; the direct test may legitimately bypass load-balancer behavior. I would not disable certificate verification to make it succeed.
If one backend is implicated, I would drain it using the supported procedure after checking remaining capacity and session behavior. I would preserve its evidence before restart, repair or roll back the difference, and validate representative requests on that backend before gradually restoring its traffic.
106. How do you diagnose network problems across container namespaces and host networking?
I would map the packet path explicitly: application socket, container namespace, virtual interface, host bridge or CNI datapath, policy enforcement, routing, address translation and destination. Host connectivity is only one comparison because containers can have different routes, DNS, source addresses and firewall policy.
I would obtain the current workload PID and namespace from the trusted runtime, verify it still belongs to the intended container, and inspect addresses, routes and listeners inside that scope. An authorized nsenter -t PID -n ip route examines the network namespace, but entering only that namespace does not automatically reproduce the container's filesystem-based resolver configuration. Inspecting DNS may require the runtime's supported execution or debugging mechanism.
I would compare traffic at adjacent boundaries with bounded captures or datapath counters. Lack of a host iptables rule is not proof of a missing policy when the platform uses nftables or eBPF. Namespace entry and packet capture often need elevated privileges and must follow policy. I would repair the narrow CNI, route or application issue rather than recreate all networking. Validation includes pod-to-pod, service and external paths that the workload actually depends on.
107. How do you investigate a Kubernetes node under resource or filesystem pressure?
I would connect Kubernetes' node condition to the underlying Linux resource and the kubelet's configured thresholds. DiskPressure can reflect filesystem bytes or inodes, while MemoryPressure and PIDPressure require different evidence. A healthy-looking free or df snapshot may miss the threshold crossing that caused an eviction.
With appropriate cluster read access, I would inspect node conditions, events and affected pod status, then correlate kubelet/runtime logs with host pressure and mount topology. nodefs, imagefs and, on supported configurations, containerfs are not guaranteed to be separate filesystems. I would verify the actual runtime and Kubernetes version rather than assume a particular layout.
Recovery should follow the orchestrator's supported lifecycle. I would not delete arbitrary files under its storage directories. Image garbage collection, log retention, capacity addition or relocating a workload may be appropriate after checking ownership and availability. Cordon prevents new ordinary scheduling but does not remove current workload; drain can disrupt services and must be planned. Node-pressure eviction is not a substitute for a graceful, disruption-budget-aware maintenance process. I would validate sustained condition recovery, successful scheduling and representative application traffic without repeated evictions.
108. How do you investigate a suspected Linux security incident while preserving evidence?
I would treat suspected compromise differently from an ordinary availability fault: preserve evidence, contain harm and involve the incident-response owner. I would record why the host is suspicious, the observation time and affected accounts or services, without treating an unusual process or login as proof by itself.
Before rebooting or cleaning up, I would determine which volatile evidence is needed and whether the host can safely remain online. Approved network isolation may limit harm while preserving the machine, but a stateful service may also need coordinated failover and fencing. Collection should use trusted tooling and a documented chain of custody: who collected which artifact, when, from where and how integrity was checked. Logs on a compromised host may be incomplete or altered, so I would corroborate them with identity, network and platform records.
I would not run a random cleanup script, delete suspicious files or upload memory images to a public service. Dumps and logs can contain secrets. Recovery might require rebuilding from a known-good image and rotating credentials through approved channels. I would validate the restored service and look for related exposure before closing the incident.
109. How do you troubleshoot an access failure after an identity-provider or group change?
I would separate identity lookup, authentication and authorization. A directory may return the user successfully while PAM denies login, or login may succeed while a process retains old supplementary groups. I would compare the affected account and service with one working case, avoiding broad changes to access policy.
For an SSSD-backed host, getent passwd username and id username help check the current directory view. I would compare that with the credentials of the already-running process, such as its Groups entry in /proc/PID/status, and review the relevant SSSD, PAM or application error. A fresh lookup does not retroactively update every existing session. I would also check domain connectivity, cached identity data, group nesting or mapping and the numeric IDs stored on affected files.
I would not clear the entire identity cache or replace a directory group blindly. First I would establish whether the authoritative record, local cache or session credentials are stale. A scoped refresh or new authorized session may be sufficient; a UID/GID migration needs a separate ownership plan. Validation includes the intended successful operation and a negative test confirming unauthorized access remains denied.
110. How do you investigate stale credentials or certificate rotation failures without revealing secrets?
I would compare what was distributed with what the running process actually loaded. A certificate file can be current while a service still serves the old certificate from memory, or one replica may have missed the rotation entirely. For tokens, I would inspect approved metadata such as issuer, audience, expiry and key identifier without copying the token into logs or chat.
For a public certificate file, a bounded metadata check is:
Bash command
I would compare the observed remote certificate using the intended hostname/SNI and normal trust validation. File metadata and a successful TLS connection alone do not prove the application used the intended client credential. I would also check clock accuracy, trust-bundle propagation, permissions and application reload behavior.
A safe rotation uses the product's supported overlap and reload procedure, with a canary and preserved prior configuration where policy permits. Compromised or expired credentials should not be restored merely as a convenient rollback. I would verify every relevant replica, then confirm old credentials are retired and no secrets entered diagnostic artifacts.
111. How do you diagnose cascading failures caused by retries and resource exhaustion?
I would compare user demand with internal attempt volume. If external traffic is steady but downstream requests, connections and waiting threads multiply, retries may be amplifying a smaller failure. I would trace where retries occur across clients, proxies and services; independent retry loops can multiply attempts across layers.
On Linux, I would correlate that amplification with socket counts, file descriptors, thread pools, memory and queue growth. The first saturated resource may differ from the original failure. For example, a slow dependency can hold connections long enough to exhaust a frontend pool, making healthy requests fail too. I would distinguish those secondary symptoms from the initiating event.
The safest mitigation is often to reduce amplification and admit less work: bounded retries, backoff with jitter, deadlines, concurrency limits or an approved degraded response. Retrying a state-changing request also needs an idempotency strategy; a timeout does not prove the first attempt did nothing. I would canary changes and retain the old policy. Recovery means useful work completes, queues drain and dependencies remain stable as traffic returns, not merely that the frontend stops logging errors.
112. How do you distinguish an application deadlock from slow external dependencies?
I would ask whether the process is making useful progress and where its threads wait. Low CPU and many sleeping threads fit both a deadlock and a healthy application waiting on a slow dependency. I would compare completion counters, request ages, thread states and dependency latency before attaching a debugger.
Repeated, narrowly scoped thread-stack samples can distinguish a stable lock cycle from threads progressing through slow network or storage calls. I would seek evidence of lock ownership and a circular dependency rather than label every futex wait a deadlock. A thread holding a lock while waiting on an external service can make the two explanations overlap.
I would prefer the application's supported diagnostic endpoint or runtime dump. Debugger attachment can pause threads and ptrace restrictions may apply; an all-thread backtrace can also expose sensitive arguments. If approved, I would capture the smallest useful sample and detach promptly. Draining and restarting one replica may restore availability after evidence is secured, but it does not prove the cause. Validation requires sustained progress under the triggering workload and a regression test for the lock ordering, timeout or dependency handling that was corrected.
113. How do you investigate file-descriptor leaks without simply increasing limits?
I would establish whether open descriptors grow with work and fail to return to a stable baseline. A busy service may legitimately maintain more connections, so one high count is not enough. I would compare descriptor growth with requests, reconnects, errors and completed cleanup cycles, using the process's actual soft limit rather than my shell's limit.
For a verified PID, a small read-only snapshot can include:
Bash command
The count is approximate during churn. If listing fails, wc can still print zero; discard that result. Access may be restricted. I would classify a bounded sample into sockets, regular files, pipes and anonymous descriptors, then correlate recurring targets or allocation paths. Listing every descriptor repeatedly can be expensive on a severely affected process.
A targeted, approved trace or application profiler may identify opens without corresponding closes, but payloads and paths need protection. Raising the limit only buys time and can shift failure into memory or downstream capacity. I would first drain or constrain the workload, preserve evidence and fix the missing cleanup. Validation should repeat the failure path and show descriptors plateau after multiple cycles.
114. How do you troubleshoot a regression that appears only after several days of uptime?
I would separate elapsed uptime from accumulated work and calendar events. A failure after three days could reflect a descriptor leak, growing heap, unreleased kernel resource, stale connection pool, credential expiry or a periodic job. Restarting the service resets several variables at once and can hide which one mattered.
I would preserve a time series of process age, request volume, memory categories, descriptor and thread counts, latency and relevant expiry times. Comparing replicas with different start times is useful: failures following process age suggest accumulation, while failures at the same wall-clock time suggest shared events. I would also check whether a deployment, log rotation or dependency renewal repeatedly precedes the symptom.
In a safe test environment, I would accelerate the suspected operation count rather than simply wait, while recognizing that genuine time-based expiry needs a separate test. I would not change the production clock to reproduce it. Temporary rolling restarts may be an approved mitigation, with capacity checks and evidence captured first. A durable fix must survive the original recurrence window or a validated equivalent workload, with counters demonstrating that the suspected resource no longer grows without bound.
115. How do you decide whether to fail over, roll back or repair in place?
I would choose the option that restores service with the lowest combined availability, data-integrity and security risk. The fastest command is not necessarily the fastest reliable recovery. I would first establish whether state is shared, whether the fallback is compatible and whether the destination has enough capacity.
Option | Condition I would verify first |
|---|---|
Fail over | Healthy independent target, current data and effective fencing |
Roll back | Known-good version and backward-compatible data/configuration |
Repair in place | Narrow cause, controlled change and acceptable recovery time |
Failover can spread overload or create split-brain if the original writer remains active. Rollback can fail after an irreversible schema or data-format change. In-place repair may preserve evidence but prolong user impact. I would state these tradeoffs, the current uncertainty and the decision owner rather than present one option as universally safe.
I would capture a small evidence bundle before the chosen action when time permits, define an abort threshold and retain a recovery path. Afterward, I would verify user transactions, data freshness, replication and backlog behavior before restoring full traffic. An unavailable rollback path must be explicit in the decision.
116. How do you validate a recovery when basic health checks pass but users still fail?
I would validate the operation users actually perform, from a representative client path and identity. A local TCP connection or /health response may prove only that one process is alive. It can miss authorization failures, stale replicas, bad routing, a broken write path or failures affecting only one backend or region.
I would recreate the original failed request class using approved test data and correlate it through the load balancer, service and dependency. Where a write is required, I would use a dedicated reversible test record and verify readback and cleanup rather than modify real customer data. I would check latency percentiles, error distribution and correctness, not just total success count.
I would also inspect recovery effects: retry storms, queues draining, cache warmup, replication lag and scheduled work that was skipped during the outage. Returning all traffic at once can recreate the failure. I would restore it in capacity-aware steps, keeping the mitigation reversible. The observation window should include the failure's known trigger or recurrence pattern. If one user cohort still fails, I would report partial recovery explicitly and continue diagnosis instead of closing the incident on a green dashboard.
117. How do you investigate a performance regression after a security patch?
I would establish that the regression follows the patch rather than a simultaneous workload, configuration or hardware change. I would record the exact kernel, library and microcode versions, whether a reboot occurred, and the security mitigation state. A package being installed does not prove the running kernel or process is using it.
I would compare patched and control systems under equivalent data, concurrency, topology and cache conditions. Tail latency, throughput and CPU per completed operation are more useful than a single utilization figure. A targeted profile might reveal increased system-call cost, scheduler behavior or I/O changes, but profiling itself needs permission, bounded overhead and compatible tooling.
I would check the vendor's advisory and supported fixes before attributing the slowdown to an unavoidable security tradeoff. On supported kernels, CPU vulnerability status files under /sys/devices/system/cpu/vulnerabilities/ provide context; they do not measure performance impact. I would not disable mitigations as a routine diagnostic. An isolated nonproduction comparison may be acceptable under security policy. Production rollback requires explicit risk approval and a supported alternative. Validation must demonstrate both acceptable application performance and the required security posture.
118. How do you design a rollback-safe production diagnostic experiment?
I would write a falsifiable hypothesis, the one variable to change and the result that would support or weaken it. For example: if a quota causes the latency spikes, changing that quota on one eligible replica should reduce throttling and tail latency without increasing errors or harming its neighbors. I would record the baseline and choose a comparable control.
Before execution, I would verify authorization, traffic scope, capacity headroom and the exact previous configuration. The experiment needs an owner, a bounded duration, observable stop thresholds and a tested rollback procedure. A configuration rollback cannot undo every effect, such as queued writes or lost sessions, so those risks must be considered separately.
I would start with existing metrics and add only the instrumentation needed to distinguish the hypotheses. Diagnostic output needs a size limit, access restrictions and a removal plan. I would avoid changing multiple tunables or letting automation silently overwrite the experiment. After the window, I would restore or formally adopt the setting through the normal configuration system, confirm temporary collectors stopped, and compare outcomes against the control. An inconclusive result should narrow the next experiment rather than justify broader changes.
119. What makes a Linux incident postmortem technically useful and blameless?
A useful postmortem explains how the failure happened, why safeguards did not contain it and how recovery was established. I would include user impact, a timestamped timeline, the relevant Linux and application configuration, evidence for the causal chain and the remaining uncertainty. Raw command output belongs in a protected evidence appendix rather than replacing the explanation.
For example, “an operator restarted the service” is an event, not a sufficient cause. The analysis should explain what information was available, why restart seemed reasonable, what hidden dependency or unsafe default mattered, and which system change would make the same decision safer next time. I would distinguish the initiating fault from amplifiers such as retries, exhausted descriptors or missing capacity.
Actions should be concrete and testable: detect a rising descriptor trend before the limit, add a regression test for the leak, and validate a drain procedure under realistic load. Each needs an owner and a completion criterion. I would also record what worked, such as a successful fallback or useful pressure metric. A blameless review preserves accountability for improvements without inventing certainty or assigning fault to a person for reasonable actions under incomplete information.
120. How would you explain an unresolved Linux incident and the next diagnostic step?
I would state what is known, what remains uncertain and what users are experiencing. I would separate observation from interpretation: “the affected workers stop completing requests while waiting in the storage path” is stronger than “the disk is broken” when device-side evidence is missing. I would explain any mitigation and whether it restored service fully or only reduced impact.
Next I would rank the remaining hypotheses and name the evidence that would distinguish them. For example, synchronous writes may be delayed by the local filesystem, the storage network or the array. A bounded sample correlating one worker's wait with device latency and array telemetry could separate those explanations. I would identify the needed access, collection overhead and the person responsible for each unavailable signal.
I would also give the next decision point: what finding would justify a rollback, failover or deeper trace, and what condition would stop the experiment. I would preserve the timeline and exact versions so another engineer can continue without repeating risky actions. If no root cause is proven, I would say so directly and keep the unresolved risk visible even when the immediate service has recovered.
Linux Troubleshooting Documentation and Further Reading
Examples assume Linux; systemd, GNU, iproute2, cgroup v2, and distribution-specific tools are identified where relevant. Confirm installed versions, kernel configuration, permissions, and workload assumptions. Local syntax checks or safe fixtures do not establish production recovery, performance, security, or portability.
Use these upstream project manuals, Linux kernel documentation, and vendor guides to verify command behavior and diagnostic boundaries. Match the instructions to the installed distribution and versions. Read-only inspection can still expose secrets or add load, while repair, tracing, failover, and security changes require appropriate operational authorization.
Similar Posts
