Printing in AIX 4.1


Contents

About this document
    Related documentation
How it works
Printer terminology
The printing commands
The qdaemon program

About this document

This document provides an overview of printing in AIX 4.1.

Related documentation

"AIX Version 4.1 System Management Guide" from IBM (SC23-2525-00)


How it works

The printing command places the file, plus any print flags, onto the Queue. When the printer is ready, the qdaemon passes the file and flags to the printer backend, which formats the output for the specific printer. The data is then passed to the Printer Device driver which communicates with the actual device and prints the file (see the figure below).

   enq --> Queue--> Backend 
                      | 
                      | 
                    piobe ------->  Device Driver  ----+  
                      |                                | 
                      |                             Printer 
                      |                                | 
                     cat  ------->  User Defined   ----+  

It is also possible to bypass the Queue and backend by redirecting the file to the device (for example, with the cat command).

                                       Device Driver 
                                              | 
                                              | 
    cat --------------> User Defined -----> Printer 
                                              | 
                                              | 
                                              splp 

Printer terminology


The printing commands

There are now four commands which use the piobe that can be used to print the files. The four commands are enq, lp, lpr, and qprt. These commands bypass some of the splp settings, since they use the settings that are contained in the local Print Queue. Local Print Queue settings can be configured using smit, under the Programming tools menu.

The commands lp, lpr, and qprt are actually just a front end to the enq command. Therefore the first thing that happens to a printed file is that it is passed to the enq program. The enq program simply places the information about the file, along with the flags, in the Queue for the qdaemon to use. The Queue is actually the /var/spool/lpd/qdir directory.

If the job is not a file (for example, pipe output of a command to enq), then a real file is created in /var/spool/qdaemon which contains the data to be printed. The information in the /var/spool/lpd/qdir file then points to the file in /var/spool/qdaemon.


The qdaemon program

The qdaemon is a process that runs in the background. It is generally started with the startsrc command when the system is powered on. startsrc is a command to the srcmstr daemon which is started from /etc/inittab.

The qdaemon keeps track of the print requests in the /var/spool/lpd/qdir directory and ensures that the jobs are sent to the proper printer at the proper time. It also keeps track of the status of the printers and stores printer usage data for system accounting purposes (for example, lpstat and enq -a commands). This information is held in the /var/spool/lpd/stat directory.

If the qdaemon is killed it will be restarted by the srcmstr.

NOTE: Never kill the srcmstr process because it controls other daemons that will be running on the system.

To stop the qdaemon, issue enq -G or stopsrc -cs qdaemon (if there are no jobs queued).

To start the qdaemon again, use startsrc -s qdaemon.




[ Doc Ref: 90605220014834     Publish Date: Apr. 06, 2001     4FAX Ref: 8254 ]