Aruba / HP Switches Clear Interface Counters

KB ID 0001519

Problem

I was looking for a way to clear (zero) ALL interface counters, (in my case on a 5412-Zl2).

[box]

Petes-HP-Switch# show int A1

 Status and Counters - Port Counters for port A1

  Name  : Trunk Uplink Member 1
  MAC Address      : f40343-787aaa
  Link Status      : Up
  Port Enabled     : Yes
  Totals (Since boot or last clear) :
   Bytes Rx        : 3,243,414,990        Bytes Tx        : 4,155,683,352
   Unicast Rx      : 1,729,923,935        Unicast Tx      : 3,184,593,493
   Bcast/Mcast Rx  : 24,777,382           Bcast/Mcast Tx  : 59,001,502
  Errors (Since boot or last clear) :
   FCS Rx          : 56,422               Drops Tx        : 0
   Alignment Rx    : 0                    Collisions Tx   : 0
   Runts Rx        : 0                    Late Colln Tx   : 0
   Giants Rx       : 4,869,708            Excessive Colln : 0
   Total Rx Errors : 4,926,130            Deferred Tx     : 0
  Others (Since boot or last clear) :
   Discard Rx      : 53                   Out Queue Len   : 0
   Unknown Protos  : 0
  Rates (5 minute weighted average) :
   Total Rx(Kbps) : 4,176                  Total Tx(Kbps) : 768
   Unicast Rx (Pkts/sec) : 695            Unicast Tx (Pkts/sec) : 674
   B/Mcast Rx (Pkts/sec) : 2              B/Mcast Tx (Pkts/sec) : 9
   Utilization Rx  : 00.04 %		  Utilization Tx  :     0 %

[/box]

Solution

The command I was looking for is, clear statistics local.

[box]

Petes-HP-Switch# clear statistics global

[/box]

So now, my stats have ‘dropped” (Note: its a busy port!)

[box]

Petes-HP-Switch# show int A1

 Status and Counters - Port Counters for port A1

  Name  : Trunk Uplink Member 1
  MAC Address      : f40343-787aaa
  Link Status      : Up
  Totals (Since boot or last clear) :
   Bytes Rx        : 1,759                Bytes Tx        : 1,555
   Unicast Rx      : 1,630                Unicast Tx      : 1,301
   Bcast/Mcast Rx  : 15                   Bcast/Mcast Tx  : 29
  Errors (Since boot or last clear) :
   FCS Rx          : 0                    Drops Tx        : 0
   Alignment Rx    : 0                    Collisions Tx   : 0
   Runts Rx        : 0                    Late Colln      : 0
   Giants Rx       : 0                    Excessive Colln : 0
   Total Rx Errors : 0                    Deferred Tx     : 0
  Others (Since boot or last clear) :
   Discard Rx      : 0                    Out Queue Len   : 0
   Unknown Protos  : 0
  Rates (5 minute weighted average) :
   Total Rx(Kbps) : 1,120                 Total Tx(Kbps) : 752
   Unicast Rx (Pkts/sec) : 689            Unicast Tx (Pkts/sec) : 672
   B/Mcast Rx (Pkts/sec) : 2              B/Mcast Tx (Pkts/sec) : 10
   Utilization Rx  : 00.04 %		  Utilization Tx  :     0 %

[/box]

Related Articles, References, Credits, or External Links

NA

2 thoughts on “Aruba / HP Switches Clear Interface Counters

  1. Hi Pete,

    thanks for this article, too!

    I’ve cleared my statistics with clear statistics global (you wrote local instead of global in one passage above). In the console the counters are resetted in every session but not in the GUI.

    Is there any trick for clearing them in the GUI? Maybe it is a bug since this firmware is older (16.01.xxxx on my 5406R-zl2).

    I’ve tried to cross test it on a 2530 with firmware 16.10.xxxx but there is no global option available for the clear statistics command (https://community.arubanetworks.com/community-home/digestviewer/viewthread?GroupId=25&MessageKey=fd7599ae-d3d4-49df-a3d5-e824e874ef4f).

    Best regards
    Andre

Leave a Reply

Your email address will not be published. Required fields are marked *