Clear a stuck queue properly and prove the order of operations matters
Task
Demonstrate that spool files cannot be deleted while the service holds them open, which is why the standard procedure has its steps in the order it does.
Steps
- Create a queue if you do not have one, using a print-to-file or virtual device, and record it in
lab/queue/device.txt. - Submit a job and pause the queue so the job is held. Record the queue state in
lab/queue/held.txt. - With the spooler service RUNNING, attempt to delete the spool files directly and record the exact error in
lab/queue/denied.txt. - Stop the spooler service, delete the spool files, start the service, and record each step's output in
lab/queue/cleared.txt. - Write
lab/queue/order.mdstating why step three fails, why the documented procedure works, and what a user reporting 'nobody can print' would have been experiencing.
Verify
grep -c . lab/queue/device.txt
grep -c . lab/queue/held.txt
grep -c . lab/queue/denied.txt
grep -c . lab/queue/cleared.txt
grep -Eic 'spooler|service|open|lock' lab/queue/order.md
All four observation files non-empty and an explanation naming the service holding the files. The denied file is the important one: it is the evidence that the order of the documented procedure is load-bearing rather than ceremonial.
Notes
Use a virtual or print-to-file device. Holding a job on a shared office queue blocks everybody else's printing, which is the fault this lab is about rather than something to inflict.
This is an independent study companion for CompTIA A+ Core 1 220-1201 and is not produced by or endorsed by CompTIA.