Operating System - HP-UX
1846559 Members
2315 Online
110256 Solutions
New Discussion

Re: multiple printers configuration

 
SOLVED
Go to solution
Vasikaran Venkatesan
Frequent Advisor

multiple printers configuration

I have 8 HP-UX servers all having access to a set of over 100 network printers located in few buildings.

I have presently configured all the printers with their own IP address and the users accessing it using the printer name as in /etc/hosts file.

Is there a easy way to configure these printers - by creating a single print server for all these printers and all the 8 servers handing over the request to the single print server and go from there ?.

or Should I create a class for a set of printers and send the print request to the class instead of individual printers.

Please remember my question is not regarding to IP management (using NIS/YP) but easier configuration management (instead of configuring 100 printers in each of the 8 servers - manage it from one server).

Thanks any help would be greatly appreciated.
7 REPLIES 7
Mark Grant
Honored Contributor

Re: multiple printers configuration

Well, yes but you are still going to have to configure the print queues on each server.

Basically set all the printers up on one server as per normal. Then, you create remote queues on the other servers that specify the host that has the printer definition and the name of the queue on that print server. It actually easier to do this with SAM using the "remote printers" set up.

The only advantage this gives you though is that printer drivers and filters would only need to be managed on one machine but it doesn't give you much more.
Never preceed any demonstration with anything more predictive than "watch this"
Sanjay_6
Honored Contributor

Re: multiple printers configuration

Hi,

We use openspool to do the configuration once and it gets distributed to all the systems in our environment. Some 100s of them.

I think openspool has been replaced by another product from hp, but i'm not so sure.

Hope this helps.

Regds
Mark Grant
Honored Contributor

Re: multiple printers configuration

Sanjay, as usual, is absolutely right, I'd forgotten about openspool but I can't resist saying that my experiences with openspool are not good.

I may have been unlucky but I found openspool often got into a circular argument about weather a printer did exist or it didn't!
Never preceed any demonstration with anything more predictive than "watch this"
Sanjay_6
Honored Contributor

Re: multiple printers configuration

Hi Mark,

Fortunately for us, we had been quite okay with openspool and have been using it to managers printers across multiple sites. The administation of the openspool is distributed in our environment with the on-call primarily managing any problems, but haven't run across any painful problem till now.

I'm sure there are some other products out there, but don't remember or recall any of them off the top of my head.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: multiple printers configuration

Hi,

Check out page 32 of this pdf for some alternate solutions.

http://ovweb.external.hp.com/ovnsmdps/pdf/b1906-90011.pdf

Hope this helps.

Regds
Geoff Wild
Honored Contributor
Solution

Re: multiple printers configuration

Another way to do this is configure the printers on one server, then write a wrapper script to lp on the others that rcp the files to the "print server" and print them from there. I do something like that in my SAP environment - I have a single print server (though it is in MC/ServiceGuard)...

Rgds...Geoff

Hopefully, cut'n'paste works:


cat file_print.ksh
#!/bin/ksh
#---------------------------------------------------------------------------
# Shell script taken from R3 note 6753. Cleaned up etc Mailloux July 96
# A shell script that can be entered in SAP R/3 profile parameter
# rspo/host_spool/print e.g. with the following value:
#
# /sapmnt/SID/exe/file_print.ksh &P &C &F &I &J
#
# Before this, the old value must be determined (e.g. with
# report RSPFPAR) and entered in the script as
# described below.
#
# stdout is read by the output editor and copied to the
# individual output request logs.
#
# stderr writs to the output editor's log, e.g. to
# in /usr/sap/C11/DVBEMGS00/work/dev_w12
#---------------------------------------------------------------------------
FUNC_FILE=/usr/local/lp/print.functions
P=$1
C=$2
F=$3
I=$4
J=$5


# Source the files and functions
. $FUNC_FILE

Outpath=/usr/sap/xfer


# What was entered as "Host printer name" in SPAD?

Prtname=FILE
if test "X$P" = "X"
then
echo "Output device unknown"
echo "Output device unnamed" 1>&2
exit
elif test "X$F" = "X"
then
echo "File name missing"
echo "File name missing" 1>&2
exit
fi
#if test "X$C" != "X1"
#then
# echo "(Warning) Multiple output ignored."
#fi
# Process request differently based on device name
case $P in
FILE)
# Strip path if any and take only filename
Filename=`echo $F | sed 's/.*\///'`
# Append Dateiname and process id to output file path
Fileout=$Outpath/${Filename}.$$
mv $F $Fileout
Status=$?
if test "$Status" != 0
then
echo "Cannot move $F to $Fileout"
echo "Cannot move $F to $Fileout" 1>&2
echo "Cannot move $F to Fileout Please Investigate" \ > tmp.$$
Msg="Unix file error $ORACLE_SID"
mail -s "$Msg" me@mydomain.com < tmp.$$
rm tmp.$$
exit $Status
fi
;;
esac

case $P in

C003)
printftp
exit
;;

chprt)
chprt
exit
;;
*)
print_hp
exit
;;
esac


cat print.functions
#################################################
# Fuctions called by file_print.ksh
# By: Geoff Wild
#################################################
#set -x
function print_hp
{
Outpath=/var/spool/lp/receive
PSMServer=myprtsrv
# Strip path if any and take only filename
Filename=`echo $F | sed 's/.*\///'`
# Append filename to output file path
Fileout=$Outpath/${Filename}

rcp $F ${PSMServer}:$Outpath
rtc=$?
if test "$rtc" != 0
then
echo "Cannot move $F to $Fileout"
echo "Cannot move $F to $Fileout" 1>&2
exit $rtc
fi
# -d -n -p -o
remsh $PSMServer lp -d$P -n$C -p3 -onb $Fileout 1>&2
rtc=$?
if test "$rtc" != 0
then
echo "petroprt returned error code $rtc"
echo "petroprt returned error code $rtc" 1>&2
exit $rtc
fi
rm -f $4
#
return ${rtc}
Status=$?
if test "$Status" != 0
then
echo "Cannot print $F to $P"
echo "Cannot print $F to $P" 1>&2
exit $Status
fi
exit
}
#################################################
# printftp
#################################################
function printftp
{
Outpath=/var/spool/lp/receive/printftp
PSMServer=myprtsrv
# Strip path if any and take only filename
Filename=`echo $F | sed 's/.*\///'`
# Append filename to output file path
Fileout=$Outpath/${Filename}
rcp $F ${PSMServer}:$Outpath
rtc=$?
if test "$rtc" != 0
then
echo "Cannot move $F to $Fileout"
echo "Cannot move $F to $Fileout" 2>&1
exit $rtc
fi
# ftp the file
remsh $PSMServer /usr/local/lp/printftp.ftp $Fileout 2>&1 /dev/null
rtc=$?
if test "$rtc" != 0
then
echo "printftp.ftp returned error code $rtc"
echo "printftp.ftp returned error code $rtc" 2>&1
exit $rtc
fi
exit
}

#################################################
# chprt
#################################################
function chprt
{
Outpath=/usr/sap/xfer/chprt
PSMServer=ipr
# Strip path if any and take only filename
Filename=`echo $F | sed 's/.*\///'`
# Append filename to output file path
Fileout=$Outpath/${Filename}
rcp $F ${PSMServer}:$Outpath
rtc=$?
if test "$rtc" != 0
then
echo "Cannot move $F to $Fileout"
echo "Cannot move $F to $Fileout" 2>&1
exit $rtc
fi
exit
}
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: multiple printers configuration

Here they are as a text attachment - formats nicer...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.