Contents


AIX A-Z: Learning AIX's spooler back-end programs

A look into virtual printers

Comments

While most AIX administrators know how to set up print queues and manage printing through SMIT or the general print commands, there's more to printing on the UNIX system. This article walks through AIX's spooler back-end programs such as piomkpq, piolsvp, lsvirprt, chvirprt, and rmvirprt.

What is a virtual printer?

A virtual printer is simply a piece of software that acts like a printer driver; however, the virtual printer doesn't have to be connected to an actual printer. Sound confusing? Think of a virtual printer as another form of standard output. If you want to create a Portable Document Format (PDF), you can typically open the text document and save it as a PDF. This uses a form of a virtual printer—basically printing the text document to a format that can be saved to file and somewhat protected from other authors. You can use virtual printers to create images from documents, fax documents, or send documents to a queue to be formatted for a specific type of printer. The latter is the form of virtual printer this article discusses.

I can't find the files! Where are they?

Before diving into the virtual printer commands, you need to know the location of the files discussed in this article. Most of the commands referenced in this article are not in a user's typical PATH environment variable. There are two easy solutions to this minor problem:

  • Always type out the full path to the executable.
  • Add the path of the virtual printer commands to the user's PATH.

If the commands are to be used regularly, I suggest adding it to the user's PATH. Typically a user's PATH is sourced initially from /etc/environment in AIX and then the user's ${HOME}/.profile for local environment variable updates on login or when the ~/.profile is re-sourced. Considering the administration of printers is typically managed by the root user, it is wiser to modify root's local .profile file rather than affecting all users. If ~root/.profile doesn't exist, feel free to create the file.

First, a word of caution for those new to editing the PATH variable: When adding new directories to the PATH environment variable, it is typically wiser to place the new directory to search at the end of the value of the current PATH rather than the beginning. This may be a given to more seasoned UNIX users, but to novices this can cause real problems if not followed. If you're not familiar with the way the PATH variable works, here's an explanation. When a command is executed, the shell must read the user's PATH environment variable to find the executable. The PATH is read in order from left to right and is colon delimited. If a user's PATH is set to A:B:C:D, the shell first attempts to find the command in directory A. If it isn't found there, the shell moves on to look in directory B and so on.

Here's the problem: In this example, the user's PATH is initially set to /usr/bin:/etc:/usr/sbin. If there are multiple versions of a command (for example, /usr/bin/foo and /usr/local/bin/foo) and the user enters only the command rather than the fully qualified file name, the first instance found in the PATH variable order attempts to execute (/usr/bin/foo in this example). Now say the user wants to add /usr/local/bin to PATH to be able to easily find and execute /usr/local/bin/bar. However, the user adds the new directory to the beginning of PATH (that is, PATH=/usr/local/bin:${PATH}). Execution of bar works great, but now the user gets unexpected results when executing foo. This is because /usr/local/bin/foo is now being executed rather than the original /usr/bin/foo. The proper way to accomplish the user's goals is PATH=${PATH}:/usr/local/bin.

On the typical AIX system, most of the virtual printer commands are in the /usr/lib/lpd/pio/etc and /usr/sbin directories, as shown in Listing 1. So, you can update the PATH to be PATH=${PATH}:/usr/sbin:/usr/lib/lpd/pio/etc.

Listing 1. Location of virtual printer queue commands
# find /usr \( -name piomkpq -o -name piolsvp -o -name lsvirprt -o -name chvirprt -o
-name rmvirprt \) -ls 
        
    187195      36 -r-xr-s---   1 root  printq  34894 Sep 16 2002 /usr/sbin/chvirprt
    187491      48 -r-xr-xr-x   1 root   printq  47474 Sep 16 2002 /usr/sbin/lsvirprt 
    187763      44 -r-xr-s---   1 root   printq  41474 Sep 16 2002 /usr/sbin/rmvirprt
    98653       40 -r-xr-xr-x   1 bin   bin     40522 May 26 2006 /usr/lib/lpd/pio/etc/piolsvp 
    98706       36 -r-sr-x---   1 root   printq     32782 Sep 16 2002 /usr/lib/lpd/pio/etc/piomkpq

