- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- consolidating printer queue definitions from multi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 03:04 AM
09-21-2005 03:04 AM
I need to consolidate several dbms systems on HP-UX PA-Risc to a single HP-UX Itanium.
Moving the printer queue definitions is one aspect of the migration.
I used a script I found posted by Geoff Wild in this fora a while ago :
============================
/usr/sam/lbin/lpmgr -S -v -xsavedir=/var/sam/lp/
cp -r -p /var/sam/lp/lp.new/* /var/sam/lp/
tar cvf /tmp/lp.tar /var/sam/lp/
ftp /tmp/lp.tar to remote server
Untar it, then:
lpshut
/usr/sam/lbin/lpmgr -R -xsavedir=/var/sam/lp/
lpsched -v
=================================
It worked well, for the first system. I could see all printer definitions on the new machine correctly.
However, I tried out the same procedure for the 2nd system. As a result the first set of definitions were overwritten.
Then I tried to merge /lp/ subdirectories, created on the 3 systems with "lpmgr -S -v -x savedir=/var/sam/lp/ ", but also this resulted in only 1 subset on the new system.
Any idea's ?
Something with the timestamp ?
I have not done such work before, so this is new to me.
Thanks in advance for your help.
Franky
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 04:02 AM
09-21-2005 04:02 AM
SolutionI don't think this is possible - with SAM - consolidate queues from multiple servers...
I think you will be faced with the dubious task of adding them manualy....
That said, you should be able to script that - and add them all at once...
I did something simliar moving from multiple AIX servers to a single HP-UX one:
#!/bin/sh
# script to add-delete queues
# Geoff Wild
#
if [ $# -lt 1 -o ( $# -gt 1 -a $# -lt 4 ) ]
then
echo "Usage:"
echo "queue-admin "command""
echo "Example:"
echo "queue-admin addqueue"
echo "queue-admin removequeue"
exit 1
fi
if [ $1 = "addqueue" ] ; then
exec 0
do
p=`echo ${line}|awk '{print $1}'`
echo "adding queue " ${p}
# 9998 is net_genericprinter Modelscript
$1 -i 9998 -h ${p}.yourdomain.com -q ${p}
done
else
lpshut
exec 0
do
p=`echo ${line}|awk '{print $1}'`
echo "removing queue " ${p}
lpadmin -x${p}
done
lpsched
fi
You need to create a file called printer.name.list.out (you can do that on all servers, then concatenate the file on the single server).
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2005 03:27 AM
09-22-2005 03:27 AM
Re: consolidating printer queue definitions from multiple hosts
Thanks for the input.
I created a file containing all the names of the printers from 3 different hosts :
printername1
printername2
.. etc ..
I ran the "queue-admin addqueue" script.
For every printer I get the following error :
adding queue printername1
./queue-admin[20]: addqueue: not found
Line 20 is :
$1 -i 9998 -h ${p}.bekaertcorp.local -q ${p}
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2005 03:53 AM
09-22-2005 03:53 AM
Re: consolidating printer queue definitions from multiple hosts
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2005 03:56 AM
09-22-2005 03:56 AM
Re: consolidating printer queue definitions from multiple hosts
http://www.hp.com/go/hppi_sw
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2005 09:19 PM
09-22-2005 09:19 PM
Re: consolidating printer queue definitions from multiple hosts
I installed the HP JetDirect PrintInstaller which was missing. Thanks for the tip.
Then I ran the script.
For every printer it showed these errors :
adding queue printername1
printername1.mydomain.com: Unknown printer
Error sending SNMP request.
I do see all printers in SAM.
Can you tell me what the errors are about ?
Is the setup finished ?
Regards,
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 02:01 AM
09-23-2005 02:01 AM
Re: consolidating printer queue definitions from multiple hosts
is it in DNS? and I'm assuming you changed mydomain.com to your real domain?
The printer will be added - but you have to make sure it is in DNS.
No need to rerun the script - just update your DNS.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 02:21 AM
09-23-2005 02:21 AM
Re: consolidating printer queue definitions from multiple hosts
In real, I use the real printer names ..
Further,
printername1.yourdomain.com is not in DNS,
but printername1 can be resolved, as also printername1.olddomain.com can be resolved.
I know I used yourdomain.com in the script.
yourdomain.com is the domain for the host.
With the hppi tool, I tested a printer and the printer was recognized as an HP printer and the server was allowed to address it.
Can I conclude that this finishes the setup steps ?
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 02:39 AM
09-23-2005 02:39 AM
Re: consolidating printer queue definitions from multiple hosts
That said, you may have to delete all the queues and readd them - without using the fully qualified domain name...that is you said printername1 can be resolved but printername1.yourdomain.com can't...is that because the printers are in /etc/hosts?
If so, you have 2 choices - modify /etc/hosts to include the domain name or redo the queues without the domain name...
Here's a script I wrote to check printer status:
#!/bin/sh
#
# check printer status
# Geoff Wild
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "lpst \"printer\""
echo "Example:"
echo "lpst W052"
exit 1
fi
echo " "
/usr/sbin/ping $1 -n 2
echo " "
lpstat -p$1 -v$1
echo " "
echo "Output Requests"
echo "-----------------------------------------------------------"
lpstat -o$1
echo " "
lpstat -r
echo " "
So, try it like:
lpst printername1
And one more command I use - /opt/hpnpl/bin/hpnpadmin
Great for getting details on the printer...
Example:
# hpnpadmin -i W052
Printer Description:
--------------------
MFG :Hewlett-Packard;
CMD :PJL,MLC,PCL,POSTSCRIPT,PCLXL,PJL;
MDL :HP LaserJet 4100 Series ;
CLS :PRINTER;
DES :Hewlett-Packard LaserJet 4100 Series;
Printer ID : 271
And with -v
hpnpadmin -v printername
will give you a bunch of info...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 03:10 AM
09-23-2005 03:10 AM
Re: consolidating printer queue definitions from multiple hosts
The printernames are not present in the /etc/hosts file.
So, I guess that's ok then.
In attachment I added the output of your printer check statements.
All look fine.
Many thanks for your sharings in this helpfull thread.
I'm sure others will benefit from it too.
Regards,
Franky