The AIX Spooling Facility

AIX offers a third approach toprinting and spooling. It is based on AIX’s general queueing system; printing is just one predefined way to use it. The queueing system’s general operation is illustrated in Figure 13-5.

The AIX queueing system

Figure 13-5. The AIX queueing system

Jobs are submitted to a queue by users using the qprt or enq commands (or another user command that calls them). A file printed using these commands is linked to the spooling area by default, so if the file changes or is deleted before the job actually prints, the output will be affected (the -c option may be used to copy the file to the spooling area with either command). Print requests are stored in /var/spool/lpd/qdir, and any spooled files are stored in /var/spool/qdaemon.

Tip

AIX also supports the BSD and System V user print commands for ease-of-use purposes: lp, cancel, lpstat, lpr, lpq, and lprm.

The queues are monitored by the qdaemon daemon, which schedules and initiates jobs. When it is time for a job to execute, qdaemon sends the corresponding file to the queue’s backend program for processing. In the case of printing on the local system, the program is /usr/lib/lpd/piobe, but in theory, any program may be used as a backend (this is discussed further later in this section). The output of the backend program is then sent to a specified physical device in the case of local printing. It may also be ...

Get Essential System Administration, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.