Skip to main content
ScottV
New Member
August 15, 2013
Question

Looking for a CLI to clear interface stats

  • August 15, 2013
  • 3 replies
  • 21403 views
I am having issues with a Fibre line from a supplier and need evidence what they are doing is fixing it or not. I am running diag hardware deviceinfo nic wan1, to check counter stats for errors etc But I want to wipe it out and start fresh after they make a change so I can easily see if its working or not, (with out rebooting FG) I googled and read though a few CLI books for ages with out finding any thing good. Thanks

    3 replies

    Dave_Hall
    New Member
    August 15, 2013
    diag netlink interface clear <arg> on the CLI is suppose to clear the interface counters, but testing it on an 80CM it does not appear to work.
     # diag netlink interface clear ?  arg    please input args  
    Also as far as I know it <arg> is the interface name but the command seems to happy accepting gibberish text as well.
    ScottV
    ScottVAuthor
    New Member
    August 16, 2013
    Thanks for the reply Yeah doesn' t seem to work the FG in question for me is a 80C too V4 MR3 Patch 12
    ede_pfau
    SuperUser
    SuperUser
    August 16, 2013
    You can get the <arg> value by listing all interface names:
    gate # diag netlink interface list    if=lo family=00 type=772 index=1 mtu=16436 link=0 master=0  ref=5 state=present flags=loopback     if=eth0 family=00 type=1 index=2 mtu=1500 link=0 master=0  ref=2 state=start present flags=up broadcast run promsic multicast     if=wan1 family=00 type=1 index=3 mtu=1500 link=0 master=0  ref=5 state=start present flags=up broadcast run multicast     if=modem family=00 type=1 index=4 mtu=1500 link=0 master=0  ref=2 state=present flags=broadcast noarp     if=internal family=00 type=1 index=10 mtu=1500 link=0 master=0  ref=130 state=start present flags=up broadcast run multicast     if=ppp0 family=00 type=512 index=27 mtu=1492 link=3 master=0  ref=60 state=start present flags=up p2p run noarp multicast   
    Here, " if=" denotes the interface' s name. Then,
     gate # diag netlink interface list ppp0    if=ppp0 family=00 type=512 index=27 mtu=1492 link=3 master=0  ref=59 state=start present flags=up p2p run noarp multicast   Qdisc=pfifo_fast   stat: rxp=171590 txp=199234 rxb=75128128 txb=30937297 rxe=0 txe=0 rxd=0 txd=0 mc=0 collision=0  re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0  te: txa=0 txc=0 txfi=0 txh=0 txw=0  misc rxc=0 txc=0 stop=0  input_type=0 state=6 arp_entry=1 refcnt=59    gate # diag netlink interface clear ppp0    gate # diag netlink interface list ppp0                                                           if=ppp0 family=00 type=512 index=27 mtu=1492 link=3 master=0  ref=58 state=start present flags=up p2p run noarp multicast   Qdisc=pfifo_fast   stat: rxp=13 txp=17 rxb=1534 txb=3148 rxe=0 txe=0 rxd=0 txd=0 mc=0 collision=0  re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0  te: txa=0 txc=0 txfi=0 txh=0 txw=0  misc rxc=0 txc=0 stop=0  input_type=0 state=6 arp_entry=1 refcnt=58  
    That is, you qualify the " list" command to read out the counters (at least, some of them). Then I cleared the counters and repeated the read-out.
    telecosistem
    New Member
    January 24, 2016

    I need to clear the rx_fifo counters and with this command isn't possible.