Aruba & ProVision-based
1748235 Members
3485 Online
108759 Solutions
New Discussion юеВ

Re: How to REALLY clear interface statistics?

 
RicN
Valued Contributor

How to REALLY clear interface statistics?


Is there a way to clear the interface counter statistics on a Procurve device?

If I do the obvious "clear interface statistics a1" or similar, then the counters on port a1 does seems to be set to 0 and starting to count from that.

But, if I log off the session and re-logon the counters is magicaly restored to the original values. It seems like the clear-command only applies to the session.

If I want to see how many CRC errors, drops, collisions or anything else I actually get from one day to another or any other such action, this behaviour makes it very hard.

So my question is, can I actually clear/reset the counters without rebooting the whole switch?

 

P.S. This thread has been moved from Switches, Hubs, Modems (Legacy ITRC forum) to ProCurve / ProVision-Based. -HP Forum Moderator

11 REPLIES 11
Paulen
Regular Advisor

Re: How to REALLY clear interface statistics?

No. :o)
RicN
Valued Contributor

Re: How to REALLY clear interface statistics?


Why? ;)
cenk sasmaztin
Honored Contributor

Re: How to REALLY clear interface statistics?

hi RicN

sw# sh int

Status and Counters - Port Counters

Flow
Port Total Bytes Total Frames Errors Rx Drops Rx Ctrl
---- ------------ ------------ ------------ ------------ -----
1 0 0 0 0 off
2 0 0 0 0 off
3 0 0 0 0 off
4 0 0 0 0 off
5 0 0 0 0 off
6 0 0 0 0 off
7 0 0 0 0 off
8 0 0 0 0 off
9 0 0 0 0 off
10 0 0 0 0 off
11 0 0 0 0 off
12 0 0 0 0 off
13 0 0 0 0 off
14 0 0 0 0 off
15 0 0 0 0 off
16 0 0 0 0 off
17 0 0 0 0 off
18 0 0 0 0 off
19 0 0 0 0 off
20 0 0 0 0 off
21 0 0 0 0 off
22 0 0 0 0 off
23 0 0 0 0 off
24 0 0 0 0 off
25 0 0 0 0 off
26 4358 33 1 0 off

sw# conf
sw(config)# int 26
sw(eth-26)# clear
arp Flush all non-permanent entries in the ARP cache.
crypto Remove client public keys from active configuration.
intrusion-flags Reset the Alert Flag on all ports.
link-keepalive Reset link-keepalive counters for all UDLD enabled
ports.
logging Remove all event entries from the event log.
statistics Reset all counters for the specified ports.
sw(eth-26)# clear statistics
[ethernet] PORT-LIST Enter a list of ports or one port for the 'statistics'
command/parameter.
sw(eth-26)# clear statistics 26
sw(eth-26)# sh int

Status and Counters - Port Counters

Flow
Port Total Bytes Total Frames Errors Rx Drops Rx Ctrl
---- ------------ ------------ ------------ ------------ -----
1 0 0 0 0 off
2 0 0 0 0 off
3 0 0 0 0 off
4 0 0 0 0 off
5 0 0 0 0 off
6 0 0 0 0 off
7 0 0 0 0 off
8 0 0 0 0 off
9 0 0 0 0 off
10 0 0 0 0 off
11 0 0 0 0 off
12 0 0 0 0 off
13 0 0 0 0 off
14 0 0 0 0 off
15 0 0 0 0 off
16 0 0 0 0 off
17 0 0 0 0 off
18 0 0 0 0 off
19 0 0 0 0 off
20 0 0 0 0 off
21 0 0 0 0 off
22 0 0 0 0 off
23 0 0 0 0 off
24 0 0 0 0 off
25 0 0 0 0 off
26 0 0 0 0 off

sw(eth-26)#
sw(eth-26)#
cenk

RicN
Valued Contributor

Re: How to REALLY clear interface statistics?


Hello Cenk, thank you for the answer, but what will happen when you log off and log on?
Jason Scott
Regular Advisor

Re: How to REALLY clear interface statistics?

Unfortunately Procurve have yet to implement this very simple and useful feature. We've been asking for it from day 1 and I'm disappointed that its still not in any firmware update.

You can only permenantly reset the counters by performing a switch reboot.
Matt Hobbs
Honored Contributor

Re: How to REALLY clear interface statistics?

I'm pretty sure this feature is coming very soon on the 3500/5400/8200. The reason in the past is because it's tied to the SNMP counters which are not allowed to be reset until the switch reboots.
RicN
Valued Contributor

Re: How to REALLY clear interface statistics?


It seems now be solved, at least on ZL model switches!

On the new 13.49 release the command "clear statistics a1" does in fact clear the statistics both in the current session and after logoff/logon.

It should be interesting to see if this would be implemented on other switch models too.
Joey2008
New Member

Re: How to REALLY clear interface statistics?

You can see that "Clear Statistics Without Reboot" - PR_0000003128 on Release K.13.40 Enhancements.
http://cdn.procurve.com/training/Manuals/yl-zl-RelNotes-K1345-59914720.pdf (include yl and zl series)
RicN
Valued Contributor

Re: How to REALLY clear interface statistics?


Hello Joey2008,

that was what I wrote above, but do you know if the feature is available on other switch-families (than the latest K.13.4*) ?