Operating System - HP-UX
1834038 Members
3044 Online
110063 Solutions
New Discussion

How to make lpmove run automatically?

 
SOLVED
Go to solution
Derek Card
Advisor

How to make lpmove run automatically?

Hello Experts,

We bought 4 new LJ4600dtn color printers last month to alleviate our end of month reporting delays. The application prints everything to the system default printer LJ4600A using lp. I would like to add a cronjob that does an lpstat and if LJ4600A is busy then automatically do an lpmove to 4600B, 4600C, or 4600D. Right now I do this manually but I would like an automatic method.

Does anyone have a similar problem and maybe a script that I can modify?

TIA,
Derek



6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to make lpmove run automatically?

No Derek, I ain't got no script like that and you don't need one nohow. You must have missed the UNIX class where they learn you about printer classes.

You need to rethink your problem and define a printer class, like LJ4600 and make the CLASS the default printer. You then make your 4 printers members of this class and you are done!!!

1) Make a new class
lpadmin -p LJ4600A -c LJ4600
2) add the remaining printers
lpadmin -p LJ4600B -c LJ4600
lpadmin -p LJ4600C -c LJ4600
lpadmin -p LJ4600D -c LJ4600
3) Make the class the system default
lpadmin -dLJ4600

You may need to issue an accept and enable command for the class (I can't remember) but that's the gist of the solution.

Man lpadmin for details.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: How to make lpmove run automatically?

I suppose that I should add that when you print to a class then the first available physical printer is selected. If you were combining fast and slow printers in the same class, you would add the fast printers to the class first so that they are preferentially selected. This doesn't apply to you since tyour printers are identical.

By the way, you can also use lpadmix -x LJ4600 to remove the class just as if it were a printer.

If it ain't broke, I can fix that.
Jairo Campana
Trusted Contributor

Re: How to make lpmove run automatically?

or:
install jetadmin interface download :
http://productfinder.support.hp.com/tps/ProductFinder?h_lang=en&h_tool=software&h_query=jetadmin

Administration menu for jetadmin and printers

# ./jetadmin

*************************************************
* MAIN MENU *
* HP JetAdmin Utility for UNIX (Rev. D.06.21) *
*************************************************

1) Configuration (super-user only):
- configure printer, add printer to spooler

2) Diagnostics:
- diagnose printing problems

3) Administration (super-user only):
- manage HP printer, JetDirect

4) Administration (super-user only):
- manage JetAdmin

5) Printer Status:
- show printer status, location, and contact

?) Help q) Quit

Please enter a selection (q - quit):
legionx
S.K. Chan
Honored Contributor

Re: How to make lpmove run automatically?

An on to Clay's method .. refer to this doc for detail understanding .. especially the "printer class" section. See "Planning A Workgroup" -> "Planning Your Printer Configuration".
http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90742/B2355-90742_top.html&con=/hpux/onlinedocs/B2355-90742/00/00/18-con.html&toc=/hpux/onlinedocs/B2355-90742/00/00/18-toc.html&searchterms=class%7cprinter&queryid=20030627-130002
A. Clay Stephenson
Acclaimed Contributor

Re: How to make lpmove run automatically?

Do not install the JetAdmin software 'D' mentioned. It is obsolete. Install the newer JetDirect 'E' software.

It would appear that you certainly already have the JetDirect (or JetAdmin) software installed since you ARE able to print just not to a class. The class modifications simply require the standard lp commands and are not related to JetDirect (or JetAdmin).


Regards, Clay

If it ain't broke, I can fix that.
Derek Card
Advisor

Re: How to make lpmove run automatically?

Hello Guys,

Thanks very much!!! I am already finished. The "class" was just what I needed!! I was already using the latest jetdirect software because the older software did not list my newer printers.


Thanks again,
Derek