Operating System - HP-UX
1827305 Members
3095 Online
109961 Solutions
New Discussion

Re: PostScript printer questions

 
SOLVED
Go to solution
dictum9
Super Advisor

PostScript printer questions


I have a PostScript HP printer which is connected to 2 systems. It works on one (hpux 11.0) but not on the 2nd, (11.23) the jobs just hang in the queue.

Any idea how to troubleshoot this? Can I remove this printer and then re-add it? Where in the filesystem are the config files so I can compare them?

13 REPLIES 13
Bill Hassell
Honored Contributor
Solution

Re: PostScript printer questions

Well, HP has hundreds of models of printers and there are several different ways to connect them. So you'll need to provide a bit more information. What is the printer model? Is the printer connected using some Windows server or does stand alone on the network? Was the printer added as a remote printer or a network printer (assuming SAM was used)?


Bill Hassell, sysadmin
A. Clay Stephenson
Acclaimed Contributor

Re: PostScript printer questions

It matters a great deal whether these were configured as "Network" (using JetDirect port 9100 protocol) or "Remote" (using LPR/LPD protocol) printers. Whenever possible configure them as "Network" printers. The interface files are stored in /var/spool/lp/interface. There will be a script "yourprinter" in this directory and if this is a network drinter then there will be a secondary script of the same namein the model.orig directory just below.

I suspect that you chose completely different model scripts (which become the interface files) for these print queues.
If it ain't broke, I can fix that.
dictum9
Super Advisor

Re: PostScript printer questions

It is: HP LaserJet 4350

How do I delete this printer and correctly add it?

It's connected to another machine and works just fine on that other server. It doesn't work when accessed from the first machine. I compared the configuration files on both servers (like /var/spool/lp/interface/ and cannot see any differences.
Pete Randall
Outstanding Contributor

Re: PostScript printer questions

Once again, it depends on how they were added, network or remote.

For a remote printer, you would use lpadmin:
lpadmin -x$PRNTR # to delete
lpadmin -p$PRNTR -orm$LOC.holstein.com -orp$OPRNTR -mrmodel -v/dev/n
ull -ob3 -ocmrcmodel -osmrsmodel # to add

For a network printer you would use the hppi commands removequeue and addqueue:
removequeue -f -q $PRNTR
addqueue -h $IP -q $PRNTR -b off


Pete

Pete
dictum9
Super Advisor

Re: PostScript printer questions

I think this is a network printer, because I can go to http://

Pete Randall
Outstanding Contributor

Re: PostScript printer questions

Then try "removequeue -f -qprinter_name". If that works, try the addqueue with the printer_name and its IP address.


Pete

Pete
dictum9
Super Advisor

Re: PostScript printer questions

Also, I have this version of JetDirect installed:

J4189-11001C E.10.34 Hewlett-Packard JetDirect Printer Installer for Unix
A. Clay Stephenson
Acclaimed Contributor

Re: PostScript printer questions

Being able to accees a printer by http or the fact that you have JetDirect software installed on your host computer tells you absolutely nothing as to whether the printer was added a Network or Remote printer. In fact, the same physical printer could be added as two logical print queues, one Network and the other Remote.

The way to tell is:
lpstat -v

For Network printers, you will see:
device for myprinter1: /dev/null

For Remote printers, you will see an additional line:
device for myprinter2: /dev/null
remote to: mickey on disney.com
If it ain't broke, I can fix that.
dictum9
Super Advisor

Re: PostScript printer questions

I only see

device for myprinter1: /dev/null


I used hpnpadmin to add this printer, since addqueue wasn't what I needed (it only ads a queue once the printer has already been created)
Bill Hassell
Honored Contributor

Re: PostScript printer questions

The addqueue command does not need anything setup except that the printer is online and has the network stuff setup (IP address, etc). What error did you get when you ran addqueue?

T|Just to verify that the printer is working OK, run the commaqnd hpnpadmin -v 12.34.56.78 where 12.34.56.78 is the printer's IP address. If that reports back a lot of stats, then all is well. Test that the printer can print a simple file:

hpnpf -x 12.34.56.78 -N /etc/profile

If that works OK, just use addqueue:

addquue -h 12.34.56.78 -q new_printer_name

That will create the new-printer_name and you can now use lp to print to it:

lp -dnew_printer_name /etc/profile

Note that all of the commands (except lp) are in the /opt/hpnpl/bin directory. Note also that hppi performs the same tasks as hpnpadmin and addqueue -- Unix admins prefer command line choices. Be sure to post any error messages that you get.


Bill Hassell, sysadmin
dictum9
Super Advisor

Re: PostScript printer questions

Bill H

> What error did you get when you ran addqueue?

I meant to save it, but lost it. It was a simple one liner, something to the effect that it wasn't available, or found.

Anyway, it has been reported to me that all works now... so I didn't run these diagnostic commands, but will keep them in mind for future reference.

Is there a web site that explains all this hpnp stuff?


A. Clay Stephenson
Acclaimed Contributor

Re: PostScript printer questions

We don't need no stinkin' website. You have everything you need. Simply cd to /opt/hpnpl/man and then do an "ls *"; you will see all the available man pages.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: PostScript printer questions

Well, the lp spooler is the standard SysV implementation but the HP docs are badly split -- direct-connect and remote printers are described in the sysadmin docs but don't talk about printer scripts in detail. The JetDirect (hppi) software was written by the printer division and was never integrated into HP-UX docs. That's why I will be giving a paper on this topic at the HP Tech Forum in Houston next month. I'll also have a tutorial on script writing and an all day seminar on sysadmin toipics.


Bill Hassell, sysadmin