Re: [squid-users] get data from cachemgr

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Sun, 06 Aug 2006 14:19:23 +0200

mån 2006-08-07 klockan 01:24 -0700 skrev lopl:
> because of project defined, I can not use web server in cache server, so
> there is a restriction to use cachmagr.cgi.
> how can i send GET variables to cachemgr.cgi, and get data to save in local
> file ?

A easier method is to use squidclient to get the data. It doesn't do the
same pretty formatting into HTML as cachemgr.cgi does, but it gives you
access to exacly the same data from Squid.

squidclient mgr:

gives the menu of available cachemgr screens.

squidclient mgr:info

the general runtime information screen

etc for the other actions in the menu..

cachemgr.cgi is a CGI, so it accepts form input like any other CGI. So
to get the general runtime information screen you can run

  env METHOD=GET QUERY_STRING="server=localhost&operation=info" /usr/local/squid/libexec/cachemgr.cgi

to get the pretty formatted cachemgr.cgi HTML output, including HTTP
headers..

Regards
Henrik

Received on Sun Aug 06 2006 - 06:19:28 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:01 MDT