Re: [squid-users] Getting config from running squid

From: Wayne Bastow <wbastow@dont-contact.us>
Date: Mon, 24 Mar 2003 09:38:50 +1100

Henrik,

I don't have any experience with gdb. I get the following when I try
your suggestion:

phobos:~$ gdb /u1/squid/bin/squid
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnulibc1"...
(gdb) tbreak cachemgrStart
Breakpoint 1 at 0x8057599: file cache_manager.c, line 199.
(gdb) continue
The program is not being run.

Can you tell me what this means, please.

Thanks,
Wayne

Henrik Nordstrom wrote:

>The configuration can only be dumped via cachemgr if you have enabled
>this in squid.conf.
>
>However, even if you have not enabled dumping of the configuration all
>is not lost. You might be able to enable the config dump option by using
>a debugger.
>
> gdb /path/to/squid pid_of_running_squid
>
> tbreak cachemgrStart
> continue
>
> [send a request for config]
> [gdb should stop in cachemgrStart]
>
> print cachemgrFindAction("config")
> print $->flags.pw_req = 0
>
> continue
>
>Regards
>Henrik
>
>
>
>Wayne Bastow wrote:
>
>
>>Hi,
>>
>>I've done something stupid - overwrote my squid.conf and I don't have a
>>backup anywhere. Squid is still running - I went into cachemgr interface
>>and tried "Current Squid Configuration" link but I get "Invalid URL" -
>>other items on the menu work. Is there some way of getting the
>>configuration dumped?
>>
>>I've looked through the mailing lists and the FAQ but can't find the
>>answer - also tried telnetting to 3128 and using a GET
>>cache_object://phobos/config HTTP/1.0 - still get "Invalid URL".
>>
>>Thanks,
>>Wayne
>>
>>
>
>
>
Received on Sun Mar 23 2003 - 15:37:38 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:14:18 MST