【问题标题】:How to read output of varnishtop?如何读取 varnishtop 的输出?
【发布时间】:2012-10-26 05:01:54
【问题描述】:

使用 varnish-cache,我正在运行 varnishtop -c -i RxURL 以显示来自缓存的客户端请求数。输出看起来有点像这样:

list length 40                                                                                                                                                    

   121.76 RxURL          /some/path/to/file
   105.17 RxURL          /some/other/file
    42.91 RxURL          /and/another
    14.61 RxURL          /yet/another
    14.59 RxURL          /etc
    13.63 RxURL          /etc/etc

121.76105.17 等数字代表什么?

在第一次发布varnishtop 时它们会增加,但随后会趋于稳定,因此我倾向于相信每个特定时间范围内的点击数。是这样吗,时间范围是多少?

这在man page 中没有解释。感谢您的帮助!

编辑:清漆版本为2.1

【问题讨论】:

    标签: varnish


    【解决方案1】:

    varnishtop 命令显示超过 60 秒的滚动聚合计数。这意味着即使所有交通都停止,显示屏上的平均下降也需要 60 秒。

    列表长度 40

    列表中的项目总数,因为屏幕一次只能显示这么多。

    121.76 RxURL /some/path/to/file

    在过去 60 秒内收到了约 121 个/some/path/to/file 的请求。

    其他一些有趣的监控统计数据:

    # most frequent cookies
    varnishtop -i RxHeader -I Cookie
    
    # continually updated list of frequent URLs
    varnishtop -i RxURL
    
    # most frequent UA strings
    varnishtop -i RxHeader -C -I ^User-Agent
    
    # frequent charset (Accept-Charset can be replaced with any other HTTP header)
    varnishtop -i RxHeader -C -I '^Accept-Charset'
    
    # Requests resulting in 404's
    varnishlog -b -m "RxStatus:404"
    

    【讨论】:

    • 谢谢。我得到的数字在 60 秒内没有意义,但也许我应该重新检查一下。
    • 对于 varnish 4.0 使用 ReqHeader 而不是 RxHeader
    【解决方案2】:

    这是每 60 秒的平均请求数。手册确实这么说 - 但在参数说明而不是工具的一般描述:

    -p period Specifies the number of seconds to measure over, the default is 60 seconds. The first number in the list is the average number of requests seen over this time period.

    【讨论】:

    • 谢谢,但这是来自 varnish 3.0 的文档,而不是 2.1。事实上,-p2.1 中是无法识别的。 2.1 文档中也没有任何类似的“句点”概念。
    • 我还应该注意,上面的数字对于60 秒是不可能的;对于我正在检查的特定工作量来说太高了(嗯,上面的数字只是样本;我的真实数字随着时间的推移汇总是不可能的 60 秒)。
    • 哦,让我到了那里......但他们改变了它的行为似乎仍然很奇怪。您可以在 60 年代尝试 varnishlog,然后处理该信息以确保您没有遗漏任何内容。
    • 谢谢;这就是我正在做的事情,我无法在varnishlogvarnishtop 中的数字之间找到合理的匹配。不是 60 秒,不是 ttl...
    猜你喜欢
    • 2016-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多