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:
access | Specifies the type of access the backend has to the file specified by the file field. The value of access is write if the backend has write access to the file or both if it has both read and write access. This field is ignored if the file field has the value FALSE. |
align | Specifies whether the backend sends a form-feed control before starting the job if the printer was idle. The default value is TRUE. |
backend | Specifies the full path name of the backend, optionally followed by the flags and parameters to be passed to it. The path names most commonly used are /usr/lib/lpd/piobe for local print and /usr/lib/lpd/rembak for remote print. |
feed | Specifies either the number of separator pages to print when the device becomes idle or the value never, the default, which indicates that the backend is not to print separator pages. |
file | Identifies the special file where the output of backend is to be redirected. FALSE, the default value, indicates no redirection and that the file name is /dev/null. In this case, the backend opens the output file. |
header | Specifies whether a header page prints before each job or group of jobs. A value of never, the default value, indicates no header page at all. always means a header page before each job. group means a header before each group of jobs for the same user. In a remote print environment, the default action is to print a header page and not to print a trailer page. |
trailer | Specifies whether a trailer page prints after each job or group of jobs. A value of never, the default, means no trailer page at all. always means a trailer page after each job. group means a trailer page after each group of jobs for the same user. In a remote print environment, the default action is to print a header page and not to print a trailer page. |
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/kshTo run a shell procedure called myproc using this batch queue, enter:
qprt -Pbsh myprocThe 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 Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Printer Overview and Spooler Overview in AIX Version 4.3 Guide to Printers and Printing.