测量收到的流量

时间:2011-06-23 05:09:02

标签: php apache wamp wampserver

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

1 个答案:

答案 0 :(得分:4)

Clientside解决方案:如果您使用的是firefox,则插件firebug(https://addons.mozilla.org/de/firefox/addon/firebug/)可以执行此操作。

Serverside解决方案:您可以在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

易于定制。

相关问题