AIX Printer Tips: FAQ on AIX Print Queues and Devices


Contents

About This Document
Common Question List
Problem List
Answers to Common Questions
Answers to Common Problems


About This Document

The information in this document applies to AIX Version 3 and later.

Common Question List

  1. What is a print queue?
  2. How do I set the Default queue?
  3. What is the right way to remove a print queue?
  4. What are the meanings for printing of each serial wire?
  5. What are the pinouts for a particular printer and adapter?
  6. How can I display all of the queues on my machine?
  7. What happens if I remove the /etc/qconfig.bin file?
  8. How do I pipe the output of a command to a printer?
  9. What software product can be used to print APA on AIX?
  10. How do I know what printers are supported by AIX?
  11. Where do console messages go when using CDE?
  12. Can I view Postscript files before I print them?
  13. How can I cat a PostScript file to /dev/lp0?
  14. What does INITING status mean for MarkNet or 4033?

Problem List

  1. Cannot cat to printer port (error 0403-005, for example)
  2. Cannot print as non-root user, but root can print
  3. The queue hangs and I can't print. Queue says ready, but jobs don't print.
  4. Local printing in AIX and nothing prints, but the job disappears
  5. Remote printing to AIX server but nothing prints
  6. lpstat gives error that queue abcd does not exist
  7. When I print with lpr why do I getunwanted headers?
  8. What does Queue died running request indicate?
  9. After upgrading to AIX 4.1, sometimes when printing with 'cat > /dev/lp0' the command returns to the prompt, but nothing is sent out the port.
  10. I get a no queue error when doing an lpstat.
  11. Why can't I print an AFS file?

Answers to Common Questions

  1. What is a print queue?

  2. A print queue technically is a pair of stanzas or paragraphs in the file /etc/qconfig. Each queue is made up of a queue stanza and a queue device stanza. The program that controls spooling on AIX is called the qdaemon, and the qdaemon uses the queue information in /etc/qconfig to determine what to do with each job that is submitted.

    The queue stanza starts with a line giving the queue its name. The next line of the queue stanza always contains the name of the queue device stanza. Following this is additional information defining the queue. For remote queues, the queue stanza contains information such as the remote print server, the remote print queue name, and the type of lpd protocol used on the print server.

    The queue device stanza begins with the queue device name pointed to by the queue stanza. This stanza contains information such as if a header or trailer page is going to be sent with the print job. Probably the most important line in the queue device stanza is the backend program name. This backend program is the first program that actually reads the data file and processes the file and sends it to the printer. Actually backend programs can process data in other ways,and the print queue can be used as a way to serialize data. When the backend program is piobe, or any other program that calls piobe such as piojetd and piorlfb, there must be a virtual printer associated with the queue.

    When a print job is submitted by a local print command such as enq, lp, lpr, qprt, or dtprint, these commands all call enq which submits the job to the qdaemon. A queued job is represented by a JDF or Job Description File in /usr/lib/lpd/qdir that describes the job number, the user environment, the print flags, and the files to be printed. The qdaemon passes this information to the backend program that processes the print job.

  3. How do I set the Default queue?
  4. What is the right way to remove a print queue?

  5. I'm having problems with queue daemon after removeing a queue.
    First make sure that all jobs are removed from the queue. If you have jobs queued, there will be a dummy stanza or paragraph left in /etc/config. This can cause the qdaemon to stop and will give problems when adding new queues. After you remove queues, it is always a good idea to use grep to check for the word dummy in /etc/qconfig.

    At AIX 4, the process is simple.

    At AIX 3, the process can be more difficult.

    1. Make sure you remove the virtual printer first with "lsvirprt", then Select the queue. This removes the virtual printer, queue, and the queue device. If you simply use "rmvirprt -q queue" from the command line, then you will only remove the virtual printer and you will still have the queue and the queue device that are not removed.
    2. If you don't have a virtual printer, or if the above didn't remove the queue device, the next step is to remove the queue device before the queue. Do this with: rmquedev -q <queue> -d <queue_device>
    3. Finally, remove the queue: "rmque -q <queue>
    4. Once this is done, use smit to remove the printer.

  6. What is the meaning of the individual serial lines?
  7. The pinouts for serial adapters on the RS/6000 differ between adapters, but the meaning of the signals remains constant when applied to printing. The following list shows the signal name and function:
    Signal
    Abreviation
    Signal
    Meaning
    Definition and function of the signal
    TxD Transmit Data Data from the computer to the printer
    RxD Receive Data Data like XON/XOFF back from computer.
    CTS Clear To Send Used by AIX as a sign that the printer is turned on. Must be asserted by printer for AIX port to open. Queue will go down if signal not available.
    RTS Ready To Send Signal is asserted by AIX when the port is opened.
    DSR Data Set Ready Input signal to AIX, but not used in printing
    DTR Data Terminal Ready Signal is asserted by AIX when the port is opened.
    DCD Data Carrier Detect Input signal to AIX used for DTR (hardware) flow control. When signal drops, AIX stops sending data. When signal raises, AIX resumes.
    SGND Signal Ground Used to keep signal levels balanced between RS/6000 and printer.

  8. What are the pinouts for a particular printer and adapter?
  9. How can I display all of the queues on my machine?
  10. What happens if I accidently remove the /etc/qconfig.bin file?
  11. How do I pipe the output of a command to a printer?
  12. What software product can be used to print APA on AIX?
  13. How do I know what printers are supported by AIX?
  14. Where do console print messages go when using CDE?
  15. Question: The printer operator is logged on to a CDE (common desktop environment) window. When users print with qprt -m "Load my form" the operator doesn't see the message and when mail arrives back at the user, he doesn't know how to respond.

    Answers: The problem is the console is /dev/lft. Change the console or use it.

    1. Type tty in the window you want to be console.
    2. Type swcons /dev/pts/10 to the name returned by the tty command.
    3. Alternative: Install productivity tools. There is a window there for console response.

  16. Can I view Postscript files before I print them?
  17. There are a number of postscript viewers available to view postscript formatted files on the screen as they will appear when printed. Some of the choices from AIX are:

  18. How can I use cat to send PostScript file to a printer device?
  19. I have a PostScript file and I want to 'cat file > /dev/lp0', but the printer just goes to FLUSHING. The same file prints fine to a queue. I don't want a queue, how can I get the cat to work?
    When you cat a file to /dev/lp0, the device driver can add carriage returns and line feeds to the file based on the device width parameter. One command to look at the device driver parameters is splp.
    For example:
    splp lp0
    This will show you the width of the device. You can also use smit printer and then change/show devices. Usually this value is set to something around 80. Now look at the PostScript file. If there are lines longer than 80, a line feed and carriage return are being added at the end of the first 80 characters in the line. Thus the PostScript command has garbage in the middle. Now try splp -w 10000 lp0. This is usually longer than the line in the PostScript file and the file will go untouched. Of course this may cause problems with any text you were trying to format.
    Another course of action with a PostScript file is:

     splp -p+ lp0
    
    In SMIT this looks like:
     Send all characters to printer UNMODIFIED: YES for passthrough.
    
    Both of these print a postscript file for me that won't print the default settings.

  20. What does INITING status mean for MarkNet or 4033?

    The queue status of INITING for either a 4033 LAN attached printer or 4039 LAN attached printer indicates a problem with a "lockfile" in the /tmp directory on the system.

    To prevent 2 print jobs from attempting to print to the same device at the same time, the 4033/4039 utility establishes a lock file in /tmp for the duration of the print job. Normally this file is erased at the end of the job.

    If the INITING status remains for more than a few seconds then one of two things has occurred.

    a) The same physical printer is being addressed using 2 different print device names, in which case the print job will continue as soon as the first print job is completed.

    or

    b) For some reason the process of sending the print job to the printer was interrupted. This might happen if you kill the actual backend process via a kill -9 command or if the system for some reason halts (for example, due to a power outage). The normal qcan or cancel command will NOT cause this problem as the backend processes will clean up and remove the lockfile as part of the job cancel.

    To recover: With no print jobs running to the printer, go to the /tmp directory and delete the temp file. It will look something like: /tmp/10005A102781.TOK0.0 where '10005A102781' is the LAN address of the printer or 4033. This should clear up the problem.


