How to get Free Memory and CPU usage without PerformanceCounter?

拟墨画扇 提交于 2019-12-02 04:19:18

Would you be able to use native win32 API calls? If so then they would provide the information your after.

See the following article: CodeProject: Calling API functions using C#

To get the Processor usage without performance counter using WMI, Look at win32_Processor class. and if you want to see the total memory available use GC.GetTotalMemory - Process.GetCurrentProcess().PrivateMemorySize64;

If you are using .net 4 and you are only interested in what your current app domain is doing then you can use this:

this.AppDomain.MonitoringTotalProcessorTime

See MSDN Documentation MonitoringTotalProcessorTime

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