/etc/qconfig file structure

The /etc/qconfig file is the most important file in the spooler domain.

  • The /etc/qconfig file contains the definition of every queue known to the spooler.
  • A system administrator can read the /etc/qconfig file and discern the function of each queue.
  • Although it is not recommended, the /etc/qconfig file can be edited (see /etc/qconfig File) to modify spooler queues without halting the spooler.

The qdaemon reads the ASCII version of /etc/qconfig and creates a binary version, /etc/qconfig.bin. /etc/qconfig must adhere to a specific structured format in order for the qdaemon to be able to parse it. This format is detailed in the /etc/qconfig File Structure examples below.

                Local Queue
queue_name:
        device = device_name
        up = TRUE or FALSE
        discipline = fcfs or sjn
device_name:
        file = physical_device_name or FALSE
        header = always or group or never
        trailer = always or group or never
        access = both or write
        backend = full_path_name_to_backend_program 
  
                Remote Queue
queue_name:
        device = device_name
        up = TRUE or FALSE
        host = remote_hostname
        s_statfilter = full_path_to_short_filter
        l_statfilter = full_path_to_long_filter
        rq = remote_queue_name
device_name:
        backend = full_path_name_to_backend_program

/etc/qconfig is composed of text blocks referred to as stanzas. Each queue is represented by a pair of stanzas. The first stanza in a pair is referred to as the queue stanza; the second stanza in a pair is referred to as the device stanza. Stanzas are composed of parameters and parameter values that describe the queue's properties and function.

When the qdaemon parses the ASCII version of /etc/qconfig, the first non-commented line it identifies must be a word followed by a colon; this line represents the beginning of the queue stanza. This word is the name of a queue to which a user can submit jobs. There must be one or more lines indented by tabs following this line. One of these lines must be device = device_name. The value of the device parameter is a link from the queue stanza to the device stanza; this parameter has no other function. When a queue is initially setup, the operating system will frequently use the name of a printer, such as lp1, as the value of the device parameter. While the queue may actually be setup to use lp1, the use of lp1 as the value of the device parameter only means that the device stanza will be named lp1. This is not related to the fact that there is a real printer known to the operating system as lp1.

Following the tab-indented lines, the qdaemon must find the word that is the value of the device parameter followed by a colon; this line represents the beginning of the device stanza. This word, which a user normally does not need to know, is the name of a device to which the corresponding queue stanza provides serial access. There must be one or more lines indented by tabs following this line. One of these lines must be backend = full_path_name_to_backend. In a local spooling environment, there are two parameters of critical importance in this stanza.

The file parameter specifies the real device to which the queue provides serial access. It is important to note that jobs submitted to the spooling system are queued upon this device. If a queue is setup to use a printer known to the operating system as lp1, then the value of the file parameter would be /dev/lp1. The operating system routines that create queues use the name of the real device as the name of the device stanza by default, and this is why there is some confusion as to the meaning of the device parameter.

The backend parameter specifies the full path to the program that will process the job submitted to the spooling system, after the qdaemon determines that the job's turn to be processed has arrived.