[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need current Debian _specific_ HOWTO for vnstat



On 10/19/25 8:04 PM, John Hasler wrote:
Try this, Richard:

     vnstat -m -i `vnstat --dbiflist 1 | awk '{printf "%s%s", sep, $0; sep="+"} END{print ""}'`

This will find all the names that your interface has used during the
month and summarize the usage so it won't matter if it changed its MAC
and therefor its interface name during the month.

Add whatever options you need before the -i.  See the man page for
details.  Install the awk package if you don't already have it.


richard@debian12:~/0tst$ vnstat -m -i `vnstat --dbiflist 1 | awk '{printf "%s%s", sep, $0; sep="+"} END{print ""}'`

 eno1+enx1adc5cfd43ff+wlp2s0b1  /  monthly

        month        rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
       2025-10      8.00 MiB |  618.82 KiB |    8.61 MiB |   11.15 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated      1.72 GiB |  131.83 MiB |    1.85 GiB |
richard@debian12:~/0tst$

As I believe I said elsewhere:
"When I open 192.168.0.1 the Device Information page says "Alcatel LINKZONE 9530"."



Reply to: