LLI Wiki — My Digital Knowledge Base

CUPS on Linux: monitor and unblock a print queue

lpstat, cupsenable and cancel commands, and a procedure to unblock a CUPS print queue.

A memo of CUPS commands to monitor printers and print queues on Linux, and a procedure to unblock a queue.

Query commands

Command Purpose
lpstat -r Scheduler (spooler) status
service cups status CUPS service status
lpstat -p [printer] Status of all printers or one printer (enabled or disabled)
lpstat -a [printer] Whether printers accept jobs (accepting or rejecting)
lpstat -v [printer] List of printers and their associated devices
lpstat -o [printer] List of print jobs, for all printers or one
lpstat -t Show everything

Administration commands

Command Purpose
cupsenable printer Enable a queue
cupsdisable printer Disable a queue
accept printer Accept print requests again
reject printer Reject print requests for a printer
cancel job_id Cancel a print job

Unblocking a print queue

  1. Log in to the print server with an authorised account.
  2. Check the pending jobs:
lpstat -o printer01
  1. If needed, delete the blocking job:
cancel printer01-31983
  1. Check the printer status:
lpstat -p printer01

Logs

CUPS logs are in /var/log/cups/, notably the error_log file.

Notes

Mastodon LLIMastodon SocialFosstodon