Answered by:
Getting realtime metric values with the .NET SDK

Question
-
In powershell, I can do:
Add-PSSnapin microsoft.hpc
get-hpcmetricvalue -Scheduler <myCluster'sName>
And I get all of the realtime CPU/Network/Disk usage from each node in the cluster.
How can I get this info through the .NET SDK ?
Thanks.Wednesday, March 4, 2009 5:59 PM
Answers
-
1. the CPU/Network/Disk usage you get with "get-hpcmetricvalue" are not realtime, the default interval for each metric is "1min". you can export-hpcmetric to see the interval setting for one metric, change the interval in exported xml file, then change this setting with import-hpcmetric command. however, the minimun interval is 1min, you cannot set this to a value less than 1min.
2. if you are an cluster admin, you can query realtime perfmance counter values with .NET api. pls. refer to http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountermanager.performancecountermanager(vs.80).aspx for more information.- Marked as answer by Don Pattee Thursday, June 25, 2009 11:29 PM
Tuesday, April 7, 2009 9:15 AM
All replies
-
You can run those cmdlets with correct pipleline to filter our the desired value in your C# code.Saturday, April 4, 2009 5:13 AM
-
1. the CPU/Network/Disk usage you get with "get-hpcmetricvalue" are not realtime, the default interval for each metric is "1min". you can export-hpcmetric to see the interval setting for one metric, change the interval in exported xml file, then change this setting with import-hpcmetric command. however, the minimun interval is 1min, you cannot set this to a value less than 1min.
2. if you are an cluster admin, you can query realtime perfmance counter values with .NET api. pls. refer to http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountermanager.performancecountermanager(vs.80).aspx for more information.- Marked as answer by Don Pattee Thursday, June 25, 2009 11:29 PM
Tuesday, April 7, 2009 9:15 AM -
Errr, one correction: Get-HpcMetricValue IS realtime. And what's more Get-HpcMetricValue accepts NodeName, (Metric's) Name and Counter (perf counter instance name) as parameters, so you can get perf counter value for specific node and/or perf counter instance.Tuesday, June 23, 2009 2:33 AM