标签:nbsp end lis nginx连接 gen sof grep zabbix etc
[4ajr@web1 scripts]$ vim conn_now
#!/bin/bash
conn=`netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a,S[a]}‘ | grep "ESTABLISHED" | awk ‘{print $2}‘`
if [ $conn -le 1000 ]
then
echo 1
else
echo 0
fi
[4ajr@web1 etc]$ vim zabbix_agentd.conf
UserParameter=conn_nginx,bash /soft/zabbix_agent/scripts/conn_now
标签:nbsp end lis nginx连接 gen sof grep zabbix etc
原文地址:https://www.cnblogs.com/charon2/p/10349735.html