On Tue, Nov 04, 2003 at 08:51:38PM +0100, Jerome Alet wrote:
> On Tue, Nov 04, 2003 at 07:21:08PM +0100, Henrik Edlund wrote:
> > On Tue, 4 Nov 2003, Jerome Alet wrote:
> >
> > JA> On Tue, Nov 04, 2003 at 04:12:37PM +0100, Henrik Edlund wrote:
> > JA> >
> > JA> > Most printers on the market today support the two MIBs needed, so this
> > JA> > method seems to be the best option. The same general implementation would
> > JA> > work with several printer models from different manufacturers, as long as
> > JA> > the printer supports SNMP and mentioned MIBs properly.
> > JA>
> > JA> Most (all ?) HP printers' internal counter is only updated in NVRAM
> > JA> every 10 impressions (pages), if you switch your printer Off at
> > JA> count=19, it restarts at count=10
> >
> > Does this relate to PJL only or SNMP also? Because I tested with the
> > following HP printers, and it works great, it counts up for every
> > impressions just as it should with SNMP:
> >
> > HP LaserJet 2100TN, HP LaserJet 4300, HP LaserJet 5M
>
> I've got an HP 2100 TN at home :
>
> [EMAIL PROTECTED]:~$ snmpget -v1 -c public -Ov imprime.ateur mib-2.43.10.2.1.4.1.1
> Counter32: 34942
>
> Now I switch it off and on again :
>
> [EMAIL PROTECTED]:~$ snmpget -v1 -c public -Ov imprime.ateur mib-2.43.10.2.1.4.1.1
> Counter32: 34940
> [EMAIL PROTECTED]:~$
>
> could this be my firmware which is too old ?
>
> (I've upgraded not very long ago)
>
> see this from HP labs :
>
> http://groups.google.com/groups?q=snmp+printer+nvram&hl=fr&lr=&ie=UTF-8&selm=37BBDD14.ACFFB4B%40hplb.hpl.hp.com&rnum=1
TOTAL-ENGINE-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0
(see prtmarkerlifecount below - this appears to be obsolete for HP)
DUPLEX-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22.0
PCL-TOTAL-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.3.5.0
POSTSCRIPT-TOTAL-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.4.5.0
TOTAL-COLOR-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.7.0
>From the HP LaserJet 8000 MIB:
-- (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1998.
--
-- LaserJet Series 8000 Printer Model Specific MIB. (Base Unit)
-- See also:
-- LaserJet Series 8000 Printer Multibin Mailbox Model Specific MIB.
-- (Multiple Input Tray and Multibin Mailbox Options)
-- LaserJet Series 8000 Printer Stapler Model Specific MIB.
-- (High Capacity Input and Multibin Mailbox with Stapler Options)
--
-- Generated on April 1, 1998.
--
^^^^^^^^^^^^^^^^^^^^^ Who says the HP Engineers do not have a sense of appropriatness?
AND from
-- (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1997.
--
-- LaserJet Series 4000 Printer Model Specific MIB.
--
-- Generated on August 4, 1997.
--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following entry is identical except for case and
whitespace
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in both MIBS
prtmarkerlifecount OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"The count of the number of units of measure counted during
the life of printer using units of measure as specified by
prtMarkerCounterUnit.
Refer to ftp://ftp.pwg.org/pub/pwg/pmp/drafts/pmib_031698.txt, for more
details in the Standard Printer MIB.
Additional information:
Replaces PML TOTAL-ENGINE-PAGE-COUNT.
The total engine page count is kept in NVRAM however
the NVRAM value is only updated every 10 impressions.
NOTE: The value returned by this OID will be incremented
every page but if power is lost between NVRAM updates,
up to 9 impressions of the page count may be lost. The
counter will be reset to zero after 999999 pages.
The page count is incremented when a sheet of media is
pulled from an input tray. A duplex printed sheet will
cause this counter to be incremented by two."
::= { prtMarkerEntry 4 }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is really an IMPRESSION
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ counter. Wording in other
places
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ confirms this.
Here are some more interesting extracts from the manufacturers MIBS.
Copyright by the various folks.
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP LaserJet 2200
.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceDescr.1
= STRING: HP LaserJet 2200
.1.3.6.1.2.1.25.3.2.1.3.1 = STRING: HP LaserJet 2200
A textual description of this device, including the device's
manufacturer and revision, and optionally, its serial number.
DEVICEDESCR=HP LaserJet 2200
Printer-MIB::prtGeneralPrinterName.1 = STRING: "HP LaserJet 2200"
.iso.org.dod.internet.mgmt.mib-2.printmib.prtGeneral.prtGeneralTable.prtGeneralEntry.prtGeneralPrinterName.1
= STRING: "HP LaserJet 2200"
.1.3.6.1.2.1.43.5.1.1.16.1 = STRING: "HP LaserJet 2200"
An administrator-specified name for this printer. Depending
upon implementation of this printer, the value of this
object may or may not be same as the value for the MIB-II
'SysName' object.
PRINTERNAME=HP LaserJet 2200
HOST-RESOURCES-MIB::hrDeviceStatus.1 = INTEGER:
unknown(1), running(2), warning(3), testing(4), down(5)
.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceStatus.1
= INTEGER: running(2)
.1.3.6.1.2.1.25.3.2.1.5.1 = INTEGER: running(2)
The current operational state of the device described by
this row of the table. A value unknown(1) indicates that
the current state of the device is unknown. running(2)
indicates that the device is up and running and that no
unusual error conditions are known. The warning(3) state
indicates that agent has been informed of an unusual error
condition by the operational software (e.g., a disk device
driver) but that the device is still 'operational'. An
example would be a high number of soft errors on a disk.
A value of testing(4), indicates that the device is not
available for use because it is in the testing state. The
state of down(5) is used only when the agent has been
informed that the device is not available for any use.
DEVICESTATUS=running
HOST-RESOURCES-MIB::hrPrinterStatus.1 = INTEGER:
other(1), unknown(2), idle(3), printing(4), warmup(5)
.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrPrinterTable.hrPrinterEntry.hrPrinterStatus.1
= INTEGER: idle(3)
.1.3.6.1.2.1.25.3.5.1.1.1 = INTEGER: idle(3)
The current status of this printer device.
PRINTERSTATUS=idle
Printer-MIB::prtMarkerLifeCount.1.1 = Counter32: 93118
.iso.org.dod.internet.mgmt.mib-2.printmib.prtMarker.prtMarkerTable.prtMarkerEntry.prtMarkerLifeCount.1.1
= Counter32: 93118
.1.3.6.1.2.1.43.10.2.1.4.1.1 = Counter32: 93118
prtmarkerlifecount OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"The count of the number of units of measure counted during
the life of printer using units of measure as specified by
prtMarkerCounterUnit.
Refer to ftp://ftp.pwg.org/pub/pwg/pmp/drafts/pmib_031698.txt,
for more details in the Standard Printer MIB.
Additional information:
Replaces PML TOTAL-ENGINE-PAGE-COUNT.
The total engine page count is kept in NVRAM however
the NVRAM value is only updated every 10 impressions.
NOTE: The value returned by this OID will be incremented
every page but if power is lost between NVRAM updates,
up to 9 impressions of the page count may be lost. The
counter will be reset to zero after 999999 pages.
The page count is incremented when a sheet of media is
pulled from an input tray. A duplex printed sheet will
cause this counter to be incremented by two."
PAGECOUNT=93118
Printer-MIB::prtConsoleDisplayBufferText.1.1 = STRING: "READY "
.iso.org.dod.internet.mgmt.mib-2.printmib.prtConsoleDisplayBuffer.prtConsoleDisplayBufferTable.prtConsoleDisplayBufferEntry.prtConsoleDisplayBufferText.1.1
= STRING: "READY "
.1.3.6.1.2.1.43.16.5.1.2.1.1 = STRING: "READY "
The content of a line in the logical display buffer of the
operator's console of the printer. When a write operation
occurs, normally a critical message, to one of the LineText
strings, the agent should make that line displayable if a
physical display is present. Writing a zero length string
clears the line. It is an implementation-specific matter
as to whether the agent allows a line to be overwritten
before it has been cleared. Printer generated strings shall
be in the localization specified by prtConsoleLocalization.
Management Application generated strings should be localized
by the Management Application.
STATUS=READY
Printer-MIB::prtAlertSeverityLevel.1.1 = INTEGER: warning(4)
.iso.org.dod.internet.mgmt.mib-2.printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertSeverityLevel.1.1
= INTEGER: warning(4)
.1.3.6.1.2.1.43.18.1.1.2.1.1 = INTEGER: warning(4)
other(1), critical(3), warning(4), warningBinaryChangeEvent(5)
The level of severity of this alert table entry. The printer
determines the severity level assigned to each entry in the
table. A critical alert is binary by nature and definition. A
warning is defined to be a non-critical alert. The original and
most common warning is unary. The binary warning was added later
and given a more distinguished name.
Printer-MIB::prtAlertGroup.1.3 = INTEGER: mediaPath(13)
.iso.org.dod.internet.mgmt.mib-2.printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertGroup.1.3
= INTEGER: mediaPath(13)
.1.3.6.1.2.1.43.18.1.1.4.1.3 = INTEGER: mediaPath(13)
other(1), hostResourcesMIBStorageTable(3), hostResourcesMIBDeviceTable(4),
generalPrinter(5), cover(6),
localization(7), input(8), output(9), marker(10), markerSupplies(11),
markerColorant(12), mediaPath(13),
channel(14), interpreter(15), consoleDisplayBuffer(16), consoleLights(17),
alert(18), finDevice(30),
finSupply(31), finSupplyMediaInput(32), finAttributeTable(33)
The type of sub-unit within the printer model that this alert
is related. Input, output, and markers are examples of printer
model groups, i.e., examples of types of sub-units. Wherever
possible, these enumerations match the sub-identifier that
identifies the relevant table in the printer MIB.
Printer-MIB::prtAlertDescription.1.3 = STRING: "Power Saver"
.iso.org.dod.internet.mgmt.mib-2.printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertDescription.1.3
= STRING: "Power Saver"
.1.3.6.1.2.1.43.18.1.1.8.1.3 = STRING: "Power Saver"
NOTE: Alert type codes have been added for the host resources
MIB storage table and device table. These additional types are
for situations in which the printer's storage and device objects
must generate alerts (and possibly traps for critical alerts)."
STATUS=alert SeverityLevel (AlertGroup) AlertDescription
- if the alert status level is critical
Printer-MIB::prtMarkerPowerOnCount.1.1 = Counter32: 1
.iso.org.dod.internet.mgmt.mib-2.printmib.prtMarker.prtMarkerTable.prtMarkerEntry.prtMarkerPowerOnCount.1.1
= Counter32: 1
.1.3.6.1.2.1.43.10.2.1.5.1.1 = Counter32: 1
The count of the number of units of measure counted since the
equipment was most recently powered on using units of measure as
specified by prtMarkerCounterUnit.
POWERONCOUNT=1
PCL-TOTAL-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.3.5.0
pcl-total-page-count OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"Total number of PCL pages printed by the device.
Additional information:
The PCL page count is kept in
NVRAM, and the NVRAM value is updated at least every
10 pages. NOTE: The value returned by this object will
be incremented every page but if power is lost between
NVRAM updates, up to 9 pages of the page count may be
lost. The page count counter will be reset to zero
after 16,777,215 (2^24-1) pages.
The page count is incremented when a sheet of media is pulled from an
input
tray. A duplex printed sheet will cause this counter to be incremented
by
two."
POSTSCRIPT-TOTAL-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.4.5.0
postscript-total-page-count OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"Total number of PostScript pages printed by the device.
Additional information:
This object is only supported if the PostScript
option is installed.
In The LJ Series 4000 the count is kept in NVRAM, and the
NVRAM value is updated at least every 10
sheets. NOTE: The value returned by this object will
be incremented every sheet but if power is lost between
NVRAM updates up to 9 sheets of the count may be
lost. The counter will be reset to zero
after 16,777,215 (2^24-1) pages. "
DUPLEX-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22.0
duplex-page-count OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"Total number of sheets of media that have been duplex
printed. A sheet is counted if it travels through the
duplex page path, regardless of whether or not marks are
made on the page. The POS will indicate if the value is
kept in NVRAM.
Additional information:
In The LJ Series 4000 the count is kept in
NVRAM however the NVRAM value is only updated every 10
sheets. NOTE: The value returned by this object will be
incremented every sheet but if power is lost between
NVRAM updates up to 9 sheets of the count may be
lost. The counter will be reset to zero
after 16,777,215 (2^24-1) pages. "
Note: from LJ2200 MIB:
TOTAL-ENGINE-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0
total-engine-page-count OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-write
STATUS optional
DESCRIPTION
"Total number of pages printed by the device. POS
indicates if the total engine page count is kept in
NVRAM, and the maximum supported value before the page
count rolls over to zero.
Additional information:
This object is stored in NVRAM. The maximum value of
this count is 1000000 before it rolls over to zero."
TOTAL-COLOR-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.7.0
total-color-page-count OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS optional
DESCRIPTION
"Total number of color pages printed by the device.
Additional information: Any page with one or more
color pixels is counted as a color page. Pages
that only contain black marks are not counted by
this object. The valid range of this object is 0
to 2^24-1. When the number of color pages printed
exceeds the maximum color page count, the value
will roll to zero. (Realistically, this should
never happen since that value is mo re than 16 times
the rated life of the engine.) A duplexed sheet of
media will cause the counter to be incremented by
two."
TOTAL-MONO-PAGE-COUNT .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.6.0
[printerdata default]
alert_oid =".1.3.6.1.2.1.43.18.1.1"
prtAlertSeverityLevel = ".1.3.6.1.2.1.43.18.1.1.2.1"
prtAlertDescription= ".1.3.6.1.2.1.43.18.1.1.8.1"
prtAlertGroup= ".1.3.6.1.2.1.43.18.1.1.4.1"
pagecount_oid =".1.3.6.1.2.1.43.10.2.1.4.1"
poweroncount_oid =".1.3.6.1.2.1.43.10.2.1.5.1.1"
devicestatus_oid=".1.3.6.1.2.1.25.3.2.1.5.1"
printerstatus_oid=".1.3.6.1.2.1.25.3.5.1.1.1"
#display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1"
status_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1"
devicedescr_oid=".1.3.6.1.2.1.25.3.2.1.3.1"
printername_oid=".1.3.6.1.2.1.43.5.1.1.16.1"
total_engine_page_count_oid= ".1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5"
duplex_page_count_oid= ".1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22"
pcl_total_page_count_oid= ".1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.3.5"
postscript_total_page_count_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.4.5"
total_color_page_count_oid= ".1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.7"
total_mono_page_count_oid= ".1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.6"
>
> > JA> Also some HP printers reset their counter to 0 every time they are
> > JA> switched off.
> >
> > Can anyone else confirm this? Do you have an online reference of this fact
> > documented somewhere?
>
> I think it's for lower quality models.
>
> > <rant mode="shameless">
> >
> > Too bad it is written in Python.
> >
> > </rant> :-)
>
> Why ? Doesn't seem to be a performance problem since most work is done
> in database accesses (PostgreSQL or OpenLDAP), and that configuring
> it to use ANY accounting method doesn't need that you know Python at all.
>
> (Feel free to answer privately if you prefer)
>
> bye,
>
> Jerome Alet
> --
> "A non-free program is a predatory social system that keeps people
> in a state of domination and division, and uses the spoils to
> dominate more." - RMS
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
--
Patrick Powell Astart Technologies
[EMAIL PROTECTED] 6741 Convoy Court
Network and System San Diego, CA 92111
Consulting 858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------