Is there a way to extract a vcl
configuration file from a running instance of varnish?
That is, I'm debugging varnish on a system I haven't been involved with up until now. There's a lot of confusion from the system owners as to which varnish configuration files have been used to restart and refresh the server. It would be extremely helpful for me to be able to see what VCL configuration file the currently running varnish instance is using. Not the file path (as people are editing these files at will), but the actual contents of the file at the time of varnish's last restart/refresh.
In your case, I think your best shot would be the command
varnishadm vcl.show boot
(replace boot by active configuration's name, seevarnishadm vcl.list
output).Also one can run the following command:
which will dump the VCL code compiled to C language, then search for
static const char *srcbody[3] = {
and you will have the effective conf contents