LPRng Reference Manual: 5 Sep 2003 (For LPRng-3.8.22)
Prev |  | Next

# Chapter 9. lpc - Administration Program

The lpc command is the main way that the lpd server is controlled. Here is the help information displayed by the command:

        h4: {308} % lpc -=
        lpc: Illegal option '='
        usage: lpc [-Ddebuglevel][-Pprinter][-Shost][-Uusername][-V] [command]
         with no command, reads from stdin
          -Ddebuglevel - debug level
          -Pprinter    - printer or printer@host
          -Shost       - connect to lpd server on host
          -Uuser       - identify command as coming from user
          -V           - increase information verbosity
         commands:
         active  (printer[@host])        - check for active server
         abort   (printer[@host] | all)  - stop server
         class   printer[@host] (class | off) - show/set class printing
         disable (printer[@host] | all)  - disable queueing
         debug   (printer[@host] | all) debugparms - set debug level for printer
         down    (printer[@host] | all)  - disable printing and queueing
         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
         lpq     (printer[@host] | all) (name[@host] | job | all)*   - run lpq
         lprm    (printer[@host] | all) (name[@host]|host|job| all)* - run lprm
         msg printer message text- set status message
         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
         redo    (printer[@host] | all) (name[@host] | job | all)* - redo jobs
         release (printer[@host] | all) (name[@host] | job | all)* - release jobs
         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
         up      (printer[@host] | all) - enable printing and queueing
           diagnostic:
              defaultq               - show default queue for LPD server
              defaults               - show default configuration values
              client  (printer | all) - client config and printcap information
              server (printer | all) - server config and printcap

Most of the lpc command line options are common to all LPRng Clients, with the exception of the -S server literal. This option allows the lpd host to be explicitly specified.

The lpc commands can be classified as informational, queue management, problem management, job scheduling, and diagnostic.

# 9.1. Informational Commands - status, flush, active, reread

The `lpc status` command displays the current status of various activities of interest to the system administrator. This information includes the process ID of the server and other processes.

During normal operation, when requested for job status information the lpd server will create this information and then save it in a status cache. When successive requests for the same information arrive, the cache is checked to see if the information is already in the cache and there have been no status changes. If this is the case, the cached status information is used. The `lpc flush` command will flush (delete) this cache information and cause the lpd server to regenerate it from the original job files.

The `lpc active` command connects to the print server and gets the Process ID of the lpd process. This is useful to determine if the lpd server is running on the print server.

The `reread` command connects to the lpd print server and requests that the server reread the `printcap`, `lpd.conf`, and `lpd.perms` database files.

Prev | Home | Next
lprm Job Selection |  | Queue Management - enable, disable, up, down