LPC Requests

LPRng Reference Manual: 24 Sep 2004 (For LPRng-3.8.28)
Prev | Chapter 19. RFC 1179 - Line Printer Daemon Protocol | Next

# 19.8. LPC Requests

LPRng has extended the RFC1179 protocol to allow queue and printer control commands to be sent to the lpd server. The format of these commands are:

        \006printer user key [options]

The following commands are supported.

Table 19-3. LPC Commands

Command | Operation
--- | ---
Command | Operation
active [printer[@host]] | check to see if server accepting connections
abort (printer[@host] | all) | terminate server process printing job
disable (printer[@host] | all) | disable queueing
debug (printer[@host] | all) debugparms | set debug level for printer
enable (printer[@host] | all) | enable queueing
hold (printer[@host] | all) (name[@host] | job | all)* | hold job
holdall (printer[@host] | all) | hold all jobs on
kill (printer[@host] | all) | stop and restart server
lpd [printer[@host]] | get lpd PID for server
lpq (printer[@host] | all) (name[@host] | job | all)* | invoke lpq
lprm (printer[@host] | all) (name[@host]|host|job| all)* | invoke lprm
move printer (user|jobid)* target | move jobs to new queue
noholdall (printer[@host] | all) | hold all jobs off
printcap (printer[@host] | all) | report printcap values
quit | exit LPC
redirect (printer[@host] | all) (printer@host | off )* | redirect jobs
release (printer[@host] | all) (name[@host] | job | all)* | release job
reread [printer[@host]] | lpd reread database information
start (printer[@host] | all) | start printing
status (printer[@host] | all) | status of printers
stop (printer[@host] | all) | stop printing
topq (printer[@host] | all) (name[@host] | job | all)* | reorder job
defaultq | default queue for lpd server
local (printer | all) | client printcap and configuration information
server (printer | all) | server printcap and configuration information

Many of these commands support extremely specialized operations for print queue management, However, the following are the most commonly used and are supported by the BSD lpd print spooling system as well:

- start, stop, enable, disable Start and stop will start and stop printing for a specified queue. Enable and disable enable and disable sending and/or accepting jobs for the queue.

- abort, kill Abort will cause the process doing the actual job printing to be terminated. Kill does an abort, and then restarts the printing process. These commands are used to restart a queue printing after some disaster.

- topq Places selected jobs at the top of the print queue.

- status Shows a status display of the print spools on the server.

The following commands are extensions to the basic set provided by the BSD lpd system.

- lpq, lprm Invokes the lpq or lprm program from lpc. Useful when in the interactive mode.

- hold, holdall, release The hold command will cause the selected jobs to be held until released. The holdall jobs sets all jobs submitted to the queue to be held until released. The release command releases jobs for printing. If a job has had an error and is in the error state, the release command will cause it to be reprinted.

- move, redirect The move command will move selected jobs to the specified spool queue. The redirect command sends all jobs submitted to the queue to be sent to the specified queue.

- active, lpd, reread The active command will connect to the server for the printer. This is used to check to see if non-LPRng print servers are active. The lpd command will connect to the server and get the process id (PID) of the lpd server. The reread command causes a SIGHUP signal to be sent to the lpd process, causing it to reread the `lpd.conf`, `printcap`, and `lpd.perms` files. This is done when configuration information has been modified and the administrator wants to have the server use the new information.

- debug This is a desperation facility for developers that allows dynamic enabling of debug information generation. Not normally used in general operation.

- local, server These commands will print out the configuration information in the local `lpd.conf` file, as well as the printcap information for the specified printers; client prints what the LPRng clients (lpr, lpq, ...) would use while server prints what the LPRng server (lpd) would use if running on this host. This is an extremely useful diagnostic tool for administrators. Not normally used in general operation.

Prev | Home | Next
lprm Requests | Up | Block Job Transfer