Operating System - HP-UX
1827807 Members
2746 Online
109969 Solutions
New Discussion

Re: lp command does print on the printer

 
Deepu Chakravarty
Regular Advisor

lp command does print on the printer

I have defined a printer which is attached with a dlink print server. I am able to ping or telnet the ip where the print server is attached. When I give command like 'lp -d ', lpstat -u shows the request no. But no output is coming on to the printer. For example,
70_3-1762 root priority 0 Nov 19 15:48 on 70_3
test.sql 274 bytes

Here 70_3 is the printer name and this is enabled too. So this request remains as it is on the queue.

Pls advise how to overcome the problem.
Thanks..
--Deepu.
13 REPLIES 13
G. Vrijhoeven
Honored Contributor

Re: lp command does print on the printer

Hi,

Does it accept jobs?
man accept

Gideon
Deepu Chakravarty
Regular Advisor

Re: lp command does print on the printer

Hi,
Yes it is accepting jobs. Like following:
# accept 70_3
accept: destination "70_3" was already accepting requests
#

--Deepu.
G. Vrijhoeven
Honored Contributor

Re: lp command does print on the printer

Hi,

Are you sure the printer is online? Is the schedular running (# lpsched)?

Gideon
Deepu Chakravarty
Regular Advisor

Re: lp command does print on the printer

Hi,

Sorry.

My subject was wrong. It should be read 'lp command does not print on the printer'.

Deepu Chakravarty
Regular Advisor

Re: lp command does print on the printer

Yes, schedular is running. Other printers on the schedular are running perfectly. This printer is also showing enabled and accepting requests. It is accepting requests but no output is generating on the printer. 'lpstat -u' shows the job.

--Deepu.
Bill Hassell
Honored Contributor

Re: lp command does print on the printer

When you used SAM to add the printer to your local system, there was a request to provide the name of the printer within the print server. That name is defined by the Dlink server and must be correct. If you don't know the name, you'll have to contact Dlink for the printer's internal name. With the wrong name, the Dlink box just ignores the requests. You'll likely need some method to look at the Dlink status and logs too.


Bill Hassell, sysadmin
Pippo_9
Frequent Advisor

Re: lp command does print on the printer

Hi Deepu,

you could try the following actions:

# lp -d
# lpstat -t

You shouldn't stop 'lpstat -t', even if it hangs; you should wait a few seconds or minutes in order to see what messages appear and if prompt returns.
If you get messages or errors, you would know why prints don't work.

I hope this helps you.

Bets regards,
Ettore
Geoff Wild
Honored Contributor

Re: lp command does print on the printer

Do you have hpnpadmin installed?

/opt/hpnpl/bin/hpnpadmin

hpnpadmin -v 70_3

Will give you the printer status - if it is Online, etc...

Oh - it might not work with dlink...


I also use a script I wrote called 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 " "


Another thing to try - re-create the printer:



lpadmin -x70_3

addqueue -i 9998 -q 70_3 -h 70_3.yourdoamin.com


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.
Sanjay_6
Honored Contributor

Re: lp command does print on the printer

Hi,

How is the printer configured. Is is configured through Jetadmin or is it configured as a remote printer.

Hope this helps.

Regds
PVR
Valued Contributor

Re: lp command does print on the printer

pl give the output of lpstat -t.

Is it accepting requests??

Is the printer is enabled.

U can try # lpshut #lpsched(that is restarting the scheduler). But in this case current printing job will reprint.
Don't give up. Try till success...
Deepu Chakravarty
Regular Advisor

Re: lp command does print on the printer

Hi Geoff,
I am trying your script 'lpst'. Following is the output of your script.

$ sh lpst.sh 70_3

/usr/sbin/ping: unknown host 70_3

printer 70_3 is idle. enabled since Nov 19 15:46
fence priority : 0
device for 70_3: /dev/null

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

scheduler is running

Pls advice.

--Deepu.
Suresh Patoria
Super Advisor

Re: lp command does print on the printer

Hi,

Reset ur printer and also hub or switch where the printer is conneted

Then i think it will work fine

Thanx
V. Nyga
Honored Contributor

Re: lp command does print on the printer

Hi Deepu,

you also can try 'hpnpf'. See man hpnpf.
I've used options -R -x (ip or printer-name)and -l (for log-file).
Try it with a working printer and with the other one.

And of course you have to verify that ping 70_3 is working from the print server.

Good luck
Volkmar
*** Say 'Thanks' with Kudos ***