Operating System - HP-UX
1748131 Members
3487 Online
108758 Solutions
New Discussion юеВ

Re: adding printer, print and check

 
terrytapp
Advisor

adding printer, print and check

I have added a remote printer. what would be the best way to confirm via commands (not physically) that the printer printed fine. Please advise.

Thanks

Terry
6 REPLIES 6
Rita C Workman
Honored Contributor

Re: adding printer, print and check

You want to confirm that the printer is printing right, but you don't want to physically print on it.

Sorry, the best to confirm something is working is to do the test.

If a mechanic says they fixed your car, but doesn't want to turn on the engine and do a test drive - would you trust that all is good? Don't think so!

Rgrds,
Rita
terrytapp
Advisor

Re: adding printer, print and check

No that is not what i want..i can print and need to confirm via command line.

Thanks

Terry
OldSchool
Honored Contributor

Re: adding printer, print and check

"lp -d" to print something

"lpstat" to confirm that it processes thru the queue.

and then somebody is going to *have* to look at the printer to see if anything came out, and if so are the results as expected.

"No that is not what i want..i can print and need to confirm via command line."

Makes no sense -- what can you confirm about output of printer *without* somebody looking at it.

"man lp" "man lpstat" if you need further info
skt_skt
Honored Contributor

Re: adding printer, print and check

remote queues act as a bridge to pass the print job from UNIX to the the printer which is hosted on a remote host(like windows OS).

Ideal way is do a "lp -dqname filename" and check wath through lpstat as well as /var/adm/lp/log .

But as pointed out you can only 100% sure when you physically look at. Since there are chnaces when everything looks good from UNIX side and still it wont print.
Sandeep_Chaudhary
Trusted Contributor

Re: adding printer, print and check

lp -dqueuename filename

to check status of printer "lpstat -t"
Gokul Chandola
Trusted Contributor

Re: adding printer, print and check

Hi,
The **lp** command queues files for printing. The lpalt command changes
information in a queued request. The cancel command deletes a queued
request.

The lp command arranges for the named files, file ..., and associated
information (collectively called a request) to be queued for output to
a destination in the LP (line printer) subsystem.

lpstat - report status information of the LP subsystem

**lpstat** [-drst] [-a[list]] [-c[list]] [-o[list]] [-p[list]] [-u[list]]
[-v[list]] [ID...]

Regards,
Gokul Chandola
There is always some scope for improvment.