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
echo "AAAAA" | qprt -Pqueue_name - Easy to find in capture
file
qprt -P<queue> <filename>
cat /dev/null > /dev/capture'
disable capture
lpstat -t -vcapture Don't leave space between v and capture.
The minus "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
One of the things that affects the processing of a job that has been
sent to an AIX queue is the flags that have been used in the printing process.
Because all of the print commands in AIX call the enq print program,
it can sometimes be surprising what enq flags are generated by the different
commands. For example issuing the print command
lpr calls
enq with a -c flag and a -Ban. This means that the file is copied
to /var/spool/qdaemon before being printed, and that it will always have
a header page. To see the job description file follow these steps:
cd /var/spool/lpd/qdir - This directory contains
the job description file for all jobs that are queued.
ls -l shows which jobs are currently queued.
You will be able to identify the file for your job because the file name
will contain the user id and the queue.
pg <file_name> and look for flags as shown below:
Nothing will get sent to /dev/capture.
cancel ### where ### is the job name.
cancel 363
cancel capture to remove all files from queue.
iptrace -p printer -a -b -s source_host -d dest_host /tmp/trace.out
enq -Pqueue_name filename
ls -l /tmp/trace.out
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