Apache历史连接日志
有谁知道是否可以识别服务器在给定时间段内拥有的连接数?
有没有保存此类信息的日志?
谢谢
Doe anyone know if it's possible to identify the number of connections that a server has had over a given period of time?
are there any logs that keep that kind of information?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用“grep”从 access.log 中获取包含特定日期/时间(或范围)(以及其他过滤条件)的所有行,并将其通过管道传输到“wc -l”来计算行数,其中会给你请求的数量。
You can use "grep" to get all the lines from the access.log that contain a certain date/time (or range) (and other filter criteria) and pipe it to "wc -l" to count the number of lines, which will give you the number of requests.
我不太确定,但是您查看了
access.log
吗?在 Linux 下,它通常位于/var/log/apach2/access.log
。它在您系统上的位置是在您的httpd.conf
或其他已解析的 apache 配置中定义的。I not really sure, but did you have a look at
access.log
? Under linux its usually at/var/log/apach2/access.log
. Where it is located on your system is defined in yurhttpd.conf
or one other parsed apache configuration.