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 ProtocolManual pages for lpstat