qconfig File
Purpose
Configures a printer that queues in a system.
Description
The /etc/qconfig file describes the queues and devices that are available for use by both the enq command and qdaemon command. The enq command places requests on a queue, and the qdaemon command 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 must be immediately followed by one or more device stanzas 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 must be from 1 to 20 characters long. The following fields are the fields in the queue stanza of the qconfig file:
| Field | Definition |
|---|---|
acctfile |
Identifies the file that is used to save the print command accounting information. The default value is FALSE that indicates suppress accounting. If the named file does not exist, accounting is not done. |
device |
Identifies the symbolic name that refers to the device stanza. |
discipline |
Defines the queue that serves the algorithm. The default value is fcfs that means first-come-first-served. The value sjn means shortest job next. |
up |
Defines the state of the queue. The default value TRUE indicates that the queue is running. The value FALSE indicates that it is not running. |
recovery_type |
Enables the user to specify a recovery option when a print queue goes down. By
default, the queue remains in the down state and requires user intervention. Other options can be
specified by using the following values:
|
lp is a Berkeley Software Distribution (BSD) standard
reserved queue name and must 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:
| Item | Description |
|---|---|
host |
Indicates the remote host where the remote queue is found. |
s_statfilter |
Specifies the short version filter that is used to translate the remote queue status format.
The following are possible values:
|
l_statfilter |
Specifies the long version filter that is used to translate the remote queue status format.
The following are possible values:
|
rq |
Specifies the remote queue name. In a remote print environment, the client configuration must specify the remote queue name or the server. Using the default remote queue name might cause unpredictable results. |
If a field is omitted, its default value is assumed. The following screen shows the default values for a queue stanza:
discipline = fcfs
up = TRUE
acctfile = FALSE
recovery_type = queuedown The device field cannot be omitted.
The name of a device stanza is arbitrary and must be from 1 to 20 characters long. The following fields are the fields on the device stanza of the qconfig file:
| Field | Definition |
|---|---|
access |
Specifies the type of access the backend has to the file specified in 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, followed by the flags and parameters, if any, to be passed to it. The path names that are 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. The default value is never that indicates that the backend is not to print separator pages. |
file |
Identifies the special file where the output of the backend is to be redirected. The default value FALSE 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. The
header field can take the following values:
|
trailer |
Specifies whether a trailer page prints after each job or group of jobs. The
trailer field can take the following values:
|
The qdaemon process places the information that is 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 that it contains.
If a field is omitted, its default value is assumed. The backend field cannot be omitted. The following screen shows the default values for a device stanza:
file = FALSE
access = write
feed = never
header = never
trailer = never
align = TRUE
- Stop the AIX printer subsystem by entering the following
command:
#stopsrc -s qdaemon - Start the AIX printer subsystem by entering the following
command:
#startsrc -s qdaemon -e printer_scalability=ON - Start the lpd daemon by entering the following
command:
#startsrc -s lpd -e printer_scalability=ON - Set the printer_scalability environmental variable to
ON by entering the following
command:
#export printer_scalability=ONThe printer_scalability environmental variable is set only for the current session.
- To improve the scalability of the AIX printer subsystem, complete all the steps explained earlier. Failure to complete any of the steps might result in undefined behavior within the printer subsystem.
- The optimal limit for the number of queues that can be created to maintain the scalability of the AIX printer subsystem is 10,000.
Editing includes both manual editing and use of the mkque,
rmque, chque, mkquedev,
rmquedev, or chquedev commands. It is recommended that all
changes to the qconfig file be made by using these commands. However, if you
want to edit manually, first issue the enq -G command to bring the queuing system
and the qdaemon command to a halt after all jobs are processed. Then edit the
qconfig file and restart the qdaemon command with the new
configuration.
Examples
- The batch queue that is supplied with the system might contain the following stanzas:
bsh: discipline = fcfs device = bshdev bshdev: backend = /usr/bin/kshTo run a shell procedure calledmyprocby using this batch queue, enter the following command:
The queuing system runs the files one at a time, in the submitted order. The qdaemon process redirects standard input, standard output, and standard error to the /dev/null file.qprt -Pbsh myproc - To allow two batch jobs to run at the same time, enter the following command:
bsh: discipline = fcfs device = bsh1,bsh2 bsh1: backend = /usr/bin/ksh bsh2: backend = /usr/bin/ksh - To set up a remote queue
bsh, enter the following command:remh: device = rd0 host = pluto rq = bsh rd0: backend = /usr/lib/lpd/rembak - To set a local queue such that an email is sent to user1@xyz.com when it goes down, enter the
following command:
ps: recovery_type = sendmail user1@xyz.com device = lp0 lp0: file = /dev/lp0 header = never trailer = never access = both backend = /usr/lib/lpd/piobe
Files
| Item | Description |
|---|---|
| /etc/qconfig | Contains the configuration file. |
| /etc/qconfig.bin | Contains the binary version of the /etc/qconfig file that is created by the digest command. |
| /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. |