On Tue, 8 Oct 2002 14:06:09 +0200 (DFT)
Margrit Lottmann <[EMAIL PROTECTED]> wrote:


> Where I can use this script ??? in ifhp ??? 

I thought it was under UTILS in the LPRng distribution.

Here's my most up-to-date version of the script, which is slightly different than what 
was sent out with one or two LPRng releases.

NOTE: You don't want to use PJL pagecount mechanisms for determining page counts with 
the LJ4100.  From what I have found, the pagecount PJL accesses is not updated 
immediately, where the pagecount accessed via the SNMP stack is.

To use:

 - fix perl path in check_printer_status.pl
 - ln -s check_printer_status.pl check_printer_waitend.pl
 - ln -s check_printer_status.pl check_printer_pagecount.pl
 - add the following to your ifhp.conf file for your printer model:

waitend=|<path_to>/check_printer_waitend.pl -m "\%s{model}" -d "\%s{dev}"
pagecount=|<path_to>/check_printer_pagecount.pl -m "\%s{model}" -d "\%s{dev}"

You can define status=<path_to>/check_printer_status.pl, although PJL status seems to 
work just fine for the HP printers.  Once you enter the world of Xerox printers, it's 
a different story. 

The attached copy fixes a problem dealing with waitend status after the printer was 
powercycled; the original release would hang forever (or until LPRng gets impatient) 
if someone cycled power on the printer.  Now it will recognize that situation as if 
the job finished.

I've had good luck with fetching pagecounts via SNMP so far.  I will admit we aren't 
as afflicted with users with too much time to try to defeat the system, though.

============================================================================
   John Perkins                   |   University of Wisconsin-Madison
   Associate Researcher           |   Department of Computer Science
   [EMAIL PROTECTED]               |   1210 W. Dayton St.
   608-262-0438/608-262-9997 FAX  |   Madison, WI  53706-1685
============================================================================


Attachment: check_printer_status.pl
Description: Binary data

<config>
  <snmp_params 
  	community="public"
	timeout="5" 
	retries="3" >
  </snmp_params>

  <printerdata 
     	name="hp4000" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.1.6.5.15" 
	status_cancelled="10"
	status_ok="5">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="hp4050" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.1.6.5.15" 
	status_cancelled="10"
	status_ok="5">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="hp4100" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.1.6.5.15" 
	status_cancelled="10"
	status_ok="5">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="hp4500" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.1.6.5.15" 
	status_cancelled="10"
	status_ok="5">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="hp8100" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.11.2.3.9.4.2.1.1.6.5.15" 
	status_cancelled="10"
	status_ok="5">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="phaser850" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1" 
	jobstatus_oid=".1.3.6.1.4.1.253.8.59.6.1.1.9" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	status_cancelled="14"
	status_ok="17">
	   <status> </status>
  </printerdata>
  <printerdata 
     	name="phaser5400" 
	pagecount_oid=".1.3.6.1.2.1.43.10.2.1.4.1.1" 
	jobstatus_oid=".1.3.6.1.4.1.253.8.59.6.1.1.9" 
	display_oid=".1.3.6.1.2.1.43.16.5.1.2.1.1" 
	status_cancelled="14"
	status_ok="17">
   	<status 
       	    Canceling.Job = "10007"
	    Clear.Paper.Path = "40022"
            Close.Covers = "40105"
            Close.Stacker.Door = "40105"
            Close.Tray = "40104"
            Disk.Error = "32000"
            Disk.Full = "32002"
  	    Duplex.Jam = "40093"
	    Duplex.Unit.Fail = "40124"
	    Exit.Jam = "40022"
	    Fan.Failure = "50006"
	    Flash.Error = "40053"
	    Flash.Full = "30036"
	    Flushing = "10007"
	    Format.Failed = "40083"
	    Fuser.Failure = "50011"
	    Initializing... = "10011"
	    Insert.MBF = "40026"
	    Insert.Tray = "40026"
	    Install.Print = "40046"
	    IOT.NVM.Fail = "40053"
	    Laser.Failure = "50013"
	    Open.Extend.MBF = "40053"
	    Load.Tray = "41200"
	    Low.Paper = "41200"
	    Maintenance.Kit = "35075"
	    Manual.Feed = "41100"
	    Memory.Failure = "40063"
	    Motor.Failure = "50023"
	    NV.Memory.Fail = "40053"
	    Offline = "10001"
	    Open.Rear.Tray.Dr = "40022"
	    Open.Stacker.Door = "30105"
	    PCL.Out.of.Memory = "30016"
	    Paper.Jam = "42100"
	    Paper.Size.Jam = "42100"
	    Please.Wait = "10024"
	    Power.Saver.On = "10000"
	    Print.Cartridge.OEM.ID = "40005"
	    Print.Using = "10023"
	    Processing = "10023"
	    Ready = "10001"
	    Remove.Output.From = "40019"
	    Remove.Print.Cart = "40047"
	    Replace.Print.Cartridge = "40046"
	    Stacker.Bin.Fail = "30107"
	    Stacker.Jam = "42100"
	    Toner.Low = "10006"
	    Tray...Jam = "42100"
	    Tray.1.Failure = "50020"
	    Tray.2.Failure = "50021"
	    Tray.3.Failure = "50022"
	    Tray...Empty = "41200"
	    Waiting = "10024"
	    Warming.Up = "10003"></status>
  </printerdata>
</config>


Reply via email to