[cups] Get the number of failed jobs
Alex Korobkin
korobkin+cups at gmail.com
Thu Apr 13 12:13:56 PDT 2017
While trying to use IPP to find out how many jobs have failed to print on
the CUPS printserver, I wrote this simple IPP request:
{
# The name of the test...
NAME "Get not-completed jobs"
# The operation to use
OPERATION Get-Jobs
# Attributes, starting in the operation group...
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword which-jobs not-completed
ATTR keyword requested-attributes
job-id,job-state,time-at-creation
# What statuses are OK?
STATUS successful-ok
# What attributes to display
DISPLAY job-id
DISPLAY job-state
DISPLAY time-at-creation
}
This request returns jobs that are in the processing-stopped state, but
never returns any that failed to print recently. I see them in the Web UI
Jobs log, but I don't see them in the IPP request results.
if I change ATTR which-jobs to "completed", I only see successful jobs.
What is the correct IPP request to retrieve the list of failed jobs which
are not in the processing-stopped state?
This is CUPS 2.2.2.
PS. Btw, CUPS 2.1 used to dump debug Job output for every failed job into
the error_log, even if LogLevel was info, and that was super helpful. CUPS
2.2 doesn't do that. Can this be enabled somehow?
--
-Alex
More information about the cups
mailing list