Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个要提交几次的表单,我想知道一次提交此表单使用了多少带宽(上传和下载),以及它背后的 php 何时处理提交的数据,直到确认页面是到达。
我如何通过在显示确认页面之前回显它来监控它,以便我知道在一次访问和表单提交时占用了多少上传和下载带宽?
我不会让它在部署的版本中回显,只是现在用于测试。
有关您使用的 Web 服务器类型的一些详细信息将是有益的。无论如何,我在路由器的跨接端口上使用 bandwidthd 来按主机跟踪带宽,尽管这不会为您提供您正在寻找的粒度,它应该足以让您开始。
对于更细粒度的消费监控,我建议使用 mod_logio 之类的东西,它允许您将每个请求发送/接收的字节写入 apache 日志文件。
http://httpd.apache.org/docs/trunk/mod/mod_logio.html