Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? |
|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Deal_with_busy_devices.html. Deal with busy devicesConceptUnderstand what can cause a process to hang, how to detect related processes, and how to fix the situation. IntroductionOccasionally there are situations where a userland process can completely hang due to kernel being stuck in the I/O path.
The most common way this could happen is by using The first step is to identify the process that's stuck.
In most cases, this is obvious since it's the process the user has just started or is currently interfacing with.
But even in this case, it's useful to find out more information about the process for future reference and to help debug the problem.
A good starting point is the
TODO: maybe use different switches or use -o because u + l duplicates some fields and anyways the output is too long to fit on console or in book :) will display a table containing (a)ll processes, even those without an attached terminal (x), together with (u)ser information and (l)ock channels.
The last information is the same as the "STATE" field shown by the TODO: show example of WCHAN, STAT or other fields that indicate hung process TODO: maybe cross-reference with View and configure system hardware? fstat: identify active files umount: unmount file systems lsof: list open files ExamplesPractice ExercisesMore informationps(1), fstat(1), kill(1), umount(8) and the third-party lsof utility
|