Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于流量统计 #217

Open
toyo2333 opened this issue Jul 29, 2024 · 3 comments
Open

关于流量统计 #217

toyo2333 opened this issue Jul 29, 2024 · 3 comments

Comments

@toyo2333
Copy link

toyo2333 commented Jul 29, 2024

请问流量统计的逻辑

我发现我重启机器后,这个统计就从0开始了。是这样设计的么?

如果一直不重启,那么这个统计是否有个周期自动重置呢 比如一个自然月,这样可以知道一个月的用量? 这个明白了我看你之前的回答是一个月重新计算。

@cokemine
Copy link
Owner

客户端有一个 -vnstat的选项,开启这个选项可以直接通过vnstat获取流量数据 https://github.com/cokemine/nodestatus-client-go#cli-options
但是你需要在每个客户端上安装vnstat,在vnstat的配置文件中,你可以指定流量统计的周期和自动重置的时间

@toyo2333
Copy link
Author

toyo2333 commented Aug 1, 2024

客户端有一个 -vnstat的选项,开启这个选项可以直接通过vnstat获取流量数据 https://github.com/cokemine/nodestatus-client-go#cli-options 但是你需要在每个客户端上安装vnstat,在vnstat的配置文件中,你可以指定流量统计的周期和自动重置的时间

那现在默认的逻辑是什么? 我看你之前的回复是一个月重新计算,可今天在机器上看现在算已经是UTC时间1号了,没有开始重新计算啊

@cokemine
Copy link
Owner

cokemine commented Aug 4, 2024

不适用vnstat的情况下默认是客户端服务器重启后流量统计自动清零的,如果用vnstat的话应该是默认每月一号自动重置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants