lighttpd mod_status模块

用过nginx的status可以查看服务器的状态,之后就想lighttpd有没有这样的模块呢

之后看下配置文件,真的有,然后就试下

第一步,

"mod_auth" 把这个前面的#号去掉

第二步

在最后加上 这段配置信息

$HTTP["remoteip"] == "14.144.124.77" {

status.status-url = "/server-status"

status.config-url = "/server-config"

status.statistics-url = "/server-statistics"

status.enable-sort = "enable"

}

然后就就可以啦

上面  "14.144.124.77" 这个ip是我宽带拨号的ip,然后status.status-url = "/server-status" 是访问这个路径的时候可以看到服务器的状态

然后重启lighttpd就可以啦

然后访问浏览器 183.61.16.168:81/server-status 就可以啦

Hostname 183.61.16.168:81 ()
Uptime 4 min 38 s
Started at 2014-09-06 17:25:36
absolute (since start)
Requests 2 kreq
Traffic 655.15 kbyte
average (since start)
Requests 8 req/s
Traffic 2.36 kbyte/s
average (5s sliding average)
Requests 13 req/s
Traffic 4.11 kbyte/s

legend
. = connect, C = close, E = hard error
r = read, R = read-POST, W = write, h = handle-request
q = request-start, Q = request-end
s = response-start, S = response-end
1 connections
h

Connections

Client IP: Read: Written: State: Time: Host: URI: File:
14.144.124.77 0/0 0/4454 handle-req 2 183.61.16.168:81 /server-status (/server-status)  

结果是这样的

我用ab测试 并发1000,效果真的不如意啊

上一篇:EFCore教程


下一篇:javascript语法详解