答案1
vnstat -l
確實做你需要的
只需打開終端機視窗並輸入vnstat -l
。然後啟動消耗網路頻寬的程式。程式結束後返回終端機視窗並按Ctrl+ C。然後終端將顯示經過的時間和消耗的網路流量:
$ vnstat -l
Monitoring enp59s0... (press CTRL-C to stop)
rx: 1.74 Mbit/s 149 p/s tx: 32 kbit/s 62 p/s^C
enp59s0 / traffic statistics
rx | tx
--------------------------------------+------------------
bytes 7.40 MiB | 142 KiB
--------------------------------------+------------------
max 1.84 Mbit/s | 35 kbit/s
average 1.68 Mbit/s | 31.53 kbit/s
min 1.51 Mbit/s | 29 kbit/s
--------------------------------------+------------------
packets 5215 | 2187
--------------------------------------+------------------
max 157 p/s | 68 p/s
average 144 p/s | 60 p/s
min 129 p/s | 55 p/s
--------------------------------------+------------------
time 36 seconds