Creating a virtual printer queue

Creating a print queue in AIX via command line is extremely easy. By using the piomkpq command, you can quickly create new print queues and add a printer to an existing queue.

Table 1 provides a few switches that you can use when executing piomkpq. For a complete list of switches, please take a look at man piomkpq.

Table 1. Switches for piomkpq
SwitchDescription
-A <attachment>How should the printer connect to the queue? Valid attachment types are:
  • local: Printer is attached to local host.
  • remote: Printer is attached to a remote host.
  • xstation: Printer is attached to an Xstation.
  • ascii: Printer is attached to an American Standard Code for Information Interchange (ASCII) terminal.
  • hpJetDirect: Printer is a network printer.
  • file: Printer is a file in /dev.
  • ibmNetPrinter: Printer is an IBM network printer.
  • ibmNetColor: Printer is an IBM network color printer.
  • other: Printer is defined by user.
-D <data stream>What type of data stream is this print queue? Valid data streams are asc, cht, eps, gl, kji, pcl, pro, and ps.
-Q <queue name>Use print queue <queue name> as it already exists.
Note: You cannot use the -Q and -q switches together because you can't use an existing queue and create a new queue at the same time.
-a <attribute=value>What attributes should be set with this queue? Available attributes are interface, ptop, authconfig, speed, parity, bpc, stops, xon, dtr, and tbc.
-d<device>What's the name of the device (for example, lp0, tty2, fileA)?
-p <printer type>What kind of printer is this? You can find a list of valid printers on AIX under /usr/lib/lpd/pio/predef.
-q <queue name>Create a new print queue and name it <queue name>.
Note: You cannot use the -Q and -q switches together because you can't use an existing queue and create a new queue at the same time.
-w <port>What port should the queue use?
-s <type>wDoes the printer connect via parallel, rs232, or rs422?

Typically, users specify local, ascii, or file for attachment types. If your AIX system has other attachment types, you can find the attachment type configuration files (with the .attach extension) in /usr/lib/lpd/pio/etc, as shown in Listing 2.

Listing 2. Location of attachment type configuration files
# ls -l /usr/lib/lpd/pio/etc/*.attach
        
-r--r--r--  1 root   printq     1150 Sep 13 2002 /usr/lib/lpd/pio/etc/ascii.attach
-r--r--r--  1 root   printq     1144 Sep 13 2002 /usr/lib/lpd/pio/etc/file.attach 
-r--r--r--  1 root   printq     1182 Jan 17 2003 /usr/lib/lpd/pio/etc/hpJetDirect.attach 
-r--r--r--  1 root   printq     1209 Jan 17 2003 /usr/lib/lpd/pio/etc/ibmNetColor.attach 
-r--r--r--  1 root   printq     1203 Jan 17 2003 /usr/lib/lpd/pio/etc/ibmNetPrinter.attach 
-r--r--r--  1 root   printq     1188 Sep 13 2002 /usr/lib/lpd/pio/etc/local.attach 
-r--r--r--  1 root   printq     1094 Sep 13 2002 /usr/lib/lpd/pio/etc/remote.attach 
-r--r--r--  1 root   printq     1201 Sep 13 2002 /usr/lib/lpd/pio/etc/xstation.attach

Listing 3 is an example of what the configuration files look like in AIX.

Listing 3. Example configuration file on AIX
# grep -vE "^#|^[[:space:]]*$" /usr/lib/lpd/pio/etc/ascii.attach 
    
    # ASCII attachment 
    description = piobe.cat,4,20;Printer Attached to ASCII Terminal 
    add_queue = ps_makprt_prt 
    add_printer = ps_makprt_prt 
    seq_num = 4 
    submit_job = ps_qprt_fileName 
    change_queue = ps_chpq_attachName 
    change_filters = ps_pqfilters_ghostName 
    remove_queue = ps_rmpq_ghostName_other

