Page MenuHomeVyOS Platform

clear interfaces <type> <interface> counters has no effect
Open, Requires assessmentPublicBUG

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

vyos@r4-1.3:~$ ${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
vyos@r4-1.3:~$ 
vyos@r4-1.3:~$ clear interfaces ethernet eth1 sta

  Invalid command: clear interfaces ethernet eth1 [sta]
      
vyos@r4-1.3:~$ clear interfaces ethernet eth1 counters 
Clearing eth1
vyos@r4-1.3:~$ 
vyos@r4-1.3:~$ ${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
vyos@r4-1.3:~$

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