Skip to main content

服务器流量监控小工具

Project description

服务器流量监控小工具

安装:

$ pip install NetTraRec

终端使用:

$ netrec [-选项]

# 显示帮助
$ netrec -h

# 结果推入 redis
$ netrec -pr
# 然后在启动后输入相关信息:
# target redis host(127.0.0.1): 
# port(6379): 
# db(0): 
# password(123456):
# ...

# 目标 redis 可以是本地或远程
# redis 信息也可以使用参数 "-kp now>>>>参数字典" 传入,方便远程调度
# 例如:
$ netrec -pr -kp 'now>>>>{"host": ..., "port": ..., ...}'

代码调用:

from NetRecorder import NetTraRec as Nr
res = Nr.start(["eth0"], print_out=False, unit="auto")
print(res)

# {'eth0': ['126.00 Bytes/s', '132.00 Bytes/s', 'auto', '2020-07-08 09:51:17']}

参数介绍:

懒得写了,看帮助吧

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NetTraRec-0.0.10.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NetTraRec-0.0.10-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file NetTraRec-0.0.10.tar.gz.

File metadata

  • Download URL: NetTraRec-0.0.10.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5

File hashes

Hashes for NetTraRec-0.0.10.tar.gz
Algorithm Hash digest
SHA256 1688f41d3be553630e8312a63979c996f189f9580f7c47d6e06eeabd3361efd0
MD5 312203e95ee40d47e279c551bfcf66ff
BLAKE2b-256 51a2cba280f371e3bf3873da9ec7794ef40e93e5d3a04c0c5372e28dbee7bb9c

See more details on using hashes here.

File details

Details for the file NetTraRec-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: NetTraRec-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5

File hashes

Hashes for NetTraRec-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2bedbab09a6c8c0f7f118cf9e6ed32c583e84fc7f51f583b2b1c83f0a5ae05e3
MD5 c0c0fbfb141f36841a1fe0b1f7c0b76c
BLAKE2b-256 2808b02431a1d05ea5bc756ca7ee044b2dac765b4bbf226e2f59b85ec2d23db4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page