Apache2:如何跟踪服务器端的客户端下载进度

我在Ubuntu服务器上运行Apache2。 客户端使用浏览器从该服务器下载大文件(appx.2GB)。

如何在服务器端跟踪下载的进度。 我想看看为客户端提供了多less特定的下载。

谢谢!

当Apache提供静态文件时,我不认为这是可能的。

但是,您可以使用提供相应标题的脚本并将该文件写入客户端。 这样,您可以将当前进度写入日志文件中。

你尝试从Apache Apache mod_status ?

每个工作人员的状态,工作人员执行的请求数量和工作人员提供的总字节数(*)

你可以拿出你想要的结果吗?

它看起来像这样:

Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request 0-22 30807 0/328/6417 _ 111.81 2 0 0.0 2.84 37.39 1.2.4.2 0-22 30807 0/266/5823 _ 111.81 2 0 0.0 1.32 32.97 1.2.4.2 conn.local:80 GET /path/to/file HTTP/1.0 Srv Child Server number - generation PID OS process ID Acc Number of accesses this connection / this child / this slot M Mode of operation CPU CPU usage, number of seconds SS Seconds since beginning of most recent request Req Milliseconds required to process most recent request Conn Kilobytes transferred this connection Child Megabytes transferred this child Slot Total megabytes transferred this slot