Now that you know the basic commands, create a new print queue:

# piomkpq –A local –p ibm6252 –d lp0 –D asc –q ATC_QUEUE Added print queue 'ATC_QUEUE'.

Now create a new local print queue named ATC_QUEUE with an ASCII data stream for an existing IBM 6252 printer named lp0:

# piomkpq –A local –p ibm6252 –D asc -Q ATC_QUEUE –d lp1 Added printer 'lp1' to print queue 'ATC_QUEUE'.

Do you see the difference between the first and second examples of piomkpq? It's subtle but important. The first example creates a new print queue using the -q switch. In the second example, I use -Q and tell piomkpq to use an existing queue named ATC_QUEUE. If you're new to UNIX or Linux®, this is a perfect example of why case matters when executing commands. Simply changing the case from q to Q completely changes the command, as shown in the previous example.

To verify the print queues and the appropriate devices were added, take a look at /etc/qconfig, shown in Listing 4. The printer configuration file should list the queues in the order shown in lpstat at the end of the file because they were the last added via piomkpq and not manually added to /etc/qconfig.

Listing 4. Snippet of /etc/qconfig
ATC_QUEUE:
          device = lp0,lp1 
lp0: 
          file = /dev/lp0 
          header = never 
          trailer = never 
          access = both 
          backend = /usr/lib/lpd/piobe 
lp1: 
         file = /dev/lp1 
         header = never 
         trailer = never 
         access = both 
         backend = /usr/lib/lpd/piobe

Listing printers

Now that you've created a print queue or added a printer to a queue that already exists, it would be nice to verify the queue was created and see what other queues may already exist on your AIX system. Listing virtual printers on AIX is even simpler than creating them. By using the piolsvp command, you can view existing print queues or available attachment types.

Table 2 provides a few switches that you can use when executing piolsvp. For a complete list of switches, please take a look at man piolsvp.

Table 2. Switches for piolsvp
SwitchDescription
-AShows all available attachment types.
-P <queue name>Selects <queue name> to execute other switches on. Using just the –P switch with piolsvp doesn't display any information.
-dShows the queue devices.
-n <field>Shows the attachment name and value of <field> in the configuration file. The available attribute fields to query are submit_job, add_queue, add_printer, remove_queue, printer_conn, change_queue, and change_filters.
-pShows all queues, their descriptions, and locations.
-qShows all queues and their descriptions.
-vShows all virtual printers.

While talking about piomkpq, I mentioned that you could manually view the attachment type configuration files because the files are ASCII text. If you aren't interested in all of the settings and just want a quick listing, piolsvp is your command, as shown in Listing 5.

Listing 5. Viewing attachment types
# piolsvp –A 
       
 # ATTACHMENT TYPE       DESCRIPTION 
   local                 Printer Attached to Local Host 
   remote                Printer Attached to Remote Host 
   xstation              Printer Attached to Xstation 
   ascii                 Printer Attached to ASCII Terminal 
   hpJetDirect           Network Printer (HP JetDirect) 
   file                  File (in /dev directory) 
   ibmNetPrinter         IBM Network Printer 
   ibmNetColor           IBM Network Color Printer 
   other                 User Defined Backend

The following example demonstrates how to display a specific print queue—in this case, print queue ATC_HPLJ5:

# piolsvp -P ATC_HPLJ5 -d
            
# PRINTER           DESCRIPTION 
hp@ATC_HPLJ5        hplj-5si (PCL)

Listing 6 shows how you can quickly view all defined print queues, their locations, and descriptions.

Listing 6. Displaying all print queues
# piolsvp -p
        
