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 10You 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)