Answers to Common Problems

  1. Cannot cat to printer port (error 0403-005, for example)
  2. Can't print as non-root user, but root can print fine
  3. The queue hangs and I can't print. Queue says ready, but jobs don't print.
  4. Local printing in AIX: Nothing prints, but the job disappears from the queue.
    1. Formatted PCL files or ASCII files sent to PS queue: Fix by sending to ASCII queue or PCL queue.
    2. Sometimes when printing files in passthrough, there are no carriage returns, and only the first line prints. If that line is all spaces, then it might appear as if nothing printed. This can be fixed by adding carriage returns to the file with a filter, or by changing the ct attribute in the virtual printer to tell the printer to add its own carriage returns.
    3. The only other problem is wiring or printer problems.

  5. Remote printing to AIX server, but nothing prints

  6. Some things that can cause this problem are:
    1. Wrong user id for lpd, missing lpd, lpd not running
    2. Wrong permissions on files, /tmp, /, /var, /var/spool/lpd
    3. From Novell, Novell sends -T flag without title; fixed with U437429 or U438621 or supersede
    4. Printing from PC, Windows 3.1, Windows NT, OS/2 often sends a -l flag (says to add carriage return to line feed)
    5. Formatted PCL files or ASCII files sent to PS queue: Fix by sending to ASCII queue or PCL queue.

  7. lpstat gives error that queue abcd does not exist, when there is no abcd queue on the system.
  8. This is usually an indication that there are extra files in /var/spool/lpd/qdir.

  9. When I print with lpr I get headers no matter how I set up the queues.

  10. Unwanted header problems come from 2 places.

  11. What causes Queue died running request?
  12. After upgrading to AIX 4.1, cat command returns, but nothing is sent to port

  13. Sometimes when printing with 'cat > /dev/lp0' the command returns to the prompt, but nothing is sent out the port.

  14. When doing an lpstat I get a "no queue" error that says:
  15. queue status warning: no queue ?????????????? in /etc/qconfig...for
    file /var/spool/lpd/qdir/default.log

  16. I can't print an AFS mounted file.
  17. AFS (Andrews File System) files have security permissions.


FAQ on AIX Print Queues and Devices: AIX Printer Tips: prtfaqd.html ITEM: FAX
Dated: 99/03/04~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:13
Comments or suggestions? Contact us