服务器流量监控小工具
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
Release history Release notifications | RSS feed
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.1.4.tar.gz
(11.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
NetTraRec-0.1.4-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file NetTraRec-0.1.4.tar.gz.
File metadata
- Download URL: NetTraRec-0.1.4.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2969e94e6e1b7149a48de210095717509da2d58eea54d83b6addc3441a14ff75
|
|
| MD5 |
0a567a9fe9f32570b29a23ba45a65e77
|
|
| BLAKE2b-256 |
fa51a55ba17c0b02733a017f2cfd2888e94b19fabf5602dbb08356811deef3ff
|
File details
Details for the file NetTraRec-0.1.4-py3-none-any.whl.
File metadata
- Download URL: NetTraRec-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.0 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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f39cc2ed8309ea9bd4b3aff5dcfa3f0eb4d2677a3c9d4fa38d15fc08d13265
|
|
| MD5 |
6746dd96008e59b0aadcd163e5e46fa5
|
|
| BLAKE2b-256 |
2b619751043d5304a7072365c5c5e7c10dfea8f28d2fa6ad8471a0975f9432f0
|