What are the possibillities to get overall CPU percentage usage

≯℡__Kan透↙ 提交于 2019-12-07 12:48:07

问题


I have the following question:

In UWP, how can we get an overall CPU percentage usage, RAM usage,free RAM, Running process, etc? It's required for task manager in UWP.


回答1:


Hi after doing some looking it doesn't seem as if you can get the device CPU, RAM and Free Ram or the Running Processes. You can get the CPU, memory as well as the memory limits for an application.

You can get these through the following ways:

RAM: This is accessed through the MemoryManager Class

MemoryManager.AppMemoryUsage 

And there are some other static members that will help you.

CPU: As for CPU this is retrieved using - Windows.System.Diagnostics.ProcessCpuUsage 



来源:https://stackoverflow.com/questions/37959610/what-are-the-possibillities-to-get-overall-cpu-percentage-usage

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!