cancel
Showing results for 
Search instead for 
Did you mean: 

lpstat hangs in HP-UX 11.00

raja1981
Occasional Advisor

lpstat hangs in HP-UX 11.00

Hi,

I have a problem with printer, lpstat commands hangs every 5 days.what is the purpose of the qstatus file, what is the default size. please give the recommandations, whether i need to install any patches for hppi?

details:
# uname -a
HP-UX uotjet1 B.11.00 U 9000/800 588706547 unlimited-user license
# swlist |grep lp
PHCO_25110 1.0 lpspool subsystem cumulative patch
PHCO_29208 1.0 lpspool subsystem cumulative patch
==
-rw-r--r-- 1 lp lp 47564 May 25 16:34 qstatus
everytime lpstat hangs, even if we restart the spooler also.

Need your inputs.
12 REPLIES
Bill Hassell
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

lpstat will hang when trying to get a status from a remote printer. hppi only talks to network printers (ie, HP printers with JetDirect cards) whereas remote printers are located on some other server (NT, Linux, etc). Until the failing printer is removed, lpstat (especially -t) will always hang.

qstatus is part of the bookeeping used in the spooler. The 3 status files (pstatus, qstatus and outputq) are binary files managed by the lpsched program. The size of the files is only indicative of the number of printers you have and the current activity.


Bill Hassell, sysadmin
raja1981
Occasional Advisor

Re: lpstat hangs in HP-UX 11.00

Bill,
# find /var/spool/lp/request/ -type f -exec ls -lrt {} \;|egrep -v "remote|sending" | wc -l
24390
print queue are not getting cleared automatically, please let me know the reason.what is the default buffer size of the print queue, since at certain of time for 4 or 6 days all print queue fails.
====
# ls -l |egrep -i "pstatus|qstatus|outputq"
-rw-r--r-- 1 lp lp 5220036 Jun 23 11:18 outputq
-rw-r--r-- 1 lp lp 192780 Jun 23 11:18 pstatus
-rw-r--r-- 1 lp lp 47940 Jun 11 15:06 qstatus
====
Also if there any possibility to copy the entire printer configuration to other server for failure recovery plan. since it is a very critical server.



raja1981
Occasional Advisor

Re: lpstat hangs in HP-UX 11.00

Bill,

# ls -l |egrep -i "pstatus|qstatus|outputq"
-rw-r--r-- 1 lp lp 5220036 Jun 23 11:18 outputq
-rw-r--r-- 1 lp lp 192780 Jun 23 11:18 pstatus
-rw-r--r-- 1 lp lp 47940 Jun 11 15:06 qstatus

what is the buffer size of the printer queue, we have 255 printers configured, every 4 or 6days all print queue stops automatically.also i find the printer queue is not cleared automatically, any specific reason.
# find /var/spool/lp/request/ -type f -exec ls -lrt {} \;|egrep -v "remote|sending" | wc -l
24390

from the above o/p iam able to see the print queue on from june14th.

Also is there any possbility to copy the entire printer q configuration to other server.

Aneesh Mohan
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

Hi,

>>is there any possbility to copy the entire printer q configuration to other server.

Steps;-
-------


Save the configuration files in /var/sam/lp/

# /usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/

Copy in to the 2nd server

#rcp -r -p /var/sam/lp/lp.new/* 2ndserver:/var/sam/lp/

Restore the printer configuration in 2ndserver

#/usr/sam/lbin/lpmgr -R xsavedir=/var/sam/lp/


Regards,
Aneesh
Bill Hassell
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

Even with this obsolete OS version, you are way behind on patches:

PHCO_29208 (2003) or PHCO_31016 (2004)

I would also verify the spooling system with:

swverify PrinterMgmt

Fix everything except the man page stuff. Fixing the permission and ownership errors should get the spooler working again.


Bill Hassell, sysadmin
raja1981
Occasional Advisor

Re: lpstat hangs in HP-UX 11.00

permission everything is fine,if got the problem, immediately we need to clear the queue,nullify the file outputq file, restarting the spooler which works.

Its not getting cleared automatically y?
what is the buffer size of printer queue,how to find.
Bill Hassell
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

> Its not getting cleared automatically y?

Nothing is automatic for print problems in HP-UX. If it hangs, you'll have to clear it manually.

> what is the buffer size of printer queue,how to find.

There is no specific buffer size for each printer. The storage area is /var/spool/lp/request. To see how much space you have, use the command:

bdf /var/spool/lp/request

NOTE: This is normally part of /var. If it gets filled up for any reason, most everything on the computer will stop working. If you have large print jobs, you may need to create a separate mountpoint for the request directory.


Bill Hassell, sysadmin
raja1981
Occasional Advisor

Re: lpstat hangs in HP-UX 11.00

Thanks Bill,

Final question, even printed spooler request its not getting cleared.y?

If its not printed,its ok,i wont clear...

Am i correct, like windows print queue.i will clear once printed.
OldSchool
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

once the request is successfully processed, the request should no longer appear in the queue.
Bill Hassell
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

> Am i correct, like windows print queue.i will clear once printed.

Like any spooling system, the print file will be removed when the shell script finishes normally. Are you saying that no files are ever removed, or just the files that were being processed when the connection hangs?


Bill Hassell, sysadmin
raja1981
Occasional Advisor

Re: lpstat hangs in HP-UX 11.00

Ya, None of the files are getting cleared, iam able to see more thatn 1000 of print request for last week itself
OldSchool
Honored Contributor

Re: lpstat hangs in HP-UX 11.00

if you've a job that is in "sending" status since the 14th, then the rec'ving system didn't take it.

try to disable / enable the offending printer. don't recall if there is a "TEOJ" setting in remote printer or not. for some reason, the receiving system didn't acknowledge the transfer, or thinks it didn't finish.

is there a particular reason you are using "remote" printing as opposed to network?