Configures a printer queuing system.
The /etc/qconfig file describes the queues and devices available for use by both the enq command, which places requests on a queue, and the qdaemon command, which removes requests from the queue and processes them. The qconfig file is an attribute file.
Some stanzas in this file describe queues, and other stanzas describe devices. Every queue stanza requires that one or more device stanzas immediately follow it in the file. The first queue stanza describes the default queue. Unless the LPDEST or PRINTER environment variable is set, the enq command uses this queue when it receives no queue parameter. If LPDEST contains a value, that value takes precedence over the PRINTER environment variable. Destination command-line options always override both variables.
The name of a queue stanza can be
from 1 to 20 characters long. Some of the fields and their possible
values that can appear in this file are:
Note: lp is a BSD standard reserved queue name and should not be used as a queue name in the qconfig file.
The following list shows some of
the fields and their possible values that appear in the qconfig
file for remote queues:
If a field is omitted, its default value is assumed. The default values for a queue stanza are:
discipline = fcfs up = TRUE acctfile = FALSE
The device field cannot be omitted.
The name of a device stanza is
arbitrary and can be from 1 to 20 characters long. The fields that can
appear in the stanza are:
The qdaemon process places the information contained in the feed, header, trailer, and align fields into a status file that is sent to the backend. Backends that do not update the status file do not use the information it contains.
If a field is omitted, its default value is assumed. The backend field cannot be omitted. The default values in a device stanza are:
file = FALSE access = write feed = never header = never trailer = never align = TRUE
The enq command automatically converts the ASCII qconfig file to binary format when the binary version is missing or older than the ASCII version. The binary version is found in the /etc/qconfig.bin file.
Note: The qconfig file should not be edited while there are active jobs in any queue. Any time the qconfig file is changed, jobs submitted prior to the change will be processed before jobs submitted after the change.
Editing includes both manual editing and use of the mkque, rmque, chque, mkquedev, rmquedev, or chquedev command. It is recommended that all changes to the qconfig file be made using these commands. However, if manual editing is desired, first issue the enq -G command to bring the queuing system and the qdaemon to a halt after all jobs are processed. Then edit the qconfig file and restart the qdaemon with the new configuration.
bsh: discipline = fcfs device = bshdev bshdev: backend = /usr/bin/ksh
To run a shell procedure called myproc using this batch queue, enter:
qprt -Pbsh myproc
The queuing system runs the files one at a time, in the order submitted. The qdaemon process redirects standard input, standard output, and standard error to the /dev/null file.
bsh: discipline = fcfs device = bsh1,bsh2 bsh1: backend = /usr/bin/ksh bsh2: backend = /usr/bin/ksh
remh: device = rd0 host = pluto rq = bsh rd0: backend = /usr/lib/lpd/rembak
/etc/qconfig | Contains the configuration file. |
/etc/qconfig.bin | Contains the digested, binary version of the /etc/qconfig file. |
/dev/null | Provides access to the null device. |
/usr/lib/lpd/piobe | Specifies the path of the local printer backend. |
/usr/lib/lpd/rembak | Specifies the path of the remote printer backend. |
/usr/lib/lpd/digest | Contains the program that converts the /etc/qconfig file to binary format. |
The enq command, lp command, qdaemon command.
Understanding the Interaction between qdaemon and the Backend in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
Printer Overview and Spooler Overview in AIX 5L Version 5.1 Guide to Printers and Printing.