varnish-4.x 之varnishlog,varnishstat,varnishtop,varnishhist

varnish-4.x 之varnishlog,varnishstat,varnishtop,varnishhist


varnishlog
man varnishlog
man vsl
man vsl-query

数据流groups
-g  session | request | vxid | raw

• Transaction groups are hierarchical
• Levels are equal to relationships (parents and children):
Level 1: Client request (cache miss)
  Level 2: Backend request
  Level 2: ESI subrequest (cache miss)
    Level 3: Backend request
    Level 3: Backend request (VCL restart)
    Level 3: ESI subrequest (cache miss)
      Level 4: Backend request
  Level 2: ESI subrequest (cache hit)


varnishlog支持丰富的查询语句
• string matching, e.g.: RespProtocol eq "HTTP/1.1"
• regex, e.g.: ReqMethod ~ "GET|POST"
• integer and float matching, e.g.: RespStatus == 200
• boolean operators, e.g.: RespStatus >= 500 and RespStatus < 600
• parenthesis hierarchy
• negation using not
示例:
varnishlog -g request -i Begin,Link -d
varnishlog -q 'RespStatus < 500'
varnishlog -g request -q 'ReqURL eq "/"'
varnishlog -g request -q 'Backend ~ default'
varnishlog -g request -i ReqHeader,RespHeader


varnishstat
varnishstat -f MAIN.client_req -f MAIN.cache_hit
varnish-4.x <wbr>之varnishlog,varnishstat,varnishtop,varnishhist
Column Description
Name The name of the counter
Current The current value of the counter.
Change The average per second change over the last update interval.
Average The average value of this counter over the runtime of the Varnish daemon, or a
period if the counter can't be averaged.
Avg_10 The moving average over the last 10 update intervals.
Avg_100 The moving average over the last 100 update intervals.
Avg_1000 The moving average over the last 1000 update intervals.

varnishtop
varnish-4.x <wbr>之varnishlog,varnishstat,varnishtop,varnishhist

varnishhist
varnish-4.x <wbr>之varnishlog,varnishstat,varnishtop,varnishhist

转载于:https://www.cnblogs.com/lixuebin/p/10814160.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值