https://github.com/helloh2o/govnstat
统计每个月VPS使用的流量,特别是AWS之类,防止流量溢出产生额外的费用
https://github.com/helloh2o/govnstat
Last synced: 3 months ago
JSON representation
统计每个月VPS使用的流量,特别是AWS之类,防止流量溢出产生额外的费用
- Host: GitHub
- URL: https://github.com/helloh2o/govnstat
- Owner: helloh2o
- Created: 2021-05-10T03:02:38.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-17T10:26:43.000Z (about 3 years ago)
- Last Synced: 2024-06-21T19:54:12.659Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# govnstat
统计每个月VPS使用的流量,特别是AWS之类,防止流量溢出产生额外的费用
## 使用 ##
1. VPS上先安装vnstat服务
2. 在运行go版本vnstat,当流量超出最大值,自动关机,建议采用service方式运行
3. 运行参数
```
Usage of ./vnstat:
-loop int
多少分钟检查检查一次流量使用情况
how many minutes to check loop (default 5)
-max float
最大允许使用的流量,单位GB
max gb traffic todo (default 999)
-p string
vnstat服务的参数
vnstat args (default "--json" 可选 "-m")
-ver int
vnstat的版本,低于2.0必须使用此参数 -ver 1
the version of vnstat (default 2)
```
### Release 可执行文件已在ubuntu测试 ###