Re: Store client API

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 26 Apr 2012 22:36:51 -0600

On 04/26/2012 08:21 PM, anita.sivakumar_at_wipro.com wrote:

> I need the data of parent ipcache to be passed on to child. There
> will be an application that will be spawning on the child process
> which will pick this data (we need it for some other purpose).

It sounds like that application should make an HTTP request to the
parent cache using the same Cache Manager interface that squidclient is
using. You can see what "squidclient mgr:ipcache" is sending using
wireshark or a similar tool and reproduce the same kind of request in
the application.

If you are sure that Squid itself should send the request, you may want
to study how Squid sends requests for Cache Digests or perhaps netdb
information. Those requests are sent to other Squids.

In either case, if you cannot find relevant source code, you can find
most of it by using "debug_options ALL,9", sending a single cache
manager request (or waiting for the first Cache Digest exchange, etc.),
and then searching source code for matching lines.

HTH,

Alex.

> It is
> for this reason that I need the data. I will not be able to run the
> squidclient and might have to use the internal APIs to make the call
> directly in the parent squid which is why I am looking for someone to
> give me an insight on how this ipcache stats collection works through
> squidclient.

> -----Original Message-----
> From: Alex Rousskov [mailto:rousskov_at_measurement-factory.com]
> Sent: 26 April 2012 21:30
> To: Anita Sivakumar (WT01 - GMT-Telecom Equipment)
> Cc: squid-dev_at_squid-cache.org
> Subject: Re: Store client API
>
> On 04/25/2012 02:18 AM, anita wrote:
>
>> I would need help in understanding how the store/store_client classes work.
>> I am looking for reading the ipcache and dumping its contents into a file.
>
>
> Hello Anita,
>
> Can you use a Cache Manager request (mgr:ipcache) to request ipcache
> information over HTTP using tools such as squidclient, curl, or wget?
> For example,
>
> $ ./bin/squidclient mgr:ipcache > /tmp/ipcache.out
>
> The store client API is mostly for reading/receiving cached entries. It
> is probably not what you are looking for.
>
>
> Good luck,
>
> Alex.
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
Received on Fri Apr 27 2012 - 04:36:59 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 27 2012 - 12:00:07 MDT