qweewq123qwe 发表于 2015-9-9 10:45:36

zabbix 自定义采集网络连接状态

  Python版本:
  

#!/usr/bin/env python  
# -*- coding:utf-8 -*-
  

  
import subprocess
  
import sys
  
import re
  

  
status_dict = {}
  
cmd= '/usr/sbin/ss -s'
  
tmp_text = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()

  
tmp_list = re.findall("(?
页: [1]
查看完整版本: zabbix 自定义采集网络连接状态