Re: Solaris 2.6 "lpstat -p" timeout issue
From: Greg Andrews (gerg_at_panix.com)
Date: 03/18/04
- Next message: Harry: "Re: Problem during install solaris 10 x86"
- Previous message: Ramon F Herrera: "How to install Solaris 9, then convert to RAID 10 with Volume Manager"
- In reply to: Michael St. Laurent: "Solaris 2.6 "lpstat -p" timeout issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 18 Mar 2004 21:37:29 +0000 (UTC)
mikes@hartwellcorp.com (Michael St. Laurent) writes:
>
>Is there an alternate to using the "lpstat -p" command? I need to
>list each printer and determine whether or not it is currently
>printing something.
>
"lpstat -p" works well for local and network printer queues.
It does not work well for remote printer queues, particularly
when the print server does not respond quickly.
I believe the delays you're experiencing are due to the latter
problem. You have printers defined as remote printers on this
Solaris computer, and when lpstat tries to contact the print
server through the network to learn the queue status, the print
server responds slowly (or the DNS lookups to find the print
server's IP address are slow).
If this Solaris machine delivers the print jobs directly to the
printers (not by giving the jobs to another computer), then you
are probably using the wrong configuration. Use the network
printer configuration for printers attached to the network, and
the local printer configuration for printers attached to the
serial or parallel port of this Solaris machine. Then lpstat -p
asks the local lpsched daemon for the queue info and receives the
answer quickly.
The other potential problem is the thing I hinted at above: DNS.
Are DNS lookups slow for some of the print servers some of the
time? This can be true for print servers at sites different
from your own. Your DNS servers try to find the DNS servers for
the other site, but don't get a fast response.
Another question is: Why does your program care how many jobs
are printing on the printer? Shouldn't managing printer queues
be performed by the print server software rather than your
application? Solaris has printer classes specifically designed
to send print jobs to idle printers when others are busy (and
the idle printers are equally capable of printing the job as the
busy ones). Perhaps you can avoid the whole problem by re-thinking
the need to know how many jobs are printing in each queue.
-Greg
-- Do NOT reply via e-mail. Reply in the newsgroup.
- Next message: Harry: "Re: Problem during install solaris 10 x86"
- Previous message: Ramon F Herrera: "How to install Solaris 9, then convert to RAID 10 with Volume Manager"
- In reply to: Michael St. Laurent: "Solaris 2.6 "lpstat -p" timeout issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|