Linux下通过server-status监控性能

时间:2023-03-08 23:31:36
Linux下通过server-status监控性能

Linux下通过server-status监控性能

前提:安装好Apache,在opt/路径下

  1. 查看Apache的工作模式Linux下通过server-status监控性能

可以知道是 prefork.c模式

  1. 配置server-status 性能

进入到httpd.conf路径

vi  /etc/httpd/conf/httpd.conf

然后添加

<Location /server-status>

SetHandler   server-status

Order        allow,deny

Deny from    nothing

Allow from   all

</Location>

ExtendedStatus On

<Location /server-info>

SetHandler   server-info

Order        allow,deny

Deny from    nothing

Allow from   all

</Location>

  1. 重启:service httpd restart
  2. 访问:http://192.168.254.135/server-status
  3. Linux下通过server-status监控性能