How do you create an external destination in HP Output Server? I wanted to deliver a print to a destination, that executes an external command on the job. Here's the configuration that works:
I named by logical destination external, which points to queue qexternal and the physical destination is called pdexternal.
The logical destination:
-template-version : $Date: 2002/03/01 02:35:32 $
-template-component : false
-managing-server : jqm_06
-disabled : false
-form-feed-default : false
-maximum-tries-default : 30000
-printer-name : external
-destination-type : file
-queue-supported : qexternal
-template-type : standard-template
-retention-period-default : 0
-descriptor : test external delivery pathway
-input-document-formats-supported: literal,
ps,
pdf,
text,
frame,
hp-pcl,
afp
-template : false
-template-classification : static-template
-printer-realization : 0
The queue:
-template-version : $Date: 2002/01/04 17:24:14 $
-queue-name : qexternal
-managing-server : jqm_06
-disabled : false
-template-type : standard-template
-descriptor : test external delivery pathway
-queue-warning-threshold : 50
-scheduler-assigned : Pd-FIFO
-template : false
-template-classification : static-template
-logical-printers-assigned : {external, 'available'}
-message : Enabled
-physical-printers-registered : pdexternal
-job-order :
The physical destination:
-template-version : $Date: 2002/03/12 19:59:09 $
-template-component : false
-managing-server : dsm_06a
-ghostscript-program : !{dazel-install-directory}!/bin/gs
-disabled : false
-form-feed-default : false
-deliver-program : /appl/hpos/external.sh
-printer-name : pdexternal
-queue-supported : qexternal
-template-device-name : generic
-file-overwrite-default : true
-template-type : standard-template
-character-set-default : iso-latin-1
-physical-device-type : external
-descriptor : test external delivery pathway
-medium-default : iso-a4-white
-font-directories : !{dazel-install-directory}!/lib/
FONTS/Soft_Horizons
-template : false
-character-sets-supported : iso-latin-1,
ascii
-template-classification : static-template
-file-base-directory : /tmp
-printer-realization : 1
-printer-connection-mode : external
-ps-init-directories : !{dazel-install-directory}!/lib/PS
-fifo-directory : /appl/hpos/fifo
-write-only-device : true
-deliver-arguments : !{fifo-directory}!/!{job-identifier}!
When you've created this delivery pathway, create the FIFO directory (in this case: /appl/hpos/fifo) and restart the accompanying DSM in order to activate the external destination.
The FIFO directory is used by HP Output Server to create FIFO files for every physical destination and for every job submitted to it. You can use these FIFOs to pass information back to HP Output Server.
You might have noticed the physical destination has a -deliver-program attribute. Make sure the user that runs your DSM is capable of executing this command, and the same user-ID must be able to access the FIFO directory.
The deliver-program used is shown below. It logs some information to a file and then sends an email with the contents of the file submitted to external.
#!/bin/ksh
{
echo
echo "Process:"
echo $$
echo "Parameters:"
echo $0 $*
echo "Who am I?"
whoami
} >> /appl/hpos/external.out
file=$2
base=`basename $file`
cp $file /appl/hpos/fifo/$base.$$
mail user@domain.com < $file
fifo=$1
echo "-job-state-on-printer completed" > $1
exit 0
This script passes some information back to the FIFO:-job-state-on-printer completedThis will inform HP Output Server that the processing of the job has completed. If you do not pass this information, HPOS will wait forever for the job to complete, even if the job is no longer active anymore.
Now, if you submit the following command:
# pdpr -dexternal /etc/motdThe file /etc/motd will be mailed, using script external.sh.
If you found this useful, here's more on the same topic(s) in our blog:
- Non-pingable devices
- HPOS sizing rules
- HPOS on Windows
- Decreasing job database size on Dazel 3.3
- HPOS performance tips
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?




