UnixPedia : HPUX / LINUX / SOLARIS: Adding a Network Printer

Saturday, January 19, 2013

Adding a Network Printer



Some systems are connected with lots of printers. To collect the status of a printer use the next command:

# lpstat -t
# lpstat -t | grep printer

After the listing of printers and status ‘lpstat’ also generates an overview of details per printer. This takes a wile. When necessary, you can stop the output with CTRL-C.

To add a new printer use the next command:

# addqueue -qA029 -h<IP of the printer> -i 9998 -b off
 
·       Printer is the local printer name


For example:
 
161.89.57.148           A029   # printer A029 

# lpshut
# addqueue -qA029 -h<IP of the printer> -i 9998 -b off

# accept A029 
# lpsched
# lpstat -t|awk '/A029/'
# enable A029 
# lpstat -t|awk '/A029/'
note: the reverse command of accept is reject

Status check of printer :
lpstat -o<Qname>
lpstat -p<Qname>
lpstat -a<Qname>
lpstat -r <lpsched process is running >

Log file for printer :

tail -f /var/adm/lp/log

For Network printer 9100 port should be working for connection :

telnet <printer IP> 9100
<op>

No comments:

Post a Comment