Operating System - HP-UX
1833771 Members
2284 Online
110063 Solutions
New Discussion

HP 11.00: Printer Definitions Printer Configuration

 
SOLVED
Go to solution
LG Porter
Frequent Advisor

HP 11.00: Printer Definitions Printer Configuration

I have several HP servers that have previously defined printers as part of their configuration. I would like to know which configuration file contains the printer definitions, model number or device type?
5 REPLIES 5
Mark Grant
Honored Contributor

Re: HP 11.00: Printer Definitions Printer Configuration

/var/spool/lp/*

For some peculiar reason /etc/lp/* too.
Never preceed any demonstration with anything more predictive than "watch this"
A. Clay Stephenson
Acclaimed Contributor

Re: HP 11.00: Printer Definitions Printer Configuration

Each printer has a file of the same name as the print queue itself in /var/spool/lp/interface. There is often a secondary interface with the same name in the directory /var/spool/lp/model.orig.
If it ain't broke, I can fix that.
eran maor
Honored Contributor
Solution

Re: HP 11.00: Printer Definitions Printer Configuration

Hi

if the mean to move your configuration of the printer from one server to another :

Execute
-> SAM
-> Printers and Plotters
-> Lp Spooler
-> Save/Restore Spooler Configuration

Choose
-> Actions
-> Save Spooler Configuration

This will save all the information necessary to rebuild the spooler into the
directory /var/sam/lp.

Tar this directory (/var/sam/lp) :

# tar cvf /tmp/lp.tar /var/sam/lp

Copy the resulting tar file, lp.tar, onto the target system.

Unpack the lp.tar file on the target system :

# tar xvf lp.tar


Execute
-> SAM
-> Printers and Plotters
-> Lp Spooler
-> Save/Restore Spooler Configuration

Choose
-> Actions
-> Restore Spooler Configuration

This will build the lp spooler configuration on the target system using the
information from the source system, creating a "clone" of the old system.

If any source system print queues are network printers originally configured
using HP JetAdmin or HP JetDirect Printer Installer, then the
following must also be performed.

HP JetDirect Printer Installer must be installed on the destination
system.

Run the following command after restoring the printer/spooler
configuration through SAM:

# /opt/hpnpl/bin/transferqueue local
Enter the queue name or all to modify all the queues : all

NOTE: transferqueue changes several paths in the JetAdmin model scripts in
/etc/lp/interface/ and /etc/lp/interface/model.orig/ to point to the location
of the HP JetDirect Printer Installer product.

An error may occur when restoring the spooler if the root umask is set to
something other than 022. The permission on /var/sam/lp and all file
under it could be changed from their defaults, with the result that SAM cannot
access the files to perform the restore. The permissions on /var/sam/lp should
be 755 or rwxr-xr-x. The error received in SAMlog would be something like:
ERROR A problem occurred doing "lpadmin -ptrec_stor
-i/var/sam/lp/interface/trec_st or -v/dev/null ". Stderr from this command is
"/usr/sbin/lpadmin: can't access file "/var/sam/lp/interface/trec_stor"".
* Failed to restore trec_stor.
love computers
Bruno Ganino
Honored Contributor

Re: HP 11.00: Printer Definitions Printer Configuration

At times there are /usr/spool/lp/model
or /usr/lib/lp/model or
/etc/lp/interface/model.orig
Regards
Bruno
Torino (Turin) +2H
Bill Hassell
Honored Contributor

Re: HP 11.00: Printer Definitions Printer Configuration

To get a quick list, use lpstat -v but as you will see, there isn't much information except the printer's name. Unlike PCs, the original model of the printer is not kept. Instead, when you add the rpinter, you tell the spooler what kind of printer it is by choosing a printer script. The spooler keeps the script name and the path to get to the printer (serial, parallel, SCSI or network) in a binary file called /var/spool/lp/pstatus. Since the printer scripts are just simple ASCII file formatters, several models of printers may use the same script. If the printers use HP's proprietary JetDirect interface card (or external box) then more details can be obtained using hpnpadmin.


Bill Hassell, sysadmin