监控 .NET 线程

发布于 2024-07-09 04:16:00 字数 223 浏览 8 评论 0原文

有什么方法可以像 VisualVM 对 Java 所做的那样监视/记录 .NET 运行时中的线程交互吗? 我目前没有特定的需求,但我认为很高兴看到应用程序中的所有线程如何交互。

https://visualvm.dev.java.net/images/threads.png

Is there any way to monitor/log thread interactions in the .NET runtime much like VisualVM does for Java? I don't have a specific need at the moment but I think it would be nice to see how all the threads in my application interact.

https://visualvm.dev.java.net/images/threads.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不…忘初心 2024-07-16 04:16:00

我不熟悉 Java 中的 VisualVM...但是...

如果您尝试以编程方式完成此操作...请查看 WMI 性能计数器。 我现在正在和他们一起工作!

WMI 性能计数器的 MSDN 链接

记住 如果您尝试查看性能计数器,请使用 Visual Studio .NET 中的服务器资源管理器。 您可以查看计算机(或给定计算机)上的所有性能计数器及其相关属性。

对于性能计数器值检索,请查看此链接:
用于计数器值检索的 MSDN 链接

有关更改和检索性能计数器的演练值,请查看此链接:
用于更改/检索性能计数器值的 MSDN 链接

如果您不想以编程方式执行此操作,如果您只是想查看 Windows 性能监视器工具 (Perfmon),则必须从控制面板的管理工具菜单(在性能下)调用它....或者.. ..要打开 PerfMon,只需转到“开始”菜单,选择“运行”并输入 perfmon。

这是一个用于可视化监视线程和进程的好工具。 但这不是以编程方式完成的,更多的是出于管理和查看目的,而不是构建供 .NET 应用程序使用/检索的信息/工具。 Perfmon 工具与您帖子中 VisualVM 工具的屏幕截图/图像几乎相同。

以下是 Windows Perfmon 的链接:十大计数器:

Perfmon 链接

希望这可以帮助您找到正确的方向...干杯!

I am unfamiliar with VisualVM in Java....but....

If you are trying to accomplish this programmatically...check out the WMI Performance Counters. I am currently working with them myself!

MSDN Link to WMI Performance Counters

Remember If you are trying see the performance counters, use the server explorer in Visual Studio .NET. You can see all of the performance counters on your machine (or a given machine), and their related properties.

For performance Counter Value retrieval, check out this link:
MSDN link for Counter Value Retrieval

For a walkthrough on Changing and Retrieving Performance Counter Values, check out this link:
MSDN link for Changing/Retrieving Performance Counter Values

If you're not trying to do this programmatically, and if you simply want to view the Windows Performance Monitor tool (Perfmon), you must invoke it from the Administrative Tools menu of the Control Panel (Under Performance)....OR....To open PerfMon, just go to the Start Menu, choose Run and type perfmon.

This is a great tool for visually monitoring threads and processes. This is not done programatically though, and is more for administration and viewing purposes, rather than building the information/tools for a .NET application to use/retrieve. The Perfmon tool is almost identical to the screenshot/image of the VisualVM tool in your post.

Here is a link to Windows Perfmon: The Top Ten Counters:

Perfmon Link

Hopefully this can help put you in the right direction...cheers!

没企图 2024-07-16 04:16:00

.NET 诊断 C# 线程监控应用程序 似乎可以满足您的需要。

编辑:如果您是 C# 新手,您可能需要查看简洁的 wiki < a href="http://en.csharp-online.net/CSharp_FAQ:_What_is_the_difference_ Between_CSharp_and_Java_threads" rel="nofollow noreferrer">专门针对 Java 开发人员。

The .NET Diagnostics C# Thread Monitoring Application appears to do what you need.

Edit: If you're new to C#, there's a neat wiki you may want to check out specifically for Java Developers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文