Your organization's overnight ETL job (pid 4273) has stopped responding. The ps output shows the process state as D (uninterruptible sleep). The job writes to /data/archive, an NFS mount that occasionally hangs. Before killing the job or remounting the share, you want to verify which file on /data/archive the process currently has open without stopping it. Which single command will give you that information?
Force-terminate the job with kill -9 4273
Restart the service using systemctl restart etl.service
The lsof utility enumerates every open file descriptor that a process holds. Using the -p option limits the output to one PID, so lsof -p 4273 lists the exact path of each file, socket, or device the stalled job has open-quickly confirming whether it is blocked on the NFS mount.
Attaching strace might show no new information while the process is stuck inside an uninterruptible I/O syscall, so it often fails to reveal the resource. Sending kill -9 would attempt to terminate the job but does not deliver a signal to a task in the D state and forfeits the chance to collect data. Restarting the systemd unit stops and restarts the service but likewise yields no insight into the file causing the hang. Therefore, lsof -p 4273 is the most effective, non-intrusive diagnostic step.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the `lsof` command in Linux?
Open an interactive chat with Bash
What does a process in the `D` (uninterruptible sleep) state indicate?
Open an interactive chat with Bash
Why is `strace` less useful for diagnosing a process in an uninterruptible sleep state?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access