Bug 1434153

Summary: CUPS print jobs show incorrect number under the "pages" column
Product: Red Hat Enterprise Linux 7 Reporter: Bryan Mason <bmason>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact: Lucie Vařáková <lmanasko>
Priority: medium    
Version: 7.3CC: agk, ajgar17374, bmason, lmanasko, psklenar, thozza, zdohnal
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cups-1.6.3-33.el7 Doc Type: Release Note
Doc Text:
SNMP page counting can be now disabled in CUPS The simple network management protocol (SNMP) page counting currently shows incorrect information for certain printers. With this update, the CUPS printing system supports turning off the SNMP page counting, which prevents the problem. To do so, add `*cupsSNMPPages: False` into the printer's postscript printer description (PPD) file. The procedure for adding options into printer's PPD file is described in solution article at https://access.redhat.com/solutions/1427573 .
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 13:41:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1420851, 1465887, 1465928    
Attachments:
Description Flags
Proposed Patch none

Description Bryan Mason 2017-03-20 20:12:08 UTC
Created attachment 1264849 [details]
Proposed Patch

Description of problem:

  CUPS mechanism for reporting the number of pages in a print job
  using SNMP is unreliable.  Would like the ability to disable
  that mechanism.

Version-Release number of selected component (if applicable):

  cups-1.6.3-27.el7

How reproducible:

  100%

Steps to Reproduce:

1. Submit a largish print job (20 pages or more).  Wait for it to complete.

Actual results:

  CUPS Web interface will show some number of pages less than those 
  that were actually printed.

Expected results:

  CUPS should show the correct number of pages.

Additional info:

  Before it sends anything to the printer, the socket backend uses SNMP
  to get the printer's value for "prtMarkerLifeCount", which is the
  total number of sheets printed over the life of the printer.

  When the printer signals that the job is complete, the backend does a
  second SNMP request for "prtMarkerLifeCount".  It then computes the
  total pages in the job by subtracting the two values.

  The problem is that the printer is reporting that the job is complete
  before all the sheets have actually been printed.  Thus when the
  socket backend makes the second SNMP request, not all the pages in the
  job are accounted for, and the value is incorrect.

  The attached patch gives users the ability to disable SNMP page
  counting by adding:

    *cupsSNMPPages: False

  to the printer's PPD file.  When SNMP page counting is disabled, CUPS
  uses the "PAGE: 1 1" messages from the filters to increment the page
  count for the job.  The result reflects the actual number of pages in
  the job, but not necessarily the number of pages actually printed.

Comment 24 errata-xmlrpc 2018-04-10 13:41:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0782