Subject: stubborn printers
To: None <current-users@netbsd.org>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: current-users
Date: 09/22/2002 04:24:12
I have a 16 port PCI serial card in a machine running NetBSD 1.6
with a bunch of printers hanging off of it. Quite frequently one or
more of the printers will stop printing for no apparent reason. pstat
-t will show that there is data buffered, but nothing is sent to the
printer. Until recently the printers were hooked up to a SCO
Openserver system and everything worked fine, so I don't think it is
the printers or the wiring. Here is a bunch of information about the
problem. If anybody wants more information, just let me know. One of
the observations has been that when things go wrong, the status file
will have a NULL character at the end of it.
Script started on Mon Sep 16 18:17:55 2002
psc: {1} ls -l /var/spool/lpd/pr2
total 50
-rw-rw---x 1 root wheel 4 Jun 7 19:24 .seq
-rw-rw---- 1 root wheel 149 Sep 16 17:57 cfA589scosysv
-rw-rw---- 1 root wheel 19790 Sep 16 17:57 dfA589scosysv.pscnaturalfoods.com
-rw-rw---- 1 root wheel 18 Sep 16 17:57 lock
-rwxr-xr-x 1 root wheel 150 Jun 18 15:40 pr2_filter
-rw-rw-r-- 1 root wheel 27 Sep 16 17:57 status
-rw-rw-r-- 1 root wheel 0 Sep 16 18:17 typescript
psc: {3} cat status
pr2 is ready and printing
^@
psc: {4} cat lock
304
cfA589scosysv
psc: {5} ps auwwx | grep lpd
daemon 305 0.0 0.0 476 4 ?? SW - 0:00.00 /bin/sh /var/spool/lpd/pr2/pr2_filter -w132 -l66 -i0 -n kerr -h scosysv.pscnaturalfoods.com
root 304 0.0 0.0 136 4 ?? SW - 0:00.00 lpd: serving scosysv: recvjob pr2
root 160 0.0 0.0 128 4 ?? SWs - 0:00.00 /usr/sbin/lpd -b 192.168.2.254 -l -w 120
root 402 0.0 1.4 480 424 p1 RV 6:18PM 0:00.00 grep lpd (csh)
psc: {6} netstat -an | grep 515
tcp 0 0 192.168.2.254.515 *.* LISTEN
psc: {7} cat /etc/printcap
pr2:\
:br#9600:lp=/dev/tty03:mx#0:\
:if=/var/spool/lpd/pr2/pr2_filter:\
:sd=/var/spool/lpd/pr2:sf:sh:
psc: {8} pstat -t
125 terminal devices
LINE RAW CAN OUT HWT LWT COL STATE SESS PGID DISC
tty03 0 0 1024 1248 256 37 OCBAX 0 0 termios
psc: {9} cat /var/spool/lpd/pr2/pr2_filter
#!/bin/sh
# turn on condensed mode
printf "\033\017"
# print document
cat
# reset to 10cpi draft
printf "\022"
# hope everything went okay
exit 0
psc: {10} uname -a
NetBSD psc 1.6 NetBSD 1.6 (PSC) #4: Mon Sep 16 00:46:44 PDT 2002 jnemeth@psc:/usr/src/sys/arch/i386/compile/PSC i386
psc: {11} dmesg
puc0 at pci0 dev 11 function 0: Lava Computers Octopus-550 8-port serial (com, c
om, com, com)
com3 at puc0 port 1: interrupting at irq 10
com3: ns16550a, working fifo
psc: {12} exit
psc: {13} exit
Script done on Mon Sep 16 18:19:32 2002