1836372 Members
2203 Online
110100 Solutions
New Discussion

printer - list

 
SOLVED
Go to solution
brian_31
Super Advisor

printer - list

On a given box what would be the best way to provide a list of all printers and also list their names,ipaddress and other info.

THanks

brian
2 REPLIES 2
Yang Qin_1
Honored Contributor

Re: printer - list

Try
lpstat -t

Yang
Bill Hassell
Honored Contributor
Solution

Re: printer - list

This is a complicated question. While lpstat -t provides the most information, it will hang forever when a printer or server is powered off or not responding. A quick list (non-blocking) is lpstat -v. However, there are several types of printer connections possible:

The first is direct connect using serial or parallel cables. lpstat -v will report the device file for these connections.

The second is a remote print server such as Linux or Windows or non-HP LAN-to-printer adapter. These printers may have been added with an IP address or a hostname so you would need to use SAM to find the network address.

The third is for HP JetDirect LAN cards and LAN-to-printer boxes. These printers will have their IP (or hostname) stored in /etc/lp/interface files. To locate these addresses, use this:

grep ^PERIPH= /etc/lp/interface/*


Bill Hassell, sysadmin