Hi, is it possible to spool the data in a file on Windows? we often get peaks around 11-11:30 am $serverName = $env:COMPUTERNAME $Counters = @( ("\\$serverName" + "\Process(sqlservr*)\% User Time"), ("\\$serverName" + "\Process(sqlservr*)\% Privileged Time") ) Get-Counter -Counter $Counters -MaxSamples 30 | ForEach { $_.CounterSamples | ForEach { [pscustomobject]@{ TimeStamp = $_.TimeStamp Path = $_.Path Value = ([Math]::Round($_.CookedValue, 3)) } Start-Sleep -s 2 } } Thanks!
Hello for this you can just start collecting perfmon logs for CPU utilization as below: ============== Logman.exe create counter PerfLog-Short -o "C:\temp\%ComputerName%_PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 500 -c "\Process(*)\*" -si 00:00:01 ============== THe above keeps running and updating when it reaches size limit which is 500MB this case
Hello Everyone. According to requests of some of you guys, prepared this session. I hope you find this useful. Sorry for being a little late!!
Do not forget to refer to recommended sessions to fully master this session!
Great session, very useful. Thank you so much
Glad it was helpful!
Excellent demonstration
Happy that you like it🙂
Hi,
is it possible to spool the data in a file on Windows? we often get peaks around 11-11:30 am
$serverName = $env:COMPUTERNAME
$Counters = @(
("\\$serverName" + "\Process(sqlservr*)\% User Time"), ("\\$serverName" + "\Process(sqlservr*)\% Privileged Time")
)
Get-Counter -Counter $Counters -MaxSamples 30 | ForEach {
$_.CounterSamples | ForEach {
[pscustomobject]@{
TimeStamp = $_.TimeStamp
Path = $_.Path
Value = ([Math]::Round($_.CookedValue, 3))
}
Start-Sleep -s 2
}
}
Thanks!
Hello for this you can just start collecting perfmon logs for CPU utilization as below:
==============
Logman.exe create counter PerfLog-Short -o "C:\temp\%ComputerName%_PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 500 -c "\Process(*)\*" -si 00:00:01
==============
THe above keeps running and updating when it reaches size limit which is 500MB this case
Very good vudeo
Thank you :)