HP-UX System Administrator's Guide: Overview HP-UX 11i v3 (B3921-90011, September 2010)

The spooler ensures that output from multiple users or processes doesn’t arrive on a printed
page intermixed, yielding a printout that is useful to no one. With the line printer spooling system
you can also:
Give priority to print requests from certain users/processes
Group printers so that they share a common input print queue
Give priority to some printers over others
Define a system default printer (to be used whenever a print request does not specify a print
destination)
Control the acceptance or rejection of incoming print requests to specific print queues
Control the printing of jobs that have already been submitted
Submit print requests to spoolers on remote systems (remote printing of local jobs)
Accept print requests from spoolers on remote systems (local printing of remote jobs)
Cancel previously submitted print jobs
To understand the flow of data through the spooler, think of it as a plumbing system, as shown
in Figure 3-7 (page 66). The data in the form of print requests (print jobs) enters the system like
the “water in the plumbing system. Directories known as print queues serve as temporary holding
tanks for the print requests until they are sent to a printer to be printed. The print queues and
the scheduler control the flow of print jobs to the defined printers:
Accepting, rejecting, enabling, or disabling print requests controls the data flowing through the
spooler as valves would control the flow of water in a real plumbing system.
the commands accept and reject control the flow of print requests into the print queues
the commands enable and disable control the flow of print requests out of the print queues to
the printers
Based on the status of the various print queues and printers, the line printer scheduler (called
lpsched) accepts incoming print requests, routing them to the print queues; and it functions as
an automated flow controller in the “plumbing” system, routing print requests from the print
queues to the physical printers on a first-in-first-out basis (while accounting for the priority of
print requests and printers).
Interface files (written as shell scripts) near the end of the data flow serve as pumps that “pump”
the orderly flow of data to the printers.
The line printer scheduler:
prevents intermixed listings
monitors printer/print request priorities
adjusts printer status and availability
logs spooler activities
If one printers “drain gets clogged”, you can reroute a print request from that printer to another
by using the lpmove command. Unwanted data can be “flushed” from the spooling system with
the cancel command.
Printing 65