In problem determination, it is often useful to look at the file being printed through different states of the print process. There are a number of options for capturing a spool file in AIX depending on the reason for capturing data. Here are four basic methods:
cat /dev/null > /dev/capture chgrp printq /dev/capture chmod 777 /dev/capture
File File (in /dev directory)
Name of existing FILE in /dev directory capture
cat /dev/null > /dev/capture'
disable capture
lpstat -t -vcaptureDo not leave a space between v and capture. The -t flag causes the file to be displayed.
Queue Dev Status Job Files User ------- ----- --------- --- ------------------ ---------- capture captu DOWN QUEUED 147 STDIN.23330 jwtesch@aixnts 03/05/97 09:21:04 1 15 2 1 /var/spool/lpd/dfA692aixnts
To see the job description file, follow these steps:
enq valid flags are on one line:
NAME=joebob-Pps-Ttitle
qprt flags all start with $#@!:
$#@!-d $#@!-p $#@!-z $#@!+
Nothing will be sent to /dev/capture.
iptrace -p printer -a -b -s <source_host> -d <dest_host> /tmp/trace.out
enq -Pqueue_name <filename>Print the job to the remote queue or use lpstat -v<queue_name> if you want to trace the status report.
ls -l /tmp/trace.outCheck if the file has grown. If it is still 11 bytes, then the command has been issued incorrectly. Kill the process and retry.
ps -ef | grep ipt
kill -9 <process_id>
ipreport /tmp/trace.out > /tmp/report.out
grep 0000 /tmp/report.out
This will show all the data that passes over the network in both hexadecimal and ASCII text, allowing you to compare with the starting file, as well as what printed on the remote printer.
This gives the option to write a program that archives the data to a specific file. Some hints while developing this script are to use a shell script with commands like:
When adding the script backend, add the queue as follows (AIX 4.1):
[ Doc Ref: 91755795210916 Publish Date: Mar. 06, 2001 4FAX Ref: 6478 ]