mirror of https://github.com/cppla/ServerStatus
update
parent
4c042a3fc7
commit
474e7addc9
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
# Update by : https://github.com/cppla/ServerStatus
|
# Update by : https://github.com/cppla/ServerStatus, Update date: 20211009
|
||||||
# 依赖于psutil跨平台库
|
# 依赖于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
|
# 支持操作系统: Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD and NetBSD, both 32-bit and 64-bit architectures
|
||||||
# 时间: 20211009
|
|
||||||
# 说明: 默认情况下修改server和user就可以了。丢包率监测方向可以自定义,例如:CU = "www.facebook.com"。
|
# 说明: 默认情况下修改server和user就可以了。丢包率监测方向可以自定义,例如:CU = "www.facebook.com"。
|
||||||
|
|
||||||
SERVER = "127.0.0.1"
|
SERVER = "127.0.0.1"
|
||||||
|
@ -316,6 +315,8 @@ if __name__ == '__main__':
|
||||||
array['network_tx'] = netSpeed.get("nettx")
|
array['network_tx'] = netSpeed.get("nettx")
|
||||||
array['network_in'] = NET_IN
|
array['network_in'] = NET_IN
|
||||||
array['network_out'] = NET_OUT
|
array['network_out'] = NET_OUT
|
||||||
|
# todo:兼容旧版本,下个版本删除ip_status
|
||||||
|
array['ip_status'] = True
|
||||||
array['ping_10010'] = lostRate.get('10010') * 100
|
array['ping_10010'] = lostRate.get('10010') * 100
|
||||||
array['ping_189'] = lostRate.get('189') * 100
|
array['ping_189'] = lostRate.get('189') * 100
|
||||||
array['ping_10086'] = lostRate.get('10086') * 100
|
array['ping_10086'] = lostRate.get('10086') * 100
|
||||||
|
|
Loading…
Reference in New Issue