如何在.Net Core(Linux)中测量进程的CPU使用率和内存

时间:2019-01-16 10:44:25

标签: c# linux .net-core

PerformanceCounter类通常用于通过获取CPU使用率和内存来分析进程。

但是,PerformanceCounter在Linux中不起作用。我无法将我的项目从.NET Core更改为.NET标准或.NET Framework

我已经查看了该帖子:How to get CPU Usage and Virtual Memory for a process in .Net Core?

但是我不能在工作中使用Mono。

某些网站(https://stackify.com/performance-counters-net-core/)透露.NET Core中的EventCounter可以完成这项工作,但另一个论坛https://gitter.im/dotnet/coreclr/archives/2017/02/08已确认它不起作用。

如何在不使用PerformanceCounter的情况下测量.NET Core中的CPU使用率和内存?

0 个答案:

没有答案
相关问题