Technical article 125677

lpstat -o hangs when one network printer is unavailable

OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

I have set up my Openserver system to print to several network printers. Running 'lpstat -o' allows me to see what print jobs are pending on the printers. If one of the printers is offline (powered off, disconnected from network) 'lpstat -o' hangs, and I cannot get the status of any of the printers.

Solution

You need to decrease the value of the TCP/IP parameter 'tcp_initial_timeout', defined as :

Sets the TCP/IP retransmit time for an initial SYN segment. The default value is 180 seconds as defined by RFC 1122. The minimum and maximum configurable values are 1 and 7200 seconds.

Setting this to a lower value (say 10 seconds) will cause the timeout to occur in a reasonable time, and will give the status of the other printers. To change this parameter, execute the following command (a re-boot is not required) :

inconfig tcp_initial_timeout 10

You should now get output from lpstat similar to the following :

# lpstat -o
adminpr1:
192.168.245.112: Connection timed out
connection to 192.168.245.231 is down
salespr1:
JetDirect lpd: no jobs queued on this port

See also

inconfig(ADMN)

From the Xinuos technical article database, record 125677. Reproduced with permission. The original is at www.sco.com/ta/125677, which is reachable but blocked from search engines.

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.