zabbix监控php-fpm的性能
vim php-fpm_status.sh #!/bin/bashlistenqueue(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "listen queue:"|grep -vE "len|max"|awk '{print$3}'
}
listenqueuelen(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "listen queue len" |awk '{print$4}'
}
idle(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "idle processes" |awk '{print$3}'
}
active(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "active" |awk '{print$3}'|grep -v "process"
}
total(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "total processes" |awk '{print$3}'
}
mactive(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "max active processes:" |awk '{print$4}'
}
since(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "start since: " |awk '{print$3}'
}
conn(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "accepted conn" |awk '{print$3}'
}
reached(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "max children reached" |awk '{print$4}'
}
requests(){
wget --quiet -O - http://127.0.0.1:80/status?auto |grep "slow requests" |awk '{print$3}'
}
$1
页:
[1]