[comp.sys.sun] lpr lock problem under Sun4.0.3

millercb@phoenix.princeton.edu (Clifford B Miller) (11/29/90)

------------------------------------------------------------------------------
	Posted for adam@research.nec.com, reply to him:
------------------------------------------------------------------------------

Hello UNIX-people!

I'm having some trouble with our network printers.

I have about 10 NEC laser printers connected to a Sun4 server running
4.0.3.  Every once in a while, one of the printers gets into a state where
it's "waiting for lock on /dev/ttyN" where N is the printer device.  No
combination of lpc commands seems to remedy this...I've had to physically
disconnect the printer from the serial port to get rid of this state.  I
have also tried things like sending an end-of-file character to the
printer.  What does this state really mean?  What is lpd really waiting
for?  Any suggestions to remedy this situation would be greatly
appreciated!

 Clifford B. Miller, Research Associate / Systems Administrator
 NEC Research Institute, 4 Independence Way, Princeton, NJ  08540
 Internet: cliff@research.nec.com		phone: (609) 951-2688
 UUCP: ...princeton!necserve!cliff

libes@cme.nist.gov (Don Libes) (12/09/90)

In article <522@brchh104.bnr.ca> millercb@phoenix.princeton.edu (Clifford B Miller) writes:
>4.0.3.  Every once in a while, one of the printers gets into a state where
>it's "waiting for lock on /dev/ttyN" where N is the printer device.  No
>combination of lpc commands seems to remedy this...I've had to physically
>disconnect the printer from the serial port to get rid of this state.  I
>have also tried things like sending an end-of-file character to the
>printer.  What does this state really mean?  What is lpd really waiting
>for?  Any suggestions to remedy this situation would be greatly
>appreciated!

I have a program that cures that state by resetting various things.
'lpunlock' comes as an example in the 'expect' distribution.  (It needs
expect because it uses lpc, and it also figures out if the printer is
remote and rlogin's to it with root privs if necessary.)

expect may be ftp'd as pub/expect.shar.Z from durer.cme.nist.gov.  Request
email delivery by mailing to "library@cme.nist.gov".  The contents of the
message should be (no subject line) "send pub/expect.shar.Z".

Don Libes          libes@cme.nist.gov      ...!uunet!cme-durer!libes