Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Unified Computing UCS Manager Developer Center
Overview
UCS Platform Emulator
UCS Manager XML Schema
UCS XML Schema
UCS Automation Tool (goUCS)
Server and Host Management API
UCS Standalone C-Series Servers
Cisco Standalone C-Series CIMC XML API
goUCS Automation Tool
Cisco Standalone C-Series HUU Utilities
Documentation
Community
Testing
UCS Management Ecosystem
UCS Platform Emulator
Management with HP Software
Management with Microsoft Software
Microsoft System Center
Cisco UCS PowerTool for UCSM
SDK
System Management Resources
Altiris
UCS Management with VMware Software
OpenStack
UCS Labs
Labs Wiki
VM-FEX
Overview
Flexpod
Overview
Getting Started
Resources
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to Microsoft Discussions
PowerTool: How to reset all vNICs stats at one time?
Threads [ Previous |
Next
]
Tsu-Sheng Tsao
Posts:
7
Join Date:
8/26/10
Recent Posts
PowerTool: How to reset all vNICs stats at one time?
powershell
ucsm
powertool
Answer
4/8/12 8:31 AM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
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!
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Bhaskar Jayakrishnan
Posts:
18
Join Date:
6/30/11
Recent Posts
RE: PowerTool: How to reset all vNICs stats at one time?
Answer
4/10/12 7:58 AM as a reply to Tsu-Sheng Tsao.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
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
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Tsu-Sheng Tsao
Posts:
7
Join Date:
8/26/10
Recent Posts
RE: PowerTool: How to reset all vNICs stats at one time?
Answer
4/10/12 8:16 AM as a reply to Bhaskar Jayakrishnan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Bhaskar, thanks.
I will try that.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Justin Turver
Posts:
1
Join Date:
9/21/12
Recent Posts
RE: PowerTool: How to reset all vNICs stats at one time?
Answer
5/5/13 5:28 AM as a reply to Tsu-Sheng Tsao.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
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
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top