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

printer class called “accounts”. A printer can belong to more than one class, however remote
printers cannot belong to a printer class. It is not necessary to have every printer be part of a
class; you can have some of your printers grouped in classes while others remain independent.
To use a printer class you direct print requests to the class, name rather than to a specific printer.
The print request is spooled to a single print queue and printed by the first available printer in
the class. Thus, printer usage can be balanced and reliance on a particular printer can be
minimized.
To create a printer class, see the procedure “Creating a Printer Class” in the HP-UX System
Administrator’s Guide: Configuration Management (Chapter 6: Configuring Printers). Also see the
procedures “Removing a Printer from a Printer Class” and “Removing a Printer Class” in the
same chapter.
Print Destination
The print destination is the printer or printer class where a file containing the print job will be
queued. Several commands for the spooler require you to specify a print destination. You can
appoint one print destination in your spooler to be the system default printer. Each user can also
personalize which printer is their default printer by setting a shell environment called LPDEST.
When LPDEST is defined in a users environment, the printer represented by that variable takes
precedence over the system default printer.
Example 3-3 Default Printer (example)
For example, if the system default printer for a server is defined as laser1 and a user has defined
the environment variable LPDEST with the value ceo_print, then unless the user specified a
print destination their print requests will be sent to the destination ceo_print. A different user
on the same server with no LPDEST environment variable defined will have their print jobs
directed to laser1 unless they specifically identify a print destination.
Priorities of Printers and Print Requests
In an environment where there is a lot of competition for a given printer or group of printers,
the line printer spooling system offers several ways to prioritize print jobs so that critical print
jobs can effectively “jump to the head of the line”.
Both printers and print requests have priority values associated with them. Typically, print
requests are handled by a printer in the order they are received. By default, print requests have
the printers default priority and are printed on a first-in-first-out basis. However, print jobs can
be assigned priority values to raise or lower their priority, using the -p option of the lp command.
Priority values range from 0 to 7, with 7 being the highest priority. See lp(1) for details.
The priority of a print request can be altered by using the lpalt command. A printers default
request priority can be set using the lpadmin command. See lpadmin(1M) and lpalt(1) for details.
If multiple print requests are waiting to be printed on a specific printer and all have priorities
high enough to print, the printer will print the next print request with the highest priority. If
more than one print request has the same priority, print requests with that priority will print in
the order they were received by the spooler.
Similarly, a priority fence value can be assigned to each printer to set the minimum priority that
a print request must have to print on that printer. A printers fence priority is used to determine
which print requests get printed; only requests with priorities equal to or greater than the printers
fence priority get printed. The idea is to lower the fence outside peak usage hours, perhaps via
crontab scripts. For more information, see crontab(1M) and cron(1M). This would allow low
priority print jobs submitted during the day to be printed in the evening when the fence priority
was lowered. See lpadmin(1M) and lpfence(1M) for additional details.
Printing 69