Académique Documents
Professionnel Documents
Culture Documents
1 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
HP-UX System Administrator's Guide: Routine Management Tasks: HP-UX 11i Version 3 > Chapter 4 Managing
Printers
Index
2 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
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 SMH
1.
Access the HP SMH homepage as root.
2.
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.
3.
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 Commands
1.
Ensure that you have superuser capabilities.
2.
3 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Check for active print requests. Ideally, it is best to wait until there are no requests printing before stopping the LP spooler.
/usr/bin/lpstat -o -i
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).
3.
Stop the LP spooler.
/usr/sbin/lpshut
All active print requests will stop, but remain in the print queue.
4.
Restart the LP spooler.
/usr/sbin/lpsched
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.
4 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
To 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
NOTE: If the reject command is executed on a printer class, but not on members of the class, users can still specify a specific printer (not the class) in
subsequent print requests until an accept command on the class is reissued.
If, however, you execute reject for all individual printers in a class, but not for the class itself, the print requests will remain in the class request directory until
at least one of the printers in the class is permitted to process print requests by the accept command. See reject(1M) for details.
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.
5 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
4.
Restart the LP spooler:
/usr/sbin/lpsched
6 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
If you do not specify the -g option, the default request priority is set to zero.
4.
Restart the LP spooler:
/usr/sbin/lpsched
7 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Table 4-1 summarizes additional printer tasks. Refer to the commands 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
lj2
cancel LJ-1234
LJ-1234
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).
lpstat -o
See lpstat(1).
lpshut
and lj2 are source and destination printers or printer classes. You must
issue lpshut and lpsched. See lpmove(1M) and lpsched(1M).
lj1
lpsched
lpstat
For detailed status information on the spooler, print requests, and printers,
use the -t option to lpstat. See lpstat(1).
8 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Problem
Solution
Check to see if the printer is enabled, is accepting requests, the scheduler is running, and the device file is
correct. For example, specify
lpstat -t
9 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Problem
Solution
cancel laserjet-1194
Enter
10 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Problem
Solution
rm /var/spool/lp/SCHEDLOCK
Enter
kill-15 process_id
Description
Sends a print request to a printer or plotter
11 of 11
http://www.kumanov.com/docstore/manuals/hp-ux/en/5992-4616/ch04s01.html
Command
Description
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)
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)
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)
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)
reject(1M)
lpsched(1M)
Schedules print requests for printing to destinations; typically invoked at system startup.
lpmove(1M)
lpfence(1M)
Defines the minimum priority for which a spooled file can be printed.