Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: CPU metrics #14

Closed
carlpett opened this issue Aug 28, 2016 · 8 comments
Closed

Feature: CPU metrics #14

carlpett opened this issue Aug 28, 2016 · 8 comments
Milestone

Comments

@carlpett
Copy link
Collaborator

Possibly relevant WMI class: Win32_PerfRawData_Counters_ProcessorInformation, provides these fields:

Name (socket#+core#)
AverageIdleTime
AverageIdleTime_Base
C1TransitionsPersec
C2TransitionsPersec
C3TransitionsPersec
ClockInterruptsPersec
DPCRate
DPCsQueuedPersec
IdleBreakEventsPersec
InterruptsPersec
ParkingStatus
PercentC1Time
PercentC2Time
PercentC3Time
PercentDPCTime
PercentIdleTime
PercentInterruptTime
PercentofMaximumFrequency
PercentPerformanceLimit
PercentPriorityTime
PercentPrivilegedTime
PercentPrivilegedUtility
PercentPrivilegedUtility_Base
PercentProcessorPerformance
PercentProcessorPerformance_Base
PercentProcessorTime
PercentProcessorUtility
PercentProcessorUtility_Base
PercentUserTime
PerformanceLimitFlags
ProcessorFrequency
ProcessorStateFlags

Haven't found any MSDN documentation of this class, so potentially there might be better ones? It was the only one reported on my test machine, though

@carlpett
Copy link
Collaborator Author

Win32_PerfRawData_PerfOS_Processor might also be a candidate

@martinlindhe
Copy link
Collaborator

Win32_PerfRawData_Counters_ProcessorInformation seems to be undocumented, could only find reference to it in some discussion (google "site:microsoft.com Win32_PerfRawData_Counters_ProcessorInformation") and misc non-microsoft sites.

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/a427da9f-d898-452e-a1df-1d7f913cf346/get-process-cpu-usage?forum=winserverpowershell

@martinlindhe
Copy link
Collaborator

https://msdn.microsoft.com/en-us/library/aa392397(v=vs.85).aspx mentions "Classes derived from Win32_PerfRawData and from Win32_PerfFormattedData must be used with a refresher object.", not sure we currently have ability to probe these using the current wmi lib. (research needed)

@brian-brazil
Copy link
Collaborator

The "refresher object" here is Prometheus.

@martinlindhe
Copy link
Collaborator

martinlindhe commented Aug 29, 2016

Oh :-) guess it seemed more complicated than it is

@brian-brazil
Copy link
Collaborator

Yeah, it's all written from the standpoint that you're writing a realtime console.

@carlpett carlpett added this to the 0.1 milestone Sep 17, 2016
@carlpett carlpett mentioned this issue Sep 17, 2016
4 tasks
@martinlindhe
Copy link
Collaborator

Did we resolve this by merging #26 ?

@carlpett
Copy link
Collaborator Author

Yes, I think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants