Technical article 110522

lpstat -t hangs while remote print jobs are printing.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5UnixWare 7.0.0UnixWare 7.0.1UnixWare 7.1.0

Written · Last revised

Problem

Sometimes when I issue the command "lpstat -t" the command hangs while listing information about my remote printers. Some of my remote printers are attached to single-port print servers.

Cause

Most single-port print servers are not capable of reporting status information while they are printing. Print servers require the ability to spool print jobs in order to also report status while printing. Most single-port print servers don't support spooling, and therefore are unable to do anything except print when sent a print job.

There are other reasons for the lpstat command to hang: remote machines off the network are not responding, invalid remote machine names appear in /etc/printcap, or there are DNS problems resolving names from /etc/printcap.

Solution

If you require status information from remote printers while they are printing, you must use a print server that supports spooling. Unix machines configured as print servers do support spooling and therefore can report status while printing.

For the other possible problems, check /etc/printcap and make sure that each rm=<Remote Machine> is accessible.

If a remote machine isn't accessible there will be hang while lpstat attempts to contact that address until the connection times out.

NOTES:    There is a similar problem with the cancel command, as this feature
          also requires the ability to spool print jobs in order to work
          correctly.

See also

ta110520, "Cancel command hangs when trying to cancel remote LPD print job."

RFC1179 - Line Printing Daemon Protocol
Manual pages for lpstat

From the Xinuos technical article database, record 110522. Reproduced with permission. The original is at www.sco.com/ta/110522, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.