Polling changes - adhoc alternative

angelb angelb at bugarin.us
Thu Jan 25 13:20:08 PST 2007


> angelb wrote:
> > ...
> > Now, on step b. above, after the client received all of the printers
> > from the server, where does the rest of the printers(description,
> > etc) are kept? Are they still in memory and dumped in cache only when
> > cupsd is stopped? Does that also apply to changes polled?
>
> Everything is in memory, cached by the local instance of cupsd.  We
> only write remote.cache when stopping or restarting.
>
> > What I'm getting at is to find a way to manipulate a client config
> > file so that when a server has new change, be it new IP address or
> > new printer queue, instead of waiting for 1hour(poll interval) and
> > then another 20minutes(that's how long our wait time for all
> > printers), if I can mod a file to manually make the change, that
> > would be ideal!
>
> Technically you could:
>
>      a. Stop cupsd
>      b. Poll the server and create a new remote.cache file from the
>         information (and/or get/push a remote.cache file created
>         specially for clients...)
>      c. Start cupsd
>
> I'm not sure this would be much faster than waiting, as you'll need
> to do this on every client, but perhaps you have a way to automate
> this?

The 20-minutes of polling time(which will increase as number of
printers grow) is a given and there's no way to reduce it(I could
delete all queues) but not a reasonable solution at the moment. When
polling is in progress, the printcap is constantly updated and
remote.cache is updated only at stop/start. And the latest printer
information is kept only in cache(not easily modified if at all possible).

Here's where I'm confused: Assume remote.cache, printcap, and
printer queue, zzzque, already exist; if I've just restarted
cupsd and did an 'lpstat -pzzzque', a printer at the end of the list,
and polling hasn't got to it yet, how does the scheduler know the
printer is available for use? Does it check cache first if it's
already there and if not remote.cache?

# No need to answer the following questions if remote.cache is not
# an answer to the question above.
#
Okay, if it's in remote.cache(list of previous printers list), why is
it that if I manually entered, say a new printer queue in remote.cache,
that the server already have, why is that "lpstat -pnewque" comes back
with "Unknown destination"? It seems to me it goes back to check cache
and if newque does not exist in it, it errors; but shouldn't check
remote.queue like how it would with an existing one if not in cache?


Thanks,
Angel




More information about the cups mailing list