You can get the net-snmp (AKA ucd-snmp) package from:
http://net-snmp.sourceforge.net
If you have an HP printer with a JetDirect, then you can try:

-- totalEnginePageCount
snmpget -v 1 -c [community]  .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0
-- totalColorPageCount
snmpget -v 1 -c [community]  .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.7.0
-- pcl-total-page-count
snmpget -v 1 -c [community]  .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.3.5.0
-- postscript-total-page-count
snmpget -v 1 -c [community]  .1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.4.5.0
-- duplex-page-count
snmpget -v 1 -c [community]  .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22

Example:
+ snmpget -v 1 -c public h31 .1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0
SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.4.1.2.5.0 = INTEGER: 3918

The following is in the HP JetDirect MIB file
jdmib499.mib (... Ummm... no, I do not know where the master copy is,
or if there is an update)

-- PML objects
-- Generally, if PML is supported by the JD card and printer, PML object 
-- requests are repackaged by JetDirect from snmp format into "pml"
-- and transmitted to the printer.  Upon asynchronous return from the 
-- printer, the "pml" format data is repackaged back to snmp format
-- and returned to the originator.  If a pml object request is received
-- by the JD card, and PML is not supported on that hardware combination
-- then JD card returns a NONAME error.

-- PML objects (.1.3.6.1.4.1.11.2.3.9.4.2...) are not defined by this mib.
-- For definitions see appropriate printer mibs.

-- The following PML objects are exceptions to the "general" passthru
-- processing described above.  For hardware combinations that support
-- PML, these requests are passed thru as described above.  For hardware
-- that does not support PML, JD attempts to provide the data from another
-- source (BIO, or Novell jobAccounting) rather than return the error
-- specified  above.  Mib definitions for these objects are contained in
-- the PML mib.  These are repeated here for reference.  They are commented
-- out to avoid compile errors resulting from incomplete tree. 

-- 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0
--totalEnginePageCount OBJECT-TYPE
--    SYNTAX     INTEGER
--    ACCESS     read-only
--    STATUS     mandatory
--    DESCRIPTION
--        "The total number of pages printed on the device as determined by
--         PJL requests/responses.  This value is normally a printer based
--         MIB value.  However, the JetDirect product can use PJL to determine
--         an approximate page count in some situations.  See the PML object
--         definition (TOTAL-ENGINE-PAGE-COUNT) for more details."
--    ::= { notYetStubbed 5 }

-- 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.7.0
--totalColorPageCount OBJECT-TYPE
--    SYNTAX     INTEGER
--    ACCESS     read-only
--    STATUS     mandatory
--    DESCRIPTION
--        "The total number of color pages printed on the device as determined
--         by PJL requests/responses.  This value is normally a printer based
--         MIB value.  However, the JetDirect product can use PJL to determine
--         an approximate page count in some situations.  See the PML object
--         definition (TOTAL-COLOR-PAGE-COUNT) for more details."
--    ::= { notYetStubbed 7 }


Using the MIB for HP4000: http://www.wtcs.org/snmp4tpc/MIBS.htm#HP

h110: {136} % snmptranslate -m ALL -IR -On pcl-total-page-count.0
Unlinked OID in Printer-MIB: printmib ::= { mib-2 43 }
.1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.3.5.0

h110: {137} % snmptranslate -m ALL -IR -On postscript-total-page-count.0
Unlinked OID in Printer-MIB: printmib ::= { mib-2 43 }
.1.3.6.1.4.1.11.2.3.9.4.2.1.3.3.4.5.0

h110: {143} % snmptranslate -m ALL -IR -On duplex-page-count
Unlinked OID in Printer-MIB: printmib ::= { mib-2 43 }
.1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22



-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to