如何实时显示Apache服务器状态模块?


Answers:


9

您可以使用watch命令重复运行apache2ctl status,例如:

watch apache2ctl status

那家伙是怎么做到的?
詹姆斯

@James,你是什么意思?该watch命令将apache2ctl status每N秒运行一次。apache2ctl status将会显示mod_status状态的输出,如视频所示。读表(1)用户手册,看看httpd.apache.org/docs/2.0/mod/mod_status.html#autoupdatehttpd.apache.org/docs/2.0/programs/apachectl.html
斯特凡Lasiewski

对于我的应用程序,我刚刚为apache2配置了该模块,并且可以正常工作。
詹姆斯

6

按照http://httpd.apache.org/docs/2.2/mod/mod_status.html启用服务器状态后,只需将其添加?refresh=1到服务器状态URL的末尾即可。

我相信它与您将要获得的实时性非常接近。


那家伙是怎么做到的?
詹姆斯

我敢肯定它是?refresh = 1的-如果您观看视频,它每秒更新一次。
Dialt0ne 2011年

该视频显示了正在使用的文本浏览器,而我尝试过的所有文本浏览器都不支持自动刷新,因此该解决方案可能需要其他方法来刷新页面。
EEAA 2011年

它与CentOS / RHEL 5.x上的elinks elinks.or.cz配合使用时效果很好
Dialt0ne 2011年

啊,我没有尝试链接,只尝试链接和山猫。
EEAA 2011年


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.