lpstat - eventualy report incorrect status

angelb angelb at bugarin.us
Thu Apr 26 13:50:04 PDT 2007


I'm not sure if this has already been reported but I noticed lpstat
will eventualy report incorrect status of a printer que currently in
rejecting jobs.

This can be duplicated in the servers.

First, confirm the printer queue is currently enabled and accepting
print jobs.

Now, from the web inteface, stop the que and then confirm the status
on the command line by lpstat:

[root at stlam506 bin]# lpstat -pabq
printer abq disabled since Thu 26 Apr 2007 03:38:45 PM CDT -
   Paused

Now, from the web interface, set the que to reject jobs then confrim
the status on the command line:

printer abq disabled since Thu 26 Apr 2007 03:38:45 PM CDT -
   Rejecting Jobs

At this point, you have a printer queue that is both stopped and
rejecting jobs.

Now, at the web interface, restart the printer queue(leave reject
for now), and confirm status:

[root at stlam506 bin]# lpstat -pabq
printer abq is idle.  enabled since Thu 26 Apr 2007 03:40:04 PM CDT

If you noticed, while the printer que is actively rejecting print
jobs, the "Rejecting Jobs" is no longer displayed.

I have a script that runs every 10-minutes that restarts print queues.
This worked well in CUPS 1.1, but with reject option in CUPS 1.2, I
needed to adjust my script. But at the moment, there's no simple way of
telling from the command line a printer que is currently set to reject
print jobs.

If you start with both start and accepting jobs on a printer queue and
then just set the que to "Reject Jobs", you'll get the following
status:

[root at stlam506 bin]# lpstat -pabq
printer abq is idle.  enabled since Thu 26 Apr 2007 03:40:04 PM CDT
   Rejecting Jobs

It would be nice if the first-line messages says the following
instead:

printer abq is rejecting jobs.

This can be usefull specially when CUPS automatically sets a printer
queu into stop and reject mode when it cannot communicate with it.

Thanks,
Angel







More information about the cups mailing list