zoukankan      html  css  js  c++  java
  • Zabbix 监控网络连接

     PDF

    http://fishcried.com/2015-06-17/ss_usage/

    userparameter_tcp.conf


    UserParameter=socket.tcp_listen,ss state all |grep "LISTEN" |wc -l
    UserParameter=socket.tcp_synsent,ss state all |grep "SYN-SENT" |wc -l
    UserParameter=socket.tcp_synrecv,ss state all |grep "SYN-RECV" |wc -l
    UserParameter=socket.tcp_established,ss -s |awk '/estab/ {print $4}' |cut -d',' -f1
    UserParameter=socket.tcp_finwait1,ss state all |grep "FIN-WAIT1" |wc -l
    UserParameter=socket.tcp_finwait2,ss state all |grep "FIN-WAIT2" |wc -l
    UserParameter=socket.tcp_closewait,ss state all |grep "CLOSE-WAIT"|wc -l
    UserParameter=socket.tcp_closing,ss state all |grep "CLOSING" |wc -l
    UserParameter=socket.tcp_lastack,ss state all |grep "LAST-ACK" |wc -l
    UserParameter=socket.tcp_timewait,awk '/TCP:/ {print $7}' /proc/net/sockstat
    #####
    UserParameter=socket.total_sockets,awk '/sockets:/ {print $3}' /proc/net/sockstat
    UserParameter=socket.tcp_inuse,awk '/TCP:/ {print $3}' /proc/net/sockstat
    UserParameter=socket.tcp_orphan,awk '/TCP:/ {print $5}' /proc/net/sockstat
    UserParameter=socket.tcp_alloc,awk '/TCP:/ {print $9}' /proc/net/sockstat
    UserParameter=socket.tcp_mem,awk '/TCP:/ {print $11}' /proc/net/sockstat
    UserParameter=socket.udp_inuse,awk '/UDP:/ {print $3}' /proc/net/sockstat


    zabbix_agentd -t socket.tcp_established 测试

     

  • 相关阅读:
    PAT1124:Raffle for Weibo Followers
    Pat1071: Speech Patterns
    PAT1032: Sharing (25)
    Pat1128:N Queens Puzzle
    C++相关:C++的IO库
    Pat1108: Finding Average
    PAT1070:Mooncake
    乐港游戏校招面试总结
    并发编程005 --- future &&futureTask
    并发编程004 --- 线程池的使用
  • 原文地址:https://www.cnblogs.com/hyming011/p/8252290.html
Copyright © 2011-2022 走看看