Wednesday, January 19, 2011

Managing Printers in HP-UX

Configuration File:
/etc/rc.config.d/lp

Commands:

To stop LP Spooler:
# lpshut

To restart LP Spooler :
# lpshed

To accept print requests :
# accept printerA

To reject future print requests :
# reject -r"Use alternate printer - PrinterB" printerA

To cancel print requests :
# lpcancel printerA

To enable the printer to process requests :
# enable printerA

To disable the printer from processing requests :
# disable -r"PrinterA is disabled" printerA


To view jobs in a print queue :
# lpstat -o printerA

To move the jobs between printers :
# lpmove printerA printer B

To remove the printer :
# lpadmin -xprinterA

To remove a printer from a class :
# lpadmin -pprinterA -rclass1

To set the printer's fence priority (use a value from 0 to 7) :
# lpfence printerA

To cancel a print job :
# cancel job#

To list request ids of all the print jobs:
# lpstat -o

To view view the status of printers and their jobs :
# lpstat

To check the functionality of a printer :
# lpstat -t