从Ubuntu14.04升级到18.04之后,我的USB调制解调器的接口名changed从wwan0升级到wwx001e101f0000。我不介意,而且也读到这有一些很好的理由。不幸的是,vnstat停止了这个接口的工作:
$ vnstat -i wwx001e101f0000
Error: Unable to read database "/var/lib/vnstat/wwx001e101f0000": No such file or directory它适用于以太网接口enp4s0:
$ vnstat
Database updated: Wed Aug 29 09:09:11 2018
enp4s0 since 08/15/2018
rx: 24.93 GiB tx: 10.19 GiB total: 35.12 GiB
monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Aug '18 24.93 GiB | 10.19 GiB | 35.12 GiB | 123.21 kbit/s
------------------------+-------------+-------------+---------------
estimated 27.27 GiB | 11.15 GiB | 38.42 GiB |
daily
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
yesterday 16.45 GiB | 2.26 GiB | 18.71 GiB | 1.86 Mbit/s
today 107.07 MiB | 473.64 MiB | 580.71 MiB | 147.83 kbit/s
------------------------+-------------+-------------+---------------
estimated 280 MiB | 1.21 GiB | 1.48 GiB |我需要一些替代来测量消耗的数据,因为我使用这个调制解调器的数据量有限(LTE调制解调器)。还有别的选择吗?我只发现了很多提供实时流量监控的工具,但我需要历史数据。
发布于 2018-08-30 05:40:32
我意识到vnstat即使在接口wwx001e101f0000中也能正常工作,但我不得不这样做:
sudo vnstat -u -i wwx001e101f0000
Error: Unable to read database "/var/lib/vnstat/wwx001e101f0000": No such file or directory
Info: -> A new database has been created.,然后在/etc/vnstat.conf中设置它。
# default interface
Interface "wwx001e101f0000"所以问题解决了。
https://askubuntu.com/questions/1070013
复制相似问题