# PRINT QUEUE   PRINTER     DESCRIPTION 
PAC06_ps        hp@PAC06    generic (PostScript) 
PAC06_pcl       hp@PAC06    generic (PCL Emulation) 
ATC08_pcl       hp@ATC08    generic (PCL Emulation) 
AMDC79_ps       hp@AMDC79   hplj-4000 (PostScript) 
LAB125_pcl      hp@LAB125   hplj-4000 (PCL) 
LAB125_ps       hp@LAB125   hplj-4000 (PostScript) 
ATC_HPLJ5pcl    hp@ATC_HPLJ5 hplj-5si (PCL) 
ATC_HPLJ5PS hp@ATC_HPLJ5 hplj-5si (PostScript) 
ATC_QUEUE lp0 IBM 6252 Impactwriter lp1 IBM 6252 Impactwriter

The following example queries the attachment configuration for queue AMDC79_ps for a field named add_queue. Because the queue is using an attachment type of hpJetDirect, the file /usr/lib/lpd/pio/etc/hpJetDirect.attach is searched.

# piolsvp -P qaljlab1_pcl -nadd_queue 
hp@AMDC79_ps        hpJetDirect         ps_makhp_prt

To simplify, the above query is basically formatting the following grep statement:

# grep "add_queue" /usr/lib/lpd/pio/etc/hpJetDirect.attach 
add_queue      =        ps_makhp_prt

The lpstat command is familiar to most UNIX users. It is a standard command on most UNIX and Linux systems that displays the status of a printer or several printers, as shown in Listing 7.

Listing 7. Viewing print queues with lpstat
# lpstat -W
Queue           Dev             Status      Job Files         User   PP   %   Blks Cp Rnk 
--------------- -------------- ----------- ----------------- ------- ---- -- ----- -- --- 
PAC06_ps        hp@PAC06        READY 
PAC06_pcl       hp@PAC06        READY
ATC08_pcl       hp@ATC08        READY
AMDC79_ps       hp@AMDC79       READY
LAB125_pcl      hp@LAB125       READY 
LAB125_ps       hp@LAB125       READY 
ATC_HPLJ5pcl    hp@ATC_HPLJ5    READY 
ATC_HPLJ5PS     hp@ATC_HPLJ5    READY 
ATC_QUEUE       lp0             READY 
ATC_QUEUE       lp1             READY

You can view the actual configuration file for the print queues you created in /var/spool/lpd/pio/@local/custom:

# ls -l /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp[[:digit:]]*
-rw-rw-r-- 1 root   printq 7019 Apr 28 10:29 /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp0 
-rw-rw-r-- 1 root   printq 7019 Apr 28 10:31 /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp1

The configuration files are readable ASCII text. By readable, I mean it's in plain text although it may not make much sense to the novice UNIX user. For example, Listing 8 is the first 20 of 250 lines of ATC_QUEUE:lp0.

