You can set the event flags on the Event flags tab to cause EasySpooler to notify you when, for example, a destination goes off line, a destination has been detached, or a document has finished printing. The event facility monitors up to fifteen different printing events and alerts you to each time an event occurs. You can have it notify the same person for all events, a different person for each event, or different people for different groups of events. Moreover, you can have it notify you with a pop-up window (Windows or X Window), an email, a page, or any means your computer allows.
All event flags are set to NO (turned off) by default.
To change any of the settings:
Click Admin in the main menu.
Select Global Tuning from the menu options. The Global Tuning Parameters page opens.
Click the Event Flags tab.
Change the settings.
Click OK The new settings takes effect.
EasySpooler maintains the event flag settings in the file $LPSDIR/adm/lpsd.default. If an event flag is set to Yes, the program that monitors it writes an appropriate record into the fifo file $LPSDIR/adm/events when the event occurs. The event daemon , lpseventd, reads this information out of the fifo and then reports these events in the way you specify.
NOTE: If the events fifo does not exist, the despooler (lpsd) creates it. The programs write to events only if an active process (like lpseventd) is reading it.
The programs that monitor these events and the events they monitor are as follows:
Program |
Event |
llp |
9, 10, 11, 13, 14, 15 |
lps |
2, 3 |
lpsd |
5, 6, 7, 12 |
lpsNet |
9, 10, 11, 13, 14, 15 |
lpsfilt |
1, 4, 8, 13, 14, 15 |
You initiate event processing by
We suggest that events ignored by the event daemon (lpseventd) be turned off (set to n) since event generation consumes system resources. This is especially true of events 5, 6 and 7.
If any flag is set to Yes, the despooler automatically creates a named pipe, the events fifo file (events) and, if present and executable, starts the processor $LPSDIR/adm/bin/lpseventd. The programs monitoring these events write these events into the fifo only if there is an active process (like lpseventd) reading the file. When you stop the despooler (lpsd), it generates event number 99 to tell lpseventd to halt.
The format of an event record is:
999 99999999999
where the first number is the event number and second number is the location of the spool file record within queue or the destination number for events 2 and 3.
The program lpseventd can be either a shell script or an object program. The shell procedure distributed with EasySpooler is a working script, but the administrator can customize it.
Finally, the global tuning timing parameter requestfid supports events 5, 6, and 7. The value of this parameter is the time the despooling child process will sleep before starting the print if one of these events occurred. This timer is designed to allow lpseventd ample time to prohibit despooling on a destination (suspend printing) to enforce a Form ID change, or whatever task you want to perform. The default value of requestfid is 9 seconds, but you can set a different time interval.
When a destination detaches, have EasySpooler email a message.
Where lpseventd processes event 3 (detach, around line 73), simply spool an appropriate message (either from a file or a “here” document) to your email destination, and include the relevant email address(es) on the command line. You may want to set up an alias with the proper command line parameters and then spool to that alias.
Document alerts (event flag 12) enable you to request an event when a ready document has been in the Document List too long. Once the event is generated, you can program the event daemon to take whatever action is needed.
The document alert event takes place when
qalertime seconds have elapsed since the document entered ready status (usually this means when the document was spooled)
qalertime seconds have elapsed since the last alert event was triggered
Thus, when you set event flag 12 to y, an event is triggered at each qalertime interval as long as the document is in ready status. The interval may be specified at the system level (setting qalertime global turning parameters), the destination level (changing the qalertime field in the printer record), or the individual document level (setting the qalertime field in the document record in queue). If the field is zero in the document record, the printer record is checked. If the field is zero in the printer record, then the setting in the global tuning parameters file is used. If the system-wide parameter is missing, the default is 120 seconds.
NOTE: Setting the parameter to zero at the system level disables the feature globally: if you set the global tuning parameter to zero (qaltertime=0), the system never generates an alert event or writes a reason code into the document record.
When the alert is generated (and at other times; see below), the system places a reason code into the document record to indicate why the document is not printing. These reason codes, listed in descending order of priority, are as follows
Code |
Reason |
3 |
Printer not in printer table (internal error) |
B |
EasySpooler administrator does not have read permission |
6 |
Data type mismatch |
5 |
Correct form is not loaded |
4 |
Future time to print has not been reached |
9 |
No dynamic address |
1 |
Destination is detached |
D |
Deferred; document priority is too low for destination's fence value |
A |
All members of a failover pool are detached |
2 |
Destination is currently busy |
7 |
Document destination is an empty pool |
8 |
Pool printer page range does not allow this document |
If more than one reason applies, the error is reported with the highest priority code number. By default, this field is not displayed. If you spool the document to a pool, then it uses the reason code from the last attempted pool member.
EasySpooler always updates queue (writes a reason code in the document record). It does this regardless of whether or not it generates an event. Two factors influence the time interval between these updates to queue:
Whether or not EasySpooler is using cache
The value of qalertime
If EasySpooler is using cache, then it updates queue every qalertime seconds.
If EasySpooler is not using cache, then it updates queue on every scan. If it is writing an event to events (position 12 in event_flags is y), then it writes the event every qalertime seconds, regardless of whether or not it is using cache.
_______________________________