Operating System - HP-UX
1832846 Members
3491 Online
110047 Solutions
New Discussion

Spooler queues monitoring and scheduling

 
SOLVED
Go to solution
Belinda Dermody
Super Advisor

Spooler queues monitoring and scheduling

I have a K200 running 10.20. Question is, is there a unix utility anywhere that monitors spooler queues and will send print jobs from one que if it is busy to another specified printer que.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Spooler queues monitoring and scheduling

Yes there is; it's called lp. Sorry, I couldn't resist. Rather than printing to a specific printer, you set you a class of printers. A user can submit a printjob to a class and the first available member of that class will be used.

Man lp and lpadmin for details.

Regards, Clay
If it ain't broke, I can fix that.
Belinda Dermody
Super Advisor

Re: Spooler queues monitoring and scheduling

Sorry about not being as smart as everyone else and probably deserved that, but if the man pages were more user friendly and more examples of the different options it would help us new guys on the block. It does mention the cancel, but no examples or full explanation of how to use it. I had a feeling, but as it being a production machine I was a little hesitant of changes especially to the financial printers.
A. Clay Stephenson
Acclaimed Contributor

Re: Spooler queues monitoring and scheduling

Hi again James,

Actually learning to read the manuals is part of the fun on Unix. They will make perfect sense in 4 or 5 years. The manuals just haven't been the same since they've added the index.

If you haven't got your class going by now, it's really quite simple. First, add your printers in the usual way. In this example, I'll assume you have 3 printers - printer1,printer2, and printer3 that you wish to add to the class 'myclass'. Again, the 3 printers have already been added to the lp system. This can be done using SAM or jetadmin but the following must be done by root from the shell:

lpshut
lpadmin -pprinter1 -cmyclass (If myclass does not exist, it will be created)
lpadmin -pprinter2 -cmyclass
lpadmin -pprinter3 -cmyclass
lpsched
accept myclass

You should now be ready to print. If your lp -dprinter1, it will send the output only to printer1 BUT if you lp -dmyclass, it will send the output to the first available member of the class 'myclass'.

Regards, Clay


If it ain't broke, I can fix that.
Belinda Dermody
Super Advisor

Re: Spooler queues monitoring and scheduling

Thanks Clay for the followup, once you pointed me in the right direction I got it working. I do not use SAM because it is so slow to come up. I like to do everything from the command line. I like to apologies for my little outburst. I am a self taught administrator who has learned by example only, I have always had difficulty reading and understanding the big picture, I need small articles and start from the small end using examples so I can tear things down.