Listing 8. Viewing print queue configuration files
# head -20 /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp0 
:056:__FLG:: 
:625:CB:S[B]DyEn: 
:626:CC:S[C]DyEn: 
:627:CD:S[D]DyEn: 
:629:CF:S[F]DyEn: 
:630:CG:S[G]DyEn: 
:622:Ca:DyS[G500]I[1810532]EnR[pioattr1.cat,1,631;(diag1) - do not print job; display
main pipeline and pre-processing filter,(diag2) - do not print job; display all pipelines
and filters,(display) - print job; display all pipelines and filters,(ignore) - print job;
ignore stderr produced by filters,(normal) - print job; exit if filters produce stderr= 
-a1,-a0\x27 \x27-A3,-a0\x27 \x27-A2,-a0\x27 \x27-A0,-a0\x27 \x27-A1]:%?%G_a%t-a%I_a%e-a%
I_a\x27 \x27-A%I_A%; 
:013:_A:DnEnR[0,1,2,3]:1 
:789:_E:S[B020]I[1810501]%IWY:! 
:621:_H:S[F350]I[1810503]Dy: 
:791:_J:S[C950]I[1810533]%IWY:+ 
:792:_K:S[B030]I[1810550]%IWY:! 
:793:_L:S[D020]I[1810504]%IWY:+ 
:036:_O:Dn:2 
:794:_W:S[B025]I[1810506]%IWY:! 
:795:_X:S[D030]I[1810507]EtL[/usr/bin/ls -1 /usr/lib/lpd/pio/trans1 | /usr/bin/sed '/^850
$/d']V[%`WX]:ISO8859-1 
:614:_Z:S[D035]I[1810534]%IWY:+ 
:063:_a:DnEnR[0,1]:0 
:635:_b:S[D010]I[1810508]E#G[0..%?%G_l%{0}%=%t%e%G_l%G_t%-%{1}%-%d%;]:0 
:658:_d:S[C925]I[1810509]EnL[%IW2]F1:a

Viewing virtual printer attributes

Now that you've created the virtual printer, take a look at its attributes. To view the attributes of a virtual printer use the lsvirprt command.

Table 3 provides a few switches that you can use when executing lsvirprt. For a complete list of switches, please take a look at man lsvirprt.

Table 3. Switches for lsvirprt
SwitchDescription
-a <attribute>Display only <attribute>. This is important to know because the list of attributes of a virtual printer is quite large.
-d <device>Query the queue's device named <device>.
-q <queue>Query the printer's queue named <queue>.

Listing 9 uses lsvirprt to list all attributes to the virtual printer created earlier in this article.

Listing 9. Listing virtual printer attributes
# lsvirprt -q ATC_QUEUE -d lp0 | more

Name        Description                                               Value 
__FLG       VALUES THAT MAY BE OVERRIDDEN WITH FLAGS ON THE     
            COMMAND LINE 
CB          -------------- Text Print Options ------------- 
CC 
----------- Job Processing Options ------------ 
CD 
----------- Text Formatting Options ----------- 
CF 
--------- Header/Trailer Page Options --------- 
CG
------------- Messages/Diagnostics ------------ 
Ca          DIAGNOSTIC LEVEL                                          %?%G_a%t-a%I_a%e-a
                                                                      %I_a\x27 \x27-A%I_ 
                                                                      A%; 
_A          stderr returned? 0: no; 1: yes, &amp; pipelines; 2:   1 
              yes, &amp; values, pipelines 
_E          DOUBLE-HIGH print?                                        ! 
_H          HOSTNAME for "PRINTED AT:" on HEADER PAGE 
_J          RESTORE printer?                                          + 
_K          CONDENSED print?                                          ! 
_L          WRAP long lines?                                          + 
_O          Type of Input Paper Handling (1: manual, 2:               2 
                pinwheel, 3: sheetfeed) 
_W          DOUBLE-WIDE print?                                        ! 
_X          CODE PAGE of print file                                   ISO8859-1 
_Z          Send FORM FEED after each file?                           + 
_a          0: Normal Print; 1: Return Flag Values &              0 
                Pipeline, But Don't Print 
_b          BOTTOM MARGIN (lines)                                     0 
_d          Print file TYPE                                           a 
_e          EMPHASIZED print?                                         ! 
_f          Pre-processing FILTER NAME 
_g          PAGE NUMBER where printing should begin                   1 
_h          TITLE STRING for 'pr' filter 
_i          Number of columns to INDENT                               0 
_j          INITIALIZE printer?                                       + 
_l          LINES per page                                            66

Notice that I pipe the output to more. This is so you can view all of the attributes for the virtual printer. This virtual printer alone has almost 500 lines of attributes.

If you know what field you want to view, you can append the -a switch with the attribute name. This example looks at lines per page or _l (lower case L):

# lsvirprt -q ATC_QUEUE -d lp0 -a _l
            
Name         Description            Value 
_l           LINES per page         66

Changing virtual printer attributes

So far you created a virtual printer and viewed the attributes. Now change one of the virtual printer attributes. The chvirprt command allows you to change a known attribute to an acceptable value.

Table 4 provides a few switches that you can use when executing chvirprt. For a complete list of switches, please take a look at man chvirprt.

Table 4. Switches for chvirprt
SwitchDescription
-a <attribute=value>Change <attribute> to have a value of <value>.
-d <device>Query the queue's device named <device>.
-q <queue>Query the printer's queue named <queue>.

After reading the previous section about lsvirprt, you now know how to view the value for lines per page. To expand on that, change the value from 66 to 50 by completing the following steps:

  1. First, view the attribute's value so you know what to revert to if needed:

    # lsvirprt -q ATC_QUEUE -d lp0 -a _l 
    
    Name        Description         Value 
     _l          LINES per page     66

    Note: It is always a good idea to document the original value and new value in case you need to change back to the original value.

  2. Change the number of lines per page from 66 to 50:

    # chvirprt -q ATC_QUEUE -d lp0 -a _l=50
  3. Verify the change was successful:

    # lsvirprt -q ATC_QUEUE -d lp0 -a _l
                            
    Name        Description         Value  
    _l          LINES per page      50

As you can see, the value has changed for lines per page.

What if after you make that change the manager of the group that uses the printer wants the value changed to 60 and also wants the maximum number of horizontal and vertical tabs that can be defined changed to 62? Fortunately, you can make both changes at the same time by completing these steps:

  1. First, view the attributes' values again so you know what to revert to if needed, as shown in Listing 10.

    Listing 10. Listing multiple virtual printer attributes
    # lsvirprt -q ATC_QUEUE -d lp0 -a _l -a mx -a my
                                
    Name        Description                                         Value  
    _l          LINES per page                                      50 
    mx          Maximum Number of Horizontal Tabs That Can Be       64 
                Defined 
    my          Maximum Number of Vertical Tabs That Can Be         64 
                Defined
  2. Change the attributes to the desired values:

    # chvirprt -q ATC_QUEUE -d lp0 -a _l=60 mx=62 my=62
  3. Verify the change was successful, as shown in Listing 11.

    Listing 11. Listing multiple virtual printer attributes
    # lsvirprt -q ATC_QUEUE -d lp0 -a _l -a mx -a my 
                                    
    Name        Description                                         Value   
    _l          LINES per page                                      60  
    mx          Maximum Number of Horizontal Tabs That Can Be       62  
                Defined 
    my          Maximum Number of Vertical Tabs That Can Be         62 
                Defined

Maybe it's just me, but I get paranoid that maybe I changed both devices in the queue or accidentally changed the wrong device. Double checking is always a good idea. In Listing 11, notice that only device lp0 changed while lp1 keeps its original values in Listing 12.

Listing 12. Listing multiple virtual printer attributes
# lsvirprt -q ATC_QUEUE -d lp1 -a _l -a mx -a my 
                                    
Name        Description                                         Value 
_l LINES    per page                                            66  
mx          Maximum Number of Horizontal Tabs That Can Be       64 
            Defined 
my          Maximum Number of Vertical Tabs That Can Be         64 
            Defined

Removing virtual printers

Whether you entered the incorrect queue name, no longer need the print queue, or simply want to see how to remove a queue, removing a virtual print queue in AIX is easy. IBM provides the rmvirprt command to accommodate the curious administrator.

To remove the two virtual print queues previously created in this article, simply execute these commands:

# rmvirprt -q ATC_QUEUE -d lp1 
# rmvirprt -q ATC_QUEUE -d lp0

By executing rmvirprt, you simply remove the virtual printer assigned to the print queue. The print queues will still exist, but when you look at the printers again the descriptions are gone, as shown in Listing 13. This is because the virtual printer configuration files have been removed via rmvirprt.

Listing 13. Displaying all print queues
# piolsvp -p 

# PRINT QUEUE             PRINTER             DESCRIPTION 
  PAC06_ps                hp@PAC06            generic(PostScript) 
  PAC06_pcl               hp@PAC06            generic(PCL Emulation) 
  ATC08_pcl               hp@ATC08            generic(PCL Emulation) 
  AMDC79_ps               hp@AMDC79           hplj-4000 (PostScript) 
  LAB125_pcl              hp@LAB125           hplj-4000 (PCL) 
  LAB125_ps               hp@LAB125           hplj-4000 (PostScript) 
  ATC_HPLJ5pcl            hp@ATC_HPLJ5        hplj-5si (PCL) 
  ATC_HPLJ5PS             hp@ATC_HPLJ5        hplj-5si (PostScript) 
  ATC_QUEUE               lp0 
                          lp1

In addition the printer queue descriptions being removed, notice the actual virtual printers are removed from the /var/spool/lpd/pio/@local/custom spool directory:

# ls -l /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp[[:digit:]]*
            
ls: 0653-341 The file /var/spool/lpd/pio/@local/custom/ATC_QUEUE:lp[[:digit:]]* does not 
exist.

To remove a print queue after the virtual printer has been removed, follow these steps:

  1. View the printer queue in question:

    # lsque -q ATC_QUEUE
    ATC_QUEUE: 
            device = lp0,lp1
  2. Remove the printer queue devices:

    # rmquedev -d lp1 -q ATC_QUEUE 
    # rmquedev -d lp0 -q ATC_QUEUE
  3. Verify the printer queue devices have been removed:

    # lsque -q ATC_QUEUE
    ATC_QUEUE:
  4. After you remove all devices from the print queue, remove the actual queue:

    # rmque -q ATC_QUEUE

To verify the virtual printer(s), printer devices, and print queues have been removed, do the following:

  1. Verify the printer queue has been removed via lsque.
    # lsque -q ATC_QUEUE 
    lsque: (FATAL ERROR): 0781-193 Queue ATC_QUEUE: not found in qconfig file. Not 
    printed.
  2. Verify the printer queue and devices have been removed via piolsvp, as shown in Listing 14.
    Listing 14. Displaying all print queues
    # piolsvp -p
    
    # PRINT QUEUE               PRINTER          DESCRIPTION 
      PAC06_ps                  hp@PAC06         generic (PostScript) 
      PAC06_pcl                 hp@PAC06         generic (PCL Emulation) 
      ATC08_pcl                 hp@ATC08         generic (PCL Emulation) 
      AMDC79_ps                 hp@AMDC79        hplj-4000 (PostScript) 
      LAB125_pcl                hp@LAB125        hplj-4000 (PCL) 
      LAB125_ps                 hp@LAB125        hplj-4000 (PostScript) 
      ATC_HPLJ5pcl              hp@ATC_HPLJ5     hplj-5si (PCL) 
      ATC_HPLJ5PS               hp@ATC_HPLJ5     hplj-5si (PostScript)
  3. Finally, verify the printer queues have been removed via lpstat, as shown in Listing 15.
    Listing 15. Viewing print queues with lpstat
    # lpstat -W
    
    Queue           Dev           Status   Job    Files    User      PP   %   Blks Cp Rnk 
    -------------- -------------- -------- ------ ------- ---------- ---- -- ----- -- --- 
    PAC06_ps        hp@PAC06        READY 
    PAC06_pcl       hp@PAC06        READY 
    ATC08_pcl       hp@ATC08        READY 
    AMDC79_ps       hp@AMDC79       READY 
    LAB125_pcl      hp@LAB125       READY
    LAB125_ps       hp@LAB125       READY 
    ATC_HPLJ5pcl    hp@ATC_HPLJ5    READY 
    ATC_HPLJ5PS     hp@ATC_HPLJ5    READY

Conclusion

After reading this article, you should have a better understanding of what virtual printers are in AIX, how to create them, and how to modify or manage their devices and queues. Knowing more about the printers and the queues set up on your system is important. A lot of people don't realize how many settings you can easily change on a queue. You may be able to make someone's day by modifying a printer to suit that person's needs. Good luck!


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=406819
ArticleTitle=AIX A-Z: Learning AIX's spooler back-end programs
publish-date=07072009