calamari Posted July 25, 2012 Posted July 25, 2012 So I'm running the following powershell script to monitor processor useage over a five minute interval on multiple servers, and on one of them I get one to four samples before it errors out with the error below. Get-Counter -Counter “\Processor(_Total)\% Processor Time” -SampleInterval 1 -MaxSamples 300 | Select -ExpandProperty CounterSamples | Select CookedValue | Out-File -Append $loglocation\results-$name-$date.csv Error: Get-Counter : A counter with a negative denominator value was detected. At line:1 char:12 + get-counter <<<< -counter "\Processor(_Total)\% Processor Time" -sampleinterval 1 -maxsamples 100 | select -expandproperty countersamples | select cookedvalue | Out-File -Append $loglocation\results-$name-$date.csv + CategoryInfo : InvalidResult: ( [Get-Counter], Exception + FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand This is occurring on the only 2k8 R2 server in the group being monitored, the script runs fine on 2k3, 2k3 R2, and 2k8 servers. The processor is a Xeon E31230 3.2 GHz. Anyone have any thoughts on why this might be occuring?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now