1823064 Members
3402 Online
109645 Solutions
New Discussion юеВ

LPSTAT Hanging System

 
r Collatos
New Member

LPSTAT Hanging System

On My HP-UX 11.0 system, when I run any lpstat command my systems hangs. It takes a couple of minutes to get the prompt back and takes a while for the printer to start printing. I have done lpshut and lpsched and the printers seem to work, but when I use the lpstat command there is no prompt. If I run a lpstat -t it hags at the end of th elist and I need to do a CTRL-C to get the prompt back. Any suggestions.

TIA
4 REPLIES 4
Andreas Voss
Honored Contributor

Re: LPSTAT Hanging System

Hi,

this delay could happen if you have remote printer which are not online.
By doing lpstat -t all remote printers would be queried by /usr/sbin/rlpstat which has a long timeout (approx. 30 seconds). If you have a couple of remote printers not online lpstat can be hanging long time.
The rlpstat command is stored in files that have the name of the printer queue in the directory /etc/lp/sinterface.
Looks like:
# /* @(#) $Revision: 72.2 $ */
# This model is for remote status operation.

/usr/sbin/rlpstat $*

Put you a C program (my_rlpstat.c) at attachment which terminates rlpstat after 1 sec.
Compile:
cc my_rlpstat.c -o /usr/local/bin/my_rlpstat
The change within your /etc/lp/sinterface files the line
/usr/sbin/rlpstat $*
to
/usr/local/bin/my_rlpstat $*

Hope this helps.
Lothar Krueler
Regular Advisor

Re: LPSTAT Hanging System

This is a known problem. Take a look at
"http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xa883c3d7fb78d4118fef0090279cd0f9,00.html"
May be that helps.
Lothar
Wissen macht zaghaft, Dummheit kann alles!
John Palmer
Honored Contributor

Re: LPSTAT Hanging System

The gist of that previous thread is to use the -i flag to lpstat to stop it reporting remote status. Are you interested in what's in the queue on the rmote server anyway?
CHRIS_ANORUO
Honored Contributor

Re: LPSTAT Hanging System

Use cancel -dlp(printername) -u(username), this will cancel the print job from the remote system that is causing the lpstat hang.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.