varnishlog useful admin commands

Top REQUEST methods
varnishtop -i ReqMethod

Top URLs that MISS the cache
varnishtop -i BereqURL

Top URLS that HIT the cache
varnishtop -i ReqURL

All URLs that HIT the cache in real time
varnishlog -g request -q ‘VCL_call eq HIT’ | grep reqURL

All URLs that MISS the cache in real time
varnishlog -g request -q ‘VCL_call eq MISS’ | grep reqURL

All URLs that MISS the cache in real time
varnishlog -i BereqURL

Look at an incoming client request of a specific URL
varnishlog -c -q “ReqUrl eq ‘/'”

Look at a a backend request of a specific URL
varnishlog -i -q “BereqURL eq ‘/'”

See requests for one specific Hostname
varnishlog -c -q “ReqHeader eq ‘Host: www.mydomain.com'”

See the age of the cache objects for a specific hostname
varnishlog -c -q “ReqHeader eq ‘Host: www.mydomain.com'” | grep Age

All 404
varnishlog -b -q “ObjStatus eq 404”

Leave a Reply

Your email address will not be published. Required fields are marked *