HP-UX System Administrator's Guide: Overview

Printing
Printing on HP-UX is accomplished through a subsystem known as the HP-UX Line
Printer Spooling System.
Overview of the HP-UX Line Printer Spooling System
The Line Printer Spooling System (spooler) is a set of programs, shell scripts, and directories
that controls your printers and the flow of data going to them.
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 78). 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).
76 Major Components of HP-UX