diff --git a/clients/client-psutil.py b/clients/client-psutil.py index f1a464b..aed5b2c 100755 --- a/clients/client-psutil.py +++ b/clients/client-psutil.py @@ -1,10 +1,9 @@ #!/usr/bin/env python3 # coding: utf-8 -# Update by : https://github.com/cppla/ServerStatus +# Update by : https://github.com/cppla/ServerStatus, Update date: 20211009 # 依赖于psutil跨平台库 -# 支持Python版本:2.7 to 3.9 +# 版本:1.0.2, 支持Python版本:2.7 to 3.9 # 支持操作系统: Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD and NetBSD, both 32-bit and 64-bit architectures -# 时间: 20211009 # 说明: 默认情况下修改server和user就可以了。丢包率监测方向可以自定义,例如:CU = "www.facebook.com"。 SERVER = "127.0.0.1" @@ -316,6 +315,8 @@ if __name__ == '__main__': array['network_tx'] = netSpeed.get("nettx") array['network_in'] = NET_IN array['network_out'] = NET_OUT + # todo:兼容旧版本,下个版本删除ip_status + array['ip_status'] = True array['ping_10010'] = lostRate.get('10010') * 100 array['ping_189'] = lostRate.get('189') * 100 array['ping_10086'] = lostRate.get('10086') * 100