How to REALLY clear interface statistics? (3178 Views)
Reply
Valued Contributor
RicN
Posts: 178
Registered: ‎08-13-2008
Message 1 of 12 (3,178 Views)

How to REALLY clear interface statistics?

[ Edited ]


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

Regular Advisor
Paulen
Posts: 126
Registered: ‎06-09-2006
Message 2 of 12 (3,178 Views)

Re: How to REALLY clear interface statistics?

No. :o)
Valued Contributor
RicN
Posts: 178
Registered: ‎08-13-2008
Message 3 of 12 (3,178 Views)

Re: How to REALLY clear interface statistics?


Why? ;)
Honored Contributor
cenk sasmaztin
Posts: 1,435
Registered: ‎04-02-2008
Message 4 of 12 (3,178 Views)

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

Valued Contributor
RicN
Posts: 178
Registered: ‎08-13-2008
Message 5 of 12 (3,178 Views)

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?
Regular Advisor
Jason Scott
Posts: 164
Registered: ‎05-10-2004
Message 6 of 12 (3,178 Views)

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.
Honored Contributor
Matt Hobbs
Posts: 1,555
Registered: ‎03-25-2002
Message 7 of 12 (3,178 Views)

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.
Valued Contributor
RicN
Posts: 178
Registered: ‎08-13-2008
Message 8 of 12 (3,178 Views)

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.
Occasional Visitor
Joey2008
Posts: 4
Registered: ‎12-17-2008
Message 9 of 12 (3,178 Views)

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)
Valued Contributor
RicN
Posts: 178
Registered: ‎08-13-2008
Message 10 of 12 (3,178 Views)

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*) ?
Occasional Visitor
M1xed0S
Posts: 1
Registered: ‎07-23-2014
Message 11 of 12 (986 Views)

Re: How to REALLY clear interface statistics?

I know this is aged post. But I am still looking for an answer on this issue.

 

I tried on a 8212zl switch running K.15.09 code and also a 2910al switch running K.15.14 code. The clear statistics <interface> doesnot persist after log out, login...

 

Am I missing anything here?

Occasional Visitor
bigfix01
Posts: 1
Registered: ‎03-06-2013
Message 12 of 12 (663 Views)

Re: How to REALLY clear interface statistics?

The command you are lookiung for is "clear statistics global".  This will persist through logoff it clears all counters for all ports.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.