System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to troubleshoot printer problem - filter question

SOLVED
Go to solution
Mark Poeschl_2
Honored Contributor

Trying to troubleshoot printer problem - filter question

I'm trying to troubleshoot a very intermittent printer problem and thought I'd try to save off a copy of the print jobs for later analysis to verify the data content / format. Printer is an HP LJ4000.
Printcap entry:
IT5014TST:\
:if=/usr/lbin/hplaserof:\
:lf=/usr/spool/lpd/IT5014E.log:\
:lp=@it5014e/hplj:\
:mx#0:\
:pl#66:\
:pw#80:\
:of=/usr/lbin/teef:\
:sd=/usr/spool/lpd/IT5014E:\
:rw:\
:sh:

Contents of /usr/lbin/teef:
#! /bin/csh -f
#
# Filter to create a copy of the print job for debugging purposes
# This filter should only be used on ONE PRINTER AT A TIME on any given
# system. The DESTINATION directory must be created and monitored manually
# before activating the filter.
#
setenv FILE `date +%b%d%H%M%S`.job
setenv DEST /var/spool/lpd/IT5014E/debug
/usr/lbin/hplaserof | /bin/tee -i $DEST/$FILE

When I submit a print job, I see the request show up in the queue and I see three processes out there: a teef process, a /bin/tee process, and an hplaserof process. None completes until I 'clean' and 'restart' the queue using lpc. Then I'm left with a 16 byte file in the 'debug' directory referred to in /usr/lbin/teef (named appropriately - timestamp.job) and the full output appears on the printer.

What am I missing here?
7 REPLIES
Victor Semaska_3
Esteemed Contributor

Re: Trying to troubleshoot printer problem - filter question

Mark,

Have you looked at /var/adm/syslog.dated/current/lpr.log for any error messages?

You may want to edit /etc/syslog.conf and change the 'lpr.' line to lpr.debug. You'd then would have to restart the syslogd daemon with 'kill -HUP '.

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Mark Poeschl_2
Honored Contributor

Re: Trying to troubleshoot printer problem - filter question

Nothing of note in the lpr.log file. Attached is the lpr.log with DEBUG output.

The job hangs indefinitely at this point with a tee, a teef, and an hplaserof process all sitting out there.
Erich Wimmer
Valued Contributor

Re: Trying to troubleshoot printer problem - filter question

Mark,
I believe your problem is the ":if" entry in printcap. Remove this entry. You do not need an ":if" until you want a different filtering for the banner page.
Erich.
Michael Schulte zur Sur
Honored Contributor

Re: Trying to troubleshoot printer problem - filter question

Erich,

the problem also occurs without if

Michael
Erich Wimmer
Valued Contributor
Solution

Re: Trying to troubleshoot printer problem - filter question

I have no idea what else may be wrong. I've tested the "teef"-script on my tru64-testsystem, V5.1b, Patchkit 3 and got the same error as Mark. After removing the ":if=.." entry in /etc/printcap it worked. Erich.
Mark Poeschl_2
Honored Contributor

Re: Trying to troubleshoot printer problem - filter question

Getting rid of the 'if' in the printcap entry worked for me too. Thanks Erich!
Mark Poeschl_2
Honored Contributor

Re: Trying to troubleshoot printer problem - filter question

Thread closed.