1833198 Members
2864 Online
110051 Solutions
New Discussion

Creating queues

 
SOLVED
Go to solution
Manuales
Super Advisor

Creating queues

Hi, could you please let me know how i can create queues in unix, i mean, for adding a new printer with a new ip address

thanks.
9 REPLIES 9
Geoff Wild
Honored Contributor
Solution

Re: Creating queues

with hppi installed:

addqueue -i 9998 -q QUEUENAME -h printer.yourdomain.com

9998 comes from /opt/hpnpl/admin/PrinterList

Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: Creating queues

If this is a Network printer (meaning it uses the HP JetDirect port 9100 protocol) then use the "hppi" command interactively or the addqueue command from the shell. Man addqueue for details.

If this is a hard-wired or Remote printer (meaning it uses the LPR/LPD protocol) then you use SAM or lpadmin from the shell.

Since you are having to ask this, I would use either hppi or SAM to begin with but it is always good to know the commands that underlie the user interfaces. You must have the Jetdirect software installed on your box to install Network printers.
If it ain't broke, I can fix that.
Manuales
Super Advisor

Re: Creating queues

how can i see when a queue has been created?
A. Clay Stephenson
Acclaimed Contributor

Re: Creating queues

lpstat -t
If it ain't broke, I can fix that.
Manuales
Super Advisor

Re: Creating queues

I mean, when you run:
addqueue -i 9998 -q QUEUENAME -h printer.yourdomain.com

how can you see that it has been created?
A. Clay Stephenson
Acclaimed Contributor

Re: Creating queues

Same answer, lpstat -t should list your queue. You can also use lpstat -p. Man lpstat.
If it ain't broke, I can fix that.
Manuales
Super Advisor

Re: Creating queues

OK OK ...
and how can i know that that printer is linked to some ip address??
A. Clay Stephenson
Acclaimed Contributor

Re: Creating queues

cd to /var/spool/lp/interface
vi YourNewQueueName
and there should be a line
PERIPH=Printer_Hostname or Printer_IP_Address
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: Creating queues

Here's a script I use to check a printer:

# cat /opt/hpnpl/bin/lpst
#!/bin/sh
#
# check printer status
# Geoff Wild

if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "lpst \"printer\""
echo "Example:"
echo "lpst W052"
exit 1
fi
echo " "
/usr/sbin/ping $1 -n 2
echo " "
lpstat -p$1 -v$1
echo " "
echo "Output Requests"
echo "-----------------------------------------------------------"
lpstat -o$1
echo " "
lpstat -r
echo " "


Output like:

# lpst W052

PING pcr12169.mydomain.net: 64 byte packets
64 bytes from 192.168.163.184: icmp_seq=0. time=2. ms
64 bytes from 192.168.163.184: icmp_seq=1. time=0. ms

----pcr12169.mydomain.net PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/1/2

printer W052 is idle. enabled since Feb 7 10:51
fence priority : 0
device for W052: /dev/null

Output Requests
-----------------------------------------------------------
no entries

scheduler is running



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.