ppr-list-digest volume 3, number 50, message 4

Note: please don't spam any of the e-mail addresses which you see here. Follow this link if you want some addresses to misuse.


From: David Chappell <David.Chappell@mail.trincoll.edu>
Date: Fri, 30 Mar 2001 12:45:16 -0500
Subject: Re: PPR: Out of paper: no erros ?

Alain.Lachapelle@Heimannsystems.Com wrote:

> Hi,
> 
>   I have installed the latest 1.43 package.  I have also changed the
> strategy of handling printer errors.  Instead of doing constant "ppop
> status" to a file, then reading and parsing the file, I rely now on a
> responder, which works very well when jobs are printed successfully, when
> the paper tray is out and when a job is canceled.  But when an "out of
> paer" situation arises, it is a different story.  I put one piece of paper
> in the HP LaserJet 5 SiMX.  I print one successful job (responder works
> fine) the I print another job.  After some time the responder has still no
> shown any sign so I check with ppop status all.  Here is some output:
> 
> 
> Printer          Status
> ------------------------------------------------------------
> hp5simx          printing hp5simx-204
>                  Printer Status (PJL): OFFLINE "PAPIERFACH 2 LADEN      NORMALPAP. ISO A4" 41204 0
>                  Operation: Waiting for printer to catch up, stalled for 2 minutes
>                  Page Clock: 2 seconds (clock stopt)
> 
> 
> So, the printer is offline, the paper tray needs paper, but pprd is still trying to send the job.  Is there a way to immediately report such a condition to the responder so that the responder can then alert the user?  There are no mail alert services in use.  Only the responder is used.
> 
Yes, PPR can do what you want, but only for some printers.  Support for 
this sort of message from HP printer barely missed version 1.43.

Currently PPR sends 3 different kinds of messages.  These are alerts, 
responses, and commentary.

* An alert is sent to inform an operator that a printer cannot be 
contacted.  This might be because the printer is turned off or because 
the network has failed.

* A response is sent to a user to tell him the FINAL fate of his job.  
Typically this will be "your job has been printed" or "your job has been 
canceled".

* Commentary messages are sent while pprdrv is actually sending the job 
to the printer.  It tells what is happening as it happens.  Examples are 
"finished printing", "printer is out of paper", and "printer seems to be 
stalled".

Of these three, commentary is the least mature and most experimental.  
While the code to gather the information and even to dispatch it has 
been in PPR for a long time, getting this information to the users has 
been problematic.  I am currently working of fixing this.

You have noticed the improved "ppop status" output.  What I have done is 
taken much of the information which was being dispatched only as 
commentary and made it available as simple status as well.

The other thing I have done is added options such as --commentary to ppr 
(the command, not the package).  This makes it possible route the 
commentary messages to the owner of the current job, generally by means 
of the responder.  This makes some sense since in many cases the owner 
of the current job is the most logical person to put more paper in the 
printer.  This feature is currently not well documented.

I am thinking of some other improvements too.  One is to improve the 
commentary system so that it works much more like the alerts system and 
maybe can even be merged with it.  This would require it to keep track 
of the printer's 'mental state'.  Currently it just reacts to messages 
from the printer such as "I am out of paper".  I would like to to always 
know if the printer has paper or not.  That way it could dispatch an 
alert to an operator when an out-of-paper condition persisted for more 
than a certain number of minutes.  This is something I have been asked 
to do for your computer labs here are Trinity College.

By the way, the feature that missed 1.43 is support for generating 
commentary messages from HP PJL messages.  Currently these messages are 
only displayed in the ppop status output:

    Printer Status (PJL): OFFLINE "PAPIERFACH 2 LADEN      NORMALPAP. ISO A4" 41204 0

What I need to do is convert the code number (41204 in this case) to a 
LaserWriter style printer status message and feed that into the 
commenary system.  (By the way, your example illustrates beutifuly why 
PPR can't just parse the status message.  The status message in your 
example is from a printer which has had its display language set to 
something other than English.)

I will probably write this little missing piece of code next week.  
Anyone who wants to test it, please let me know and I will send you the 
patch as soon as it is ready.