|
» |
|
|
|
The following procedures are used to administer
the LP Spooler: Table 4-1 in “Summary of Additional Printer Tasks” gives further
system-administration instructions for common management tasks. Table 4-2 in “Solving Common Printer Problems ” provides troubleshooting
information for potential print-management difficulties. Table 4-3 and Table 4-4 list HP-UX
commands that may be used to handle print requests. Stopping and Restarting the LP Spooler | |
Typically, the LP spooler is started during the
boot process. (To change the boot-up procedure to not start the scheduler,
edit the file /etc/rc.config.d/lp and set the
shell environment variable LP to 0.) The spooler must be stopped whenever the spooling
system is modified (such as when adding or removing a printer) and
then restarted after the modification is made. You can use either
the HP System Management Homepage or HP-UX commands to stop or start
the LP spooler. Using HP SMHAccess
the HP SMH homepage as root. Select Tools,Printer Management,Save or Restore Print Spooler Configuration. This will display a tool launching page. | | | | | NOTE: If your client console is a PC, you must have
an X Window Server running before executing this function. | | | | |
Click
on the Run button. This will display a printer management X Window. From the Actions pull-down menu, Choose Stop Print Spooler to stop the LP spooler. HP SMH asks for confirmation before stopping the
LP spooler. Choose Start LP Spooler to start or restart the LP spooler. HP SMH asks whether you want it started with or
without logging. If yes, logging information is kept in /var/adm/lp/log.
Using HP-UX CommandsEnsure
that you have superuser capabilities. Check
for active print requests. Ideally, it is best to wait until there
are no requests printing before stopping the LP spooler. In the above command, the -o option
prints the output of all output requests; the -i option
inhibits the reporting of remote requests (that is, lpstat shows local requests only). Stop
the LP spooler. All active print requests will stop, but remain
in the print queue. Restart
the LP spooler.
When the spooler is restarted, any print request
actively being printed at the time the lpshut command
was issued will be completely reprinted, regardless of how much of
the request was previously printed. Controlling the Flow of Print Requests | |
As superuser, you can use HP SMH or HP-UX commands
to control the flow of print requests to the queues of named printers
or printer classes. Using HP-UX CommandsTo allow print requests to be sent to a printer
or to a printer class, use the accept command.
For example: /usr/sbin/accept laser1 jet2 lj
|
See accept(1M) for details. To prevent print requests from being sent to a
printer or printer class, use the reject command.
For example: Enabling or Disabling a Printer | |
You can use HP SMH or the HP-UX commands enable and disable to activate or deactivate a printer
for printing. You do not need superuser capabilities for these commands. You can issue individual enable and disable commands for each printer or issue
one command separating each printer by blank spaces. For example: /usr/bin/enable laser1 laser2 laser3
|
You can enable or disable individual printers
only, not printer classes. By default, any requests printing when
a printer is disabled are reprinted in their entirety when the printer
is reactivated. A printer that has been disabled can still accept
new print requests to be printed at a later time unless it has been
prevented from doing so by the reject command. See enable(1) anddisable(1) for
details. Setting a Printer’s Fence Priority | |
A fence priority is a value (0 to 7) associated with a printer and used to control
access by print requests. A print request must have a value equal
to or greater than the printer’s fence priority or it will
remain on the print queue. You can assign the fence priority using HP SMH
or HP-UX commands. To use HP-UX commands, follow these steps: Ensure
that you have superuser capabilities. Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. Set
the printer’s fence priority (use a value from 0 to 7). For
example: /usr/sbin/lpfence myprinter 5
|
Restart
the LP spooler:
Changing a Printer’s Default Request Priority | |
Ensure
that you have superuser capabilities. Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. Change
the priority. For example: /usr/sbin/lpadmin -pmyprinter -g7
|
If you do not specify the -g option,
the default request priority is set to zero. Restart
the LP spooler:
Summary of Additional Printer Tasks | |
Table 4-1 summarizes
additional printer tasks. Refer to the command’s manpage for
details. In this table, LJ-1234 and LJ-1829 represent sample print requests; lj1 and lj2 represent printers. Table 4-1 Additional Printing Tasks Task | Example | Additional
Information |
---|
Move a print request to another
location. | lpalt LJ-1234
-dlj2 | lj2 is a destination printer or printer class. See lpalt(1). | Cancel a print request. | cancel LJ-1234 | LJ-1234 is a unique request ID number returned by lp or lpalt. See cancel(1), lp(1), and lpalt(1). | Change the priority of print
requests. | lpalt
LJ-1829 -p3 | This
changes LJ-1829’s priority
to 3. See lpalt(1). | Display statistics about
LP spooler activity. | lpana | To log spooler
activity, start the spooler by entering lpsched with the -a option. Such data is useful for configuring
the spooler system for optimum operation. See lpana(1M). | List request id numbers. | lpstat -o | See lpstat(1). | Move all print requests from
one printer destination to another. | lpshut
lpmove lj1 lj2
lpsched | lj1 and lj2 are source and destination printers or printer classes. You must
issue lpshut and lpsched. See lpmove(1M) and lpsched(1M). | View the status of printers
and print requests. | lpstat | For detailed
status information on the spooler, print requests, and printers, use
the -t option to lpstat. See lpstat(1). |
Solving Common Printer Problems | |
Table 4-2 summarizes
printer problems and possible solutions. Table 4-2 Printer Problems and Solutions Problem | Solution |
---|
Printer will not print. | Check to see if the printer is enabled,
is accepting requests, the scheduler is running, and the device file
is correct. For example, specify Make sure the printer is plugged in and turned
on. Check to see whether the printer is out of paper or
has a paper jam. If the printer supports both serial (RS232)
and parallel interfaces, verify that the cable is properly connected
to the printer and the computer, and that the printer is configured
for the correct interface. If the printer is a remote
printer, verify that the remote system and its spooler are running,
verify that the printer is enabled and accepting requests on both
local and remote systems, verify that the remote spooler daemon is
running on the remote system. Check other entries in the procedure “Adding a Remote Printer to the LP Spooler ”. If
LP spooler was started with logging enabled, consult/var/adm/lp/log for possible clues about the problem. | Output being printed is not
what you want. | Cancel the job.
For example: | Printing does not resume
after paper jam or paper out. | To restart a listing from the beginning: Take printer offline Issue the disable command Clear jam or reload paper Put printer online Issue the enable command
To restart a listing from the stopping
point: Take printer offline. Clear jam or reload paper Put printer online. If printing does not resume, issue the enable command
| The LP spooler configuration
needs to be restored. | Use the “Save/Restore Print Configuration” menu item in HP SMH. | The LP spooler will not start
when using lpsched. | Enter rm /var/spool/lp/SCHEDLOCK and try again (you must be superuser). | The LP spooler will not stop
when using lpshut. | Enter where process_id can be found with the command (see ps(1)). |
Typical LP Commands for Users and LP Administrators | |
Any user can queue files to printers, get status
of the LP system, cancel any print job, and mark printers in and out
of service. The following LP commands can be issued by any
user. Consult the HP-UX manpage for options and usage. Table 4-3 LP Spooler User Commands Command | Description |
---|
lp(1) | Sends a print request to a printer or plotter | lpstat(1) | Prints information about the status of the LP spooler. Reports status
of the scheduler, printers, printer classes, and default system printer. | cancel(1) | Cancels print requests of spooled files, specified by request IDs. | enable(1) | Changes the status of the named printer to activate it and enable
it to print spooled requests. | disable(1) | Changes the status of a named printer to deactivate it and disable
it from printing spooled requests. | lpalt(1) | Alters a printer request; issues a new request ID. |
LP administrators can change the configuration
of the system, mark printers in and out of service, start and stop
the system. Table 4-4 LP Administrator Commands Command | Description |
---|
lpshut(1M) | Shuts down the printer scheduler. | lpadmin(1M) | Multifaceted command used to manage the LP spooler. Capabilities
include adding/removing printers, changing class members, associating
a device file with a printer, assigning an interface for a printer,
setting a system default destination. | accept(1M) | Allow a print destination to accept requests. | reject(1M) | Prevent a print destination from accepting requests. | lpsched(1M) | Schedules print requests for printing to destinations; typically
invoked at system startup. | lpmove(1M) | Moves requests from one printer to another. | lpfence(1M) | Defines the minimum priority for which a spooled file can be printed. |
|