Varnish Cheat sheet
Show most requested URLs from backend
varnishtop -i BereqURL
Check user agent
varnishlog -q 'BereqURL ~ "^/test/blaataap/"
List of all variables such as client.ip
https://varnish-cache.org/docs/trunk/reference/vcl.html
Show nuked items
Elements that have been removed from cache due to lack of memory.
varnishstat -1 -f MAIN.n_lru_nuked
Varnishhist
Varnishhist shows a histogram of the requests currently being served by Varnish: the more to the left they are shown, the faster they have been served. These are generally more cache hits, as they’re served the fastest.
The more items to the right, the slower each request is.
A pipe sign | is a cache hit, a hashtag # is a cache miss (can also be a cache miss on purpose, if the VCL code says return (pass);).
varnishhist is a good quick glance to see if Varnish is caching anything and if so, what the overal ratio is: lots of cache hits or misses. But beyond that, the tool probably won’t tell you that much.