Mat Sumpter
  • Home
  • Blog

Varnish One Liners

Aug 18th, 2014
  • devops
  • Fetch varnish logs for particular IP address: varnishlog -o -c | perl -ne 'BEGIN { $/ = "";} print if (/RxURL.*\/$/m and /ReqStart.*127.0.0.1/);'
  • Fetch 50x errors from backend (Varnish < v3): varnishlog -c -o TxStatus ^50

Others:

  • https://www.varnish-cache.org/trac/wiki/VarnishlogExamples
  • http://mclear.co.uk/2011/04/25/varnishlog-cheat-sheet/

Follow me!

  • Github
  • Google+
  • LinkedIn
  • StackOverflow
  • Twitter

Recent Posts

  • Pseudo IPv4 addresses for IPv6 users - OpenResty
  • OpenResty CentOS 7 Systemd Script
  • Other handy oneliners
  • Varnish One Liners
  • A migration to Octopress/Jekyll

GitHub Repos

All content by Mat Sumpter and licenced under Creative Commons.
Code under MIT Licence.