【问题标题】:Measuring traffic sent received测量发送接收的流量
【发布时间】:2011-09-20 22:22:22
【问题描述】:

我正在使用 WAMP。
我想在查看项目时测量发送和接收的字节数。
怎么办?

【问题讨论】:

    标签: php apache wamp wampserver


    【解决方案1】:

    客户端解决方案:如果您使用的是 firefox,插件 firebug (https://addons.mozilla.org/de/firefox/addon/firebug/) 可以做到这一点。

    服务器端解决方案:您可以在 apache 日志格式中指定以下内容(用于访问日志):

    %...B:          Bytes sent, excluding HTTP headers.
    %...b:          Bytes sent, excluding HTTP headers. In CLF format
    

    “...”可以什么都不是(例如, "%h %u %r %s %b"),也可以表示 项目纳入条件 (这将导致它被替换 不满足条件时加“-”)。

    见:http://httpd.apache.org/docs/1.3/mod/mod_log_config.html

    补充: 您会在 httpd.conf 中找到类似的内容:

     LogFormat "%h %l %u %t \"%r\" %>s %b" common
     CustomLog logs/access_log common
    

    易于定制。

    【讨论】:

    • 似乎没有办法用自定义日志格式记录接收到的字节。
    猜你喜欢
    • 2018-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多