soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Get the cpu/memory info of a process from the Win32_PerfFormattedData… #13

Closed crystaldust closed 8 years ago

crystaldust commented 8 years ago

All the processes's info including CPU processing time, memory usage(working set, peak working set, etc) can be accessed from the Win32_PerfFormattedData_PerfProc_Process object with WMIC, so it's a good way to get the things by the command:

wmic path Win32_PerfFormattedData_PerfProc_Process WHERE IDProcess=THE_PID get PercentProcessorTime, WorkingSet
soyuka commented 8 years ago

Could you do the PR against the development branch so that I can test it without impacting master?

Thanks!

crystaldust commented 8 years ago

Yes, of course, hope it could help.