Operating System - HP-UX
1820216 Members
3829 Online
109620 Solutions
New Discussion юеВ

Re: lpstat hangs on systems utilizing remote printers

 
Debbie Fleith
Regular Advisor

lpstat hangs on systems utilizing remote printers

I have several systems configured to use remote network printers. The printers are configured at remote sites on a local PC utilizing "Ni-Print" to enable the network printing capabilities.

Printing works fine, but lpstat commands hang as they try to return the status of these printers. This happens even when the printers are availble on the network, not just when the PCs which the printers are attached to are turned off.

Is there any work around for this?
12 REPLIES 12
Antoanetta Naghiu
Esteemed Contributor

Re: lpstat hangs on systems utilizing remote printers

See if you have the following patch:
s700_800 10.20 lpspool subsystem cumulative patch(PHCO_18779)--for HP_UX 10.20
or
s700_800 11.00 lpspool subsystem cumulative patch(PHCO_19484)--for HP-UX 11.0
Rick Garland
Honored Contributor

Re: lpstat hangs on systems utilizing remote printers

lpstat command will typically come back after so much time and respond with an error message as to what might be causing the problem. Can you run the lpstat command and let it do it thing for awhile? When it finally does come back and finish, what is/are the error(s).
CHRIS_ANORUO
Honored Contributor

Re: lpstat hangs on systems utilizing remote printers

The problem is caused by unfinished print jobs on the system due to printer going down. Install the patches as specified by Antoanetta applicable to your system
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Debbie Fleith
Regular Advisor

Re: lpstat hangs on systems utilizing remote printers

These systems do have the lpspool subsystem cumulative patch
jherring
Regular Advisor

Re: lpstat hangs on systems utilizing remote printers

I have seen where you can have corruption in the /var/spool/lp/pstatus file which will cause lpstat to hang, core dump etc. and printing is not even affected.

You can do a strings on /var/spool/lp/pstatus and If you are getting garbled text etc back then it is most likely corrupt. You should look at outputq and qstatus also in that directory using the same method.

If this is the case and you only have a few printers you may have to clear the corrupt file and recreate the printers. Or if you saved the spooler config in SAM you can go back and get restore it. Also a backup may have a clean copy.
Debbie Fleith
Regular Advisor

Re: lpstat hangs on systems utilizing remote printers

In response to Rick Garland's question,
the error that finally returns, after about 3 minutes, is "the printer_name is down".

I'm lookiing for a possible solution which will allow the lpstat command to return quicker (whether the printer is actually up or down), so it doesn't appear "hung" within our application which uses it.
James R. Ferguson
Acclaimed Contributor

Re: lpstat hangs on systems utilizing remote printers

Debbie:

Is DNS involved in the setup of the remote printers -- i.e. did you build the remote printers specifying an IPADDRESS or a DNS name?

...JRF...
Rick Garland
Honored Contributor

Re: lpstat hangs on systems utilizing remote printers

I'm not so sure that a quicker response to the lpstat command is possible when you have printers down. You mentioned that some printers are hanging off of PC's. Any chance you place these printers on the network so that when a users PC is turned off it doesn't affect the status of the printer? Other option is to have the PCs on - always.
John Palmer
Honored Contributor

Re: lpstat hangs on systems utilizing remote printers

lpstat tries to query the print queues on these remote servers and sometimes depending on how their emulation software is written, they don't want to do this.

You can stop lpstat from doing this by supplying the -t flag (I think) try man lpstat. I always use 'lpstat -i -t' personally because of this behaviour.

It may also be possible to remove the configuration of the hook scripts that get configured when you create a remote (rlp) printer with SAM.
Andrew Maslin
Frequent Advisor

Re: lpstat hangs on systems utilizing remote printers

I have this problem as well and have never gotten around to finding a real fix to it. John Palmer's response is good - it's probably the software on the PCs. Have you checked to make sure you have the most recent version of that software?

The -t flag for lpstat does not skip this behavior, though. I'm not sure about the -i that John mentioned, I'll have to go look that up. I use -t to view all printers on the system, but at the end it polls the individual queues, so you end up with the same problem (and a very long wait if you have more than 1 printer with the same behavior, as each will delay in turn).
John Palmer
Honored Contributor

Re: lpstat hangs on systems utilizing remote printers

Thanks Andrew,

It must be the -i flag then that stops it. I haven't got the man pages available at the moment so I couldn't check.
Al Langen
Advisor

Re: lpstat hangs on systems utilizing remote printers

The solution is to use the -i parameter which tells lpstat to ignore trying to receive a response from network printers. Except for printers set up using jetadmin, the lpstat command will always spend time verifying the status of the printer on the remote host.
It's not the ups and downs in life, it's the jerks. A. E. Newman