cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

PowerTool: How to reset all vNICs stats at one time?

101
Views
0
Helpful
0
Comments
Advisor
This document was generated from CDN thread

Created by: Tsu-Sheng Tsao on 08-04-2012 03:30:07 AM
I am trying to collect all vNICs stats and would like to rest Average, Max, Min and Delta first.
What method should I use to clear those counters?


Thanks in advance!

Subject: RE: PowerTool: How to reset all vNICs stats at one time?
Replied by: Bhaskar Jayakrishnan on 10-04-2012 02:58:51 AM
Tsu-Sheng,


We do not have a custom cmdlet to do this and plan to introduce one shortly. Meanwhile, you can try the following workaround:

Function ClearStats()
{
    param(
    [parameter(Mandatory=${true})][Cisco.Ucs.ManagedObject]${mo}
    )
   
    $dn = New-Object "Cisco.Ucs.Dn"
    $dn.Value = $mo.Dn;
   
    $dnSet = New-Object "Cisco.Ucs.DnSet"
    $dnSet.AddChild($dn);
     
    [Cisco.Ucs.MethodFactory]::StatsClearInterval($mo.GetHandle(), $dnSet, $null)
}


Sample Usage:
Get-UcsEtherTxStats | % { ClearStats $_ }


Essentially, you need to pass the statistics object in which *Max,*Min,*Avg values need to be cleared to the ClearStats function.

Thanks,
- bhaskar

Subject: RE: PowerTool: How to reset all vNICs stats at one time?
Replied by: Tsu-Sheng Tsao on 10-04-2012 03:16:11 AM
Bhaskar, thanks.
I will try that.

Subject: RE: PowerTool: How to reset all vNICs stats at one time?
Replied by: Justin Turver on 05-05-2013 12:28:18 AM
Hi
We have a monitoring tool that queries UCS error and pause stats, and records them as a heat map. It uses the "Value" field as opposed to Avg, Min, and Max because we want to see anything that has a history of faults over time. "Delta" values do not persist for long enough. However, once the underlying cause for a fault has been resolved, the tool still reports faults becuase it reads the "Value" field (for e.g. Error stats - Fcs errors). Is there a way to reset the "Value" field as opposed to Avg, Max, Min and Delta?
Many thanks
Justin
CreatePlease to create content
This widget could not be displayed.