Tech Blog

These are blog entries written by the UNIX Health Check development team. Our team has extensive technical experience on both AIX and Red Hat systems, and we like to share our knowledge with our visitors.

Topics: HP Output Server

Creating external destinations

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 completed
This 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/motd
The file /etc/motd will be mailed, using script external.sh.

Topics: HP Output Server

HPOS maintenance

As HP Output Server doesn't support hot backups, It is recommended to do monthly maintenance, in order to create a backup and keep things healthy. Assuming HPOS is installed in /appl/hpos and its data is stored in /data/hpos:

  • Notify your users of the downtime.
  • Stop any applications that use HPOS.
  • Clear out any "hanging" jobs.
  • Clear out the /data/hpos/var/tmp directory.
  • For every log file in /data/hpos/var/log, issue:
    # cp /dev/null > $logfile
  • Delete and recreate the JQMs:
    # config_server -d $jqm
    # config_server -t JQM $jqm
    JQM job databases tend to grow over time. By re-creating them, you can save lots on disk usage and I/O performance. You can do this step safely, as all information is stored in the CM. If you use a server-startup-order, you should also update this again after you've recreated the JQM:
    # config_server -u -x"-server-start-order xxx" $jqm
  • Delete and recreate the DLMs:
    # config_server -d $dlm
    # nfig_server -t DLM $dlm
    This step may be required because sometimes a DLM produces errors, which you might see in JobTracker. These errors are solved by recreating the DLMs. Again, remember to set your server-startup-order, if you use it.
  • Stop all HPOS daemons:
    # stop_server -t all
  • Create a backup of the system.
  • If available, download any service packs and install them now:
    # . /appl/hpos/etc/setup_env.sh
    # perl /appl/hpos/etc/patch.pl
    If this fails, just try it again, or you can restore your backup.
  • Also upgrade any client systems to the same service pack. If necessary, also check the Windows client versions required.
  • Start all daemons again:
    # start_server -t all
  • Test if everything is working.
  • Reboot your server to free up memory.
  • Again, test if everything is working.
  • Startup all applications again, that use HPOS.
  • Notify your users that the system is available.
  • Document any changes (e.g. Service Packs) and problems encountered.
  • Store the software you've used somewhere safe.
This monthly backup still requires some daily backup method. You can do this, by dumping the HPOS configuration to file, before running your daily backup:
#!/bin/ksh
# Save HPOS config config
. /appl/dazel/etc/setup_env.sh
rm -f /appl/hpos/dump-file
pdconfig -d -c /appl/hpos/dump-file

Topics: HP Output Server

Non-pingable devices

If a device like a printer box, jet-direct card or a Xerox Document Centre does not ping anymore from the HPOS server, it will result in connection timed out errors within HPOS. If this device however does ping from another location within your netwerk, you have a network issue, and its very likely that your network switch simply needs to learn the IP address and/or MAC address of the device. You can do this by sending a packet from the device to the HPOS server. But how do you get this device to send a packet itself, because a ping is not available?

For an Axis Box, go to the Network Settings (which is available from the Admin window). Now fill in the IP address of your HPOS server as the Primary DNS server and click on Ok. Ofcourse DNS resolving will fail (if your HPOS server isn't a DNS server), but quite immediately after clicking Ok, you will notice that the Axis Box will ping again from the HPOS server. If it pings again, change the primary DNS server in your Axis Box back to its original value.

The same can be done with other devices, like the Xerox Document Centre. Go to the TCP/IP properties (usually under Properties -> Connectivity -> Protocols). Set the IP Address Resolution to STATIC (if you're using DHCP) and update the primary DNS server to the IP address of the HPOS server. Then click on Reboot on the Status window, and you'll notice that it will ping again to the HPOS server. Again, change everything back to their original values, if the Document Centre pings.

Topics: HP Output Server

HP Output Server introduction

HP Output Server 10th Anniversary CelebrationDazel is the former name for what is now known as HP Output Server (HPOS), part of the HP Output Management suite. Hewlett Packard (HP) bought Dazel Corporation in 2001.

HPOS is an output management system: its task is to centrally manage the output of complete enterprises, whether it is printed output, e-mail, fax, paging, web or file delivery, and so on. It provides a means for cross-platform management of output.

Currently, HPOS is supported on AIX, HP-UX, Sun Solaris, Windows 2000/2003 server and Linux (Red Hat Enterprise Linux ES and Suse Linux Enterprise Server). Also several add-on's are available, such as Output Managers for SAP or Oracle applications.

The most current version of HPOS is version 4.0. Support for versions 3.3 and 3.4 have ended in July 2007. The main difference between versions 3.5 and previous versions is, that version 3.5 uses a MySQL database to store its data, where older versions uses a proprietary flat file database (Velocis).

Version 3.5 of HP Output Server has been released in December 2005. A new accompanying course was also released. Version 3.3 has proven to be a very stable version. Version 3.4.1 was the first version to use MySQL for its database and has known some issues. Most customers have either stayed on version 3.3 or moved to version 3.5. With the release of 3.5, the support for 3.4.1 ended in 2006, and customers were requested to move to version 3.5.

For Windows users client software is available, known as HP Output Envoy. Also, for HPOS system administrators, an extended Envoy package is available, known as HP Output Explorer.

From July 2006 no more service packs will be released. Instead of SP's, Maintenance Releases will be made. This means that these will not only contain fixes, but also new additional functionality and new printer drivers. In March 2006 the Linux Server version was also released for Red Hat Enterprise Linux ES 4.0 and Suse Linux Enterprise Server 9 SP2. And in July 2006, a new WebGUI was introduced. First step in this, is to provide for a WebGUI for job management. Later on, the WebGUI will become a full administration GUI for HP Output Server. Probably the Windows HP Output Explorer tool will no longer be needed by then. In July 2006 also a sftp (Secure FTP) destination was made available, besides the already available regular FTP destination.



Advantages of using HP Output Server:

  • Scalability of output management.
  • Central management and monitoring of all output in the enterprise.
  • Reliable delivery of output, including tracking information and confirmation of successfull completion.
  • A single administrator is usually enough for large organizations; without Output Server more staff would be necessary; thus Output Server reduces costs of output management.
  • Requires only one printer driver (Envoy) on a Windows client, which reduces testing efforts.
  • Ability to transform output as required.
  • Configurable to work with Oracle and SAP.
  • Support for many devices, both HP and third-party.
  • Accounting and auditing of output possible.
  • Runs on several operating systems and accepts output requests from a variety of client sources.

Topics: HP Output Server

Epod Web Monitor for HP Output Server

What it does, is very simple: it creates a web page that shows an overview of the jobs which passed through HP Output Server.

What do you need to accomplish this?

  • The Event Monitor (EM) of HP Output Server, which is usually running anyway in any HP Output Server environment.
  • A subscription file, in which you register what events to react to.
  • A Description file, which formats the incoming events into HTML output and writes it to a file.
  • An HTML header file, used as an header for the webpage; this one is created automatically by the following:
  • An original HTML header file, which is used to create the HTML header file.
  • An HTML header update script, which updates the HTML header file, from the original HTML header file. It updates the date and number of succesfull jobs.
  • An EPOD update script, which updates the webpage.
  • Perl script web_server.pl, which is included in the HP Output Server distribution. This perl script is the (small) webserver (You can also use the Apache webserver, in case you have the WebGUI installed).
  • An EPOD clear log script, to empty the EPOD log once a week.
  • Start and stop scripts for this EPOD web monitor.
Put all of these items in a separate directory, e.g.: /appl/hpos/epod

The Subscription file

It is called epod.subs:
#epod.subs
ids_alljobs,..1.0.10175.1.0.0.6.124.0,*
ids_alljobs,..1.0.10175.1.0.0.6.121.0,*
ids_alljobs,..1.0.10175.1.0.0.6.121.1,*
ids_alljobs,..1.0.10175.1.0.0.6.121.2,*
ids_alljobs,..1.0.10175.1.0.0.6.123.0,*
ids_alljobs,..1.0.10175.1.0.0.6.123.1,*
ids_alljobs,..1.0.10175.1.0.0.6.123.2,*
ids_alljobs,..1.0.10175.1.0.0.6.123.9,*
ids_alljobs,..1.0.10175.1.0.0.6.123.99,*
The Description file

Filename: epod.desc:
# epod.desc
# support file for HPOS Epod logging
# see also EPOD.SUBS for event subscriptions
# This file generates HTML coded logging and can be viewed with
# the web_server.pl script

# Initialize HP Output Server environment
# Change to wherever your setup_env.sh file is.
. /appl/hpos/etc/setup_env.sh

set itext $instance

does $instance

# all abort messages (blue)
match ..1.0.10175.1.0.0.6.121.*
set itext <font color=Blue>
endmatch
# all error messages (red)
match ..1.0.10175.1.0.0.6.122.*
set itext <font color=Red>
endmatch
# all warning messages (black)
match ..1.0.10175.1.0.0.6.123.*
set itext <font color=Black>
endmatch
# all report messages (green = good)
match ..1.0.10175.1.0.0.6.124.0
set itext <font color=Green>
endmatch

enddoes

does $class
match ids_alljobs
fields subjob owner msg jobid destination jobname proctime completed count rdevice profmsg
exec echo "</table> <table cellspacing=0 cellpadding=0 width=100% border=0> <TR><TD valign=top width=200> <font color=Black size=1>" `date`"</font> </td><TD valign=top align=left> <font size=1> $itext $subjob $owner $msg $jobid $destination $proctime $completed $count $rdevice $profmsg $jobname" >> /appl/hpos/epod/epod.log
endmatch
enddoes
Okay, so now we have a file, which listens to certain events (epod.subs), and a script (epod.desc) that formats it into HTML output and writes is to file epod.log. Now on to the header of the webpage:

The original HTML header file

It is called htmlheader:
<!-- this html header is used by HPOS epod event logging -->
<head>
<meta http-equiv="Refresh" content="30">
<title>HPOS Epod Event Monitoring</title>
</head>
<table border=0 cellpadding=3 cellspacing=0 width="100%">
<tr bgcolor=#dcdcdc>
<table border=0 cellpadding=0 cellspacing=0 width="100%">
<table border=0 cellpadding=5 cellspacing=0 width="100%">
<tr bgcolor="#dcdcdc">
<td align=left>
<b><font face=Arial color="#800080" size="+.3">
HPOS Epod Event Monitor</font>
<font face=Arial color="#800080" size=-3>
<!--kkkk-->
</font></b>
</td>
<td align=right>
<font face=Arial color="#800080" size=-3>
</font>
</td>
</tr>
</table>
</table>
</tr>
<tr>
<td>
<font face=Arial size=-3>
<!--@@@@@@@@@@-->
This HTML header file is a fancy header. It shows information about the number of jobs succesfully processed, the current date and the creator of the page. It refreshes every 3 seconds.

You need a script to update this HTML header file with the current date and number of jobs:

HTML header update script

This is called update-htmlheader.sh:
# update-htmlheader.sh
# replace string <!--kkkk--> in file htmlheader for the number of jobs
now=`date`
nrjobs=`grep -i green /appl/hpos/epod/epod.log* | wc -l | awk '{print $1}'`
totjobs2=`cat /appl/hpos/totjobs | awk '{print $1}'`
let nrjobs="$nrjobs+$totjobs2"
cat /appl/hpos/epod/htmlheader.org | sed "s/<!--kkkk-->/$nrjobs jobs since 28-07-03. ($now)/g" > /appl/hpos/epod/htmlheader
This script above uses a file named totjobs which is nothing more than a plain file containing the total number of jobs since last week. This file is created once a week by the Clear EPOD log script (see further down below).

Now, to put this together, we need a script that creates the webpage by putting in the header and adding a tail of the epod.log file. The next script updates it a 100 times, with pauses of 3 seconds in between and then exits:

EPOD Update script

Filename: epodupd.sh

#!/bin/ksh
unset result
result=`ps -ef | grep epodupd | grep -v grep | grep -v $$ | wc -l | awk '{print $1}'`
# check if i am running
if [ $result -gt 0 ]
then
exit
fi
let teller=0
while [ $teller -lt 100 ]
do
cat /appl/hpos/epod/htmlheader > /appl/hpos/epod/epodhtml2.log
tail -r -35 /appl/hpos/epod/epod.log >> /appl/hpos/epod/epodhtml2.log
mv /appl/hpos/epod/epodhtml2.log /appl/hpos/epod/epodhtml.log
sleep 3
let teller="$teller+1"
done
Now, the web page is created. We need to make sure the file epod.log doesn't fill up the complete file system, by clearing its contents and writing the number of succesful jobs to file totjobs once a week.

Clear EPOD log script

Filename: clear_epod_log.sh

#!/bin/ksh
# Little script to clear the epod.log file
# base directory for this script
base=/appl/hpos
# number of succesfully completed files this week
complete=`grep -ci green $base/epod/epod.log | awk '{print $1}'`
# number of succesfully completed files before this week
compl=`cat $base/totjobs | head -1 | awk '{print $1}'`
# add those two
let total=0
let total="$total+$compl"
let total="$total+$complete"
# save the previous total
cp $base/totjobs $base/totjobs.old
# clear the log file
cp /dev/null $base/epod/epod.log
# write the new total to totjobs
echo $total > $base/totjobs
Put this script into your root crontab:
# Clear the epod log once a week on Sunday
0 0 * * 0 /appl/hpos/epod/clear_epod_log.sh 2>/dev/null
Start & Stop scripts

To start this, run script epodstart.sh:
# epodstart.sh
# script to start epod eventmonitoring
# source environment
. /appl/hpos/etc/setup_env.sh
# kill any previous instance of epod
kill -9 $(ps -ef | grep dzl_epod | \
awk ' { print $2 } ' - ) >/dev/null 2>&1
kill -9 $(ps -ef | grep epod | \
grep web_server.pl | awk ' { print $2 } ' - ) >/dev/null 2>&1
# restart epod
/appl/hpos/lib/dzl_epod -s /appl/hpos/epod/epod.subs -d /appl/hpos/epod/epod.desc -Q -B > /appl/hpos/epod/epod.err 2>&1 &
cd /appl/hpos/epod
# start the webserver
perl ./web_server.pl -f /appl/hpos/epod/epodhtml.log &
Make sure epodstart.sh is also somewhere in the startup script of your HPOS environment, so it gets started as soon HPOS is started. The same goes for your stop script.

To stop the EPOD web monitor, run epodstop.sh:
# epodstop.sh
# script to stop epod eventmonitoring
# source environment
. /appl/hpos/etc/setup_env.sh
# kill any instance of epod
kill -9 $(ps -ef | grep dzl_epod | awk ' { print $2 } ' - ) >/dev/null 2>&1
kill -9 $(ps -ef | grep epod | grep web_server.pl | awk ' { print $2 } ' - ) >/dev/null 2>&1
The PERL web_server.pl is a modified web_server.pl file, from the Snapshot2 feature of HPOS. It listens to port 8089. You can download this PERL web server here .

Once the EPOD Web Monitor has started via epodstart.sh, you can browse the page: http://[hostname-of-your-hpos-server]:8089

The web page should look like this:

HPOS Epod

Now, you have a GREAT way of monitoring your system! Green entries are jobs succesfully ended. Any other colors show problems occured, or queues cleaned or whatever.

For any further description of the HPOS EPOD, check out the HPOS System Administration Guide, Appendix D.

Topics: HP Output Server

Growing System Dump Device usage with HPOS on AIX

Configuration: AIX 5.2, maintenance level 1 and Dazel 3.3, Service Pack 9.
Problem: sysdumpdev -e shows increasing usage of the system dump device. Eventually the dump device needed, grows to 1200 MB, after which the server becomes unresponsive and a reboot is the only solution.

Even though HP suggests using maintenance level 1 for AIX 5.2, try using maintenance level 2; after loading ML2, this problem is gone; it's an AIX bug with a memory leak in the TCP/IP stack, which is solved in ML2.

Number of results found for topic HP Output Server: 16.
Displaying results: 11 - 16.