Page MenuHomeVyOS Platform

clear interfaces <type> <interface> counters has no effect
Resolved (N/A)PublicBUG

Description

vyos@vyos:~$ show interfaces ethernet eth0 vif 201
eth0.201@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:50:56:bf:c5:6d brd ff:ff:ff:ff:ff:ff
    inet 172.18.201.10/24 scope global eth0.201
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:febf:c56d/64 scope link
       valid_lft forever preferred_lft forever

    RX:    bytes  packets  errors  dropped  overrun       mcast
         7709982    18978       0        0        0        2538
    TX:    bytes  packets  errors  dropped  carrier  collisions
         3202979    16353       0        0        0           0


vyos@vyos:~$ clear interfaces ethernet eth0.201 counters
Clearing eth0.201


vyos@vyos:~$ show interfaces ethernet eth0 vif 201
eth0.201@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:50:56:bf:c5:6d brd ff:ff:ff:ff:ff:ff
    inet 172.18.201.10/24 scope global eth0.201
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:febf:c56d/64 scope link
       valid_lft forever preferred_lft forever
    Last clear: Sat Jun 06 17:06:39  2020

    RX:    bytes  packets  errors  dropped  overrun       mcast
         7716884    19069       0        0        0        2539
    TX:    bytes  packets  errors  dropped  carrier  collisions
         3212691    16424       0        0        0           0

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202006060117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

It's impossible without re-adding network driver (modprobe -r xxx; modprobe xxx)

erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 5:43 AM
erkin removed a subscriber: Active contributors.

It is really somehow was in the old backend

[email protected]:~$ ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=eth1
eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 state UP group default qlen 1000
    link/ether 52:54:00:c1:05:04 brd ff:ff:ff:ff:ff:ff
    Last clear: Wed Sep 01 18:29:34 EEST 2021
    Description: FOO

    RX:  bytes    packets     errors    dropped    overrun      mcast
           556         10          0          0          0          0
    TX:  bytes    packets     errors    dropped    carrier collisions
           738         10          0          0          0          0
[email protected]:~$ 
[email protected]:~$ clear interfaces ethernet eth1 sta

  Invalid command: clear interfaces ethernet eth1 [sta]
      
[email protected]:~$ clear interfaces ethernet eth1 counters 
Clearing eth1
[email protected]:~$ 
[email protected]:~$ ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=eth1
eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 state UP group default qlen 1000
    link/ether 52:54:00:c1:05:04 brd ff:ff:ff:ff:ff:ff
    Last clear: Wed Sep 01 18:34:08 EEST 2021
    Description: FOO

    RX:  bytes    packets     errors    dropped    overrun      mcast
             0          0          0          0          0          0
    TX:  bytes    packets     errors    dropped    carrier collisions
             0          0          0          0          0          0
[email protected]:~$

https://github.com/vyos/vyatta-op/blob/equuleus/scripts/vyatta-show-interfaces
https://github.com/vyos/vyatta-op/blob/bb42b60786f88fcebed09358d904e6d3118dce97/scripts/vyatta-show-interfaces.pl#L373-L394

Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.0) board.

Fixed in 1.3

vyos@r4:~$ show interfaces counters 
Interface    Rx Packets   Rx Bytes     Tx Packets   Tx Bytes
dum0                  0          0              0          0
eth0                126       9952             76      10316
eth1                  4        280              5        523
eth2                 37       1924              0          0
lo                    6        300              6        300
vyos@r4:~$ 
vyos@r4:~$ clear interfaces ethernet eth1 counters 
Clearing eth1
vyos@r4:~$ show interfaces counters 
Interface    Rx Packets   Rx Bytes     Tx Packets   Tx Bytes
dum0                  0          0              0          0
eth0                182      14550            108      14340
eth1                  0          0              0          0
eth2                 42       2184              0          0
lo                    6        300              6        300
vyos@r4:~$