Hmmm... Did a test on my RedHat 7.2 release here,  and the status
came back 'real fast', 

[papowell@h112 papowell]$ time lpq
Printer: lp2@h112
 Queue: no printable jobs in queue
 Server: no server active
 Status: job 'root@h112+0' removed at 15:23:27.804
 Rank   Owner/ID                  Class Job Files                 Size Time
done   root@h112+6                  A     6 (STDIN)                  4 15:23:15
 
real    0m0.008s
user    0m0.010s
sys     0m0.000s
[papowell@h112 papowell]$

> From [EMAIL PROTECTED] Wed Mar 13 08:14:58 2002
> From: "Floyd Shackelford" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: LPRng: slow response on remote query
> Date: Wed, 13 Mar 2002 09:24:52 -0600
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0018_01C1CA70.EE376440
> Content-Type: text/plain;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
>
> i am writing a java printer control program to remotely control print jobs
> on a linux (readhat v7.0) print server running lprng (v3.8.3).
>
> here's my code snippet:
>
> protected static final byte     QUEUE_STATUS_VERBOSE = (byte) 0x09;
> protected static final byte     LF = (byte) '\n';
> protected static final String   PRINT_QUEUE_ALL = "all";
> ...
> Connect();
>
> // send a status request command
> OutputStream outputStream = _socket.getOutputStream();
>
> Write(outputStream,QUEUE_STATUS_VERBOSE );
> Write(outputStream,PRINT_QUEUE_ALL);
> Write(outputStream,LF);
>
> // read the result
> InputStream inputStream = _socket.getInputStream();
> String inputLine = Read(inputStream);
>
> _socket.close();
>
>
> The Connect() and Write()'s run very quickly. However, when it gets to the
> Read(), it takes about 3-5 seconds to get the response back from lprng. the
> two computers are connected to the same network switch - so it's not network
> latency.
>
> i really need almost instantaneous response. how do i get lprng to respond
> quickly (say within 1 second or less) to this request?
>
> here's my printcap file.
>
>
> # this is the queue that sends the job to the printer.
> # do not print to this queue. print to lpgk instead.
>
> lpgkq:client
>   :force_localhost=0
>
> lpgkq:server
>   :sd=/var/spool/lpd/%P
>   :done_jobs=0
>   :mx=0
>   :mc=0
>   :sh
>   :lp=192.168.1.250%9100
>   :filter=/usr/local/libexec/filters/ifhp
>   :ifhp=model=hp2100
>   :lpd_port=515
>   :reuse_addr=1
>   :retry_econnrefused=1
>   :retry_nolink=1
>   :socket_linger=0
>   :originate_port=512 1023
>
>
> # this is the queue that checks the job to make sure it can
> # be printed, then it forwards it on to the printer queue
>
> lpgk:
>   :client
>   :force_localhost=1
>
> lpgk:
>   :server
>   :lpd_bounce=1
>   :as=|/usr/local/LinuxGateKeeper/LinuxGateKeeperPrintJobFilter.sh
>   :sd=/var/spool/lpd/%P
>   :done_jobs=5
>   :done_jobs_max_age=3600
>   :mx=0
>   :mc=0
>   :sh
>   :lp=lpgkq@localhost
>
>
> Regards,
>
> Floyd Shackelford
> 4 Peaks Technology Group, Inc.
> VOICE: 334.735.9428
> FAX:   916.404.7125
> EMAIL: [EMAIL PROTECTED]

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to