- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to Move Print Jobs from One Printer to Another...
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
Forums
Discussions
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
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
03-02-2006 01:56 AM
03-02-2006 01:56 AM
Our current workaround is this:
reject srcprntr
disable srcprntr
cd /var/spool/lp/request/srcprntr
for file in d*;do
lp -ddstprntr $file
done
cancel -e srcprntr
enable srcprintr
accpt srcprntr
Any other tip/trick to do this? Does CUPS improve on this SYSV printing weakness?
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 02:03 AM
03-02-2006 02:03 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
As far as "On the destination printer though the printjobs are listed with no indication of what jobs/files they are." - I can't see a way around this - as whenever you issue a lp -d, it will autmatically create a new job name...
That is, say the original job was:
RF22-1129
And you issue a:
cd /var/spool/lp/request/RF22
lp -dW052 dA1129pc0003
It will create a new request id - in my attempt this was:
request id is W052-1452
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 02:08 AM
03-02-2006 02:08 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 03:02 AM
03-02-2006 03:02 AM
Solution#!/bin/sh
# script to move jobs without shutting down the spooler
#
if [ $# -lt 2 -o \( $# -gt 2 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "lpmove.sh \"source queue\" \"destination queue\""
echo "Example:"
echo "lpmove.sh RF22 W052"
exit 1
fi
echo " "
disable $1 -r"moving print jobs to print queue $2"
cd /var/spool/lp/request/$1
for file in d*;do
lp -d$2 $file
done
cancel -e $1
enable $1
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 08:31 AM
03-02-2006 08:31 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
-- Insert script --
#!/usr/bin/ksh
if [ $# -lt 1 ]; then
echo "Usage : $0
echo " Default
exit 1
fi
file_list=$(lpstat $1 | grep $1 | cut -f1 -d\ )
dest=${2:-"konica65"}
for i in $file_list; do
lpalt -d$dest $i
echo "File $i sent to $dest"
done
-- end insert --
The requirement is that you are either the owner of the print jobs or root. This will move every print job on the from_queue to the to_queue.
For a single print job use the lpalt command by itself:
lpalt -dprn2 prn1-1234
Where prn1-1234 is the print job on printer prn1 and prn2 is where you want it to print.
Cheers
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 08:36 AM
03-02-2006 08:36 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
So there is indeed an "lpalt" command that do move print jobs from one queue to another.
Kool...!
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2006 08:48 AM
03-02-2006 08:48 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
I modified Steven's script to us AWK instead:
#!/bin/sh
# script to move jobs without shutting down the spooler
if [ $# -lt 2 -o \( $# -gt 2 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "lpmove.sh \"source queue\" \"destination queue\""
echo "Example:"
echo "lpmove.sh RF22 W052"
exit 1
fi
echo " "
src=$1
DEST=$2
for JOB in `lpstat $SRC | grep $SRC | awk '{print $1}'`
do
lpalt -d$DEST $JOB
echo "File $JOB sent to $DEST"
done
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2006 12:33 AM
03-03-2006 12:33 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
I don't know if you're still interested; we add the following script to root's crontab:
for i in `lpstat -o |grep #1printername-|awk '{print $1}'`
do
if [ ${i} = "" ]
then
exit
else
lpalt $i -d#2printername
fi
done
We disable #1printername and then set this script with all *'s in the time parameters. So everyminute the jobs on #1printername are redirected to #2printername. We have found it to be an easy band-aid for when a printer is down for maintenance.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2006 01:11 AM
03-03-2006 01:11 AM
Re: How to Move Print Jobs from One Printer to Another w/o Stopiing the Spooler?
Our enterprise is quite heavy on UNIX printing. Before we use to print through Windows but that has been problem plagued. We often lose connectivity and printers need to be redefined or re-established.
We are developing procedures and roles and movement of print jobs from one printer to was always done via lpmove or the workaround we developed... NOw that there indeed is "lpalt" .. we'll certainly use this..
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler