Operating System - HP-UX
1824169 Members
3250 Online
109669 Solutions
New Discussion юеВ

How to determine which IP printer a queue prints to

 
SOLVED
Go to solution
Mel Burslan
Honored Contributor

How to determine which IP printer a queue prints to

I have two question about print scheduler

Question-1:

I am sure this is very simple to answer but I am stumped. I have some print queues that precedes my tenure in this position. I do not know if they were created pointing to a name or an IP address. Now I have a small scale project of going through each queue and determining the device it is supposed to print to, and weed out queues belonging to old and discarded printers.

Is there a command that gives me the IP address or the dns name of a printer, when given the printer queue name ? Or is this relation of queue name to IP address, recorded in a human readable file anywhere on the system.

Question-2:
Is there any way to tell the print queue to use paper from tray3 using -otray3 command line switch, regardless if there was a tray specified on the command line or not, i.e. making the tray 3 the default tray for hpux printing ? Unfortunately printer is being used by windows print servers and changing default paper source is not an option.

Thanks in advance.
________________________________
UNIX because I majored in cryptology...
3 REPLIES 3
Tim Nelson
Honored Contributor

Re: How to determine which IP printer a queue prints to

Question1: depends on the type of queue. If network-based ( not remote ) then grep PERIPH= /etc/lp/interface/*

This will give you the IP/HOSTNAME used to configure the printer. Then use that entry to ping the printer, if no response then remove the queue.

Question2: all printer capabilities are listed in the interface file /etc/lp/interface/model.orig/ (if network-based)

TTr
Honored Contributor
Solution

Re: How to determine which IP printer a queue prints to

1. Don't count on DNS resolving queuenames.
Run "lpstat -v", those that return only one line with "/dev/null" as the device are jetdirect queues (direct port printing), those that have a second line "remote to..." are remote queues printing to either another UNIX server or still a jetadmin printserver in remote spooler mode.
For the remote spoolers on UNIX servers, you need to repeat the test.
For the remote queues on printserver, you have found the prinserver device
For the jetdirect queues look in the /etc/lp/interface/ and grep for "PERIPH" in the begining of the line. The will give you the name or IP of the printserver that is used with this particular que. If it is a name, it gets resolved by the server's default resolver intoan IP. In practice it is the same as the quename and the queuename is put in the resolver.
2. This is only valid for jetadmin spoolers. You have to look in the /etc/lp/interface/model.orig/ and edit the file and change the all the tray options inside the long case statement to always use the same tray regardles what the option is. Try this and also check the "MODEL" variable, not sure if it is also used and needs to be changed as well.
Mel Burslan
Honored Contributor

Re: How to determine which IP printer a queue prints to

Thread closed
________________________________
UNIX because I majored in cryptology...