list vcls
varnishadm -n /var/run/varnish-home vcl.list
Show a full vcl
varnishadm -n /var/run/varnish-home vcl.show <vcl-id>
Compile a vcl on varnish - make sure to provide absolute path
```varnishd -C -f /path/to/mysetup.vcl``
command to check nginx like access logs in varnish
varnishncsa -n /var/run/varnish-home
purge cache based on http host header
varnishadm -n /var/run/varnish-home "ban req.http.host ~ footer-service-prod-varnish.footer-service"
varnishtop -n /var/run/varnish-home -bC -i RxHeader -I connection.*close
varnishstat to look at network drop or timeout errors:
varnishstat -n /var/run/varnish-home -1 | grep -i '\(err\|fail\|drop\)
Check the default params
varnishadm -n /var/run/varnish-home param.show
Check the memory allocated to varnish daemon
varnishstat -n /var/run/varnish-home -f SMF.s0.c_bytes,SMF.s0.g_space
Command to see log entries that have 503 response code
varnishlog -q 'RespStatus == 503' -n /var/run/varnsih-home
check varnish logs for backend health probes:
varnishlog -n /var/run/varnish-home -g raw -i Backend_health