.Net 的 jconsole 等效项?

发布于 2024-10-05 09:00:46 字数 286 浏览 4 评论 0原文

我正在寻找一个您可以链接到的 DLL,它将为您的 .Net 应用程序提供相当于 jconsole 的分析能力。具体来说,我的想象是这样的:

  1. 您将一个 DLL 添加到您的项目中
  2. 您调用一些 init 方法
  3. 这公开了一组端点(Web、TCP、命名管道等)。
  4. 这不会影响应用程序的性能,因此您可以在生产中运行它。
  5. 当遇到麻烦时,您可以连接到端点并进行分析。你可以看到GC根,什么占用了内存(保留集),触发GC,...

有这样的东西吗?

I'm looking for a DLL you could link to, that will give your .Net app profiling abilities equivalent to jconsole. Specifically, what I imagine is something like this:

  1. You add a DLL to your project
  2. You call some init method
  3. This exposes a set of endpoints (web, TCP, named pipes, whatever).
  4. This doesn't hamper the performance of your application, so you can run with it in production.
  5. When in trouble, you connect to the endpoints, and profile. You can see GC roots, what's taking up memory (retained sets), trigger GC, ...

Is there something like this?

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

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

发布评论

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

评论(2

妄司 2024-10-12 09:00:46

操作:
确实没有。

西蒙:
Jconsole 是 java 和 .net 之间真正区别的一个侧面争论。 Java 很容易向用户呈现 .net 混淆的信息。也许是因为它们不同的意识形态和目标,java被设计为一个通用的虚拟环境,可以在任何主机操作系统上运行,而.net主要是为Windows设计的。

.Net 进程并不是为了在模糊的真空中运行而设计的。它们作为组件服务或 iis 的一部分运行,并且在 Windows 上运行,因此虚拟环境没有提供远程监控的规定,因为您将在一定程度上免于使用 wmi。

Java 不是这样工作的,因为 java 无法对底层操作系统或它将提供什么信息做出任何假设,而且 java 所做的任何事情都必须对所有系统都平等地完成。因此,java 向用户提供了大量有关其内存和线程活动的数据,并提供了用于处理和发现用户代码 (mbean) 中的托管对象的基础结构。 Jconsole 和 jvisualvm 允许用户远程连接到 java 进程(本地或通过网络使用 jmx,尽管 jmx 需要一个标志在目标 java 进程上处于活动状态),然后他们可以查看所有这些数据并浏览所有可用的数据mbeans。最重要的是,所有这些都是核心功能,并且程序都是免费的。

.Net flat out 没有这些。开发人员从一开始就需要将远程管理构建到他们的应用程序代码中,并且没有一个方便的查看器可以帮助用户发现甚至存在哪些管理对象。

此外,Java 代码可以轻松地逆向源,重新构建到项目中,然后使用远程断点针对生产系统进行调试。 .net 可以做到这一点,但它们肯定不会让它变得容易做到。

OP:
There really isn't.

Simon:
Jconsole is a side argument to what is really the difference between java and .net. Java readily presents to the user information which .net obfuscates. Perhaps because of their differing ideologies and goals, java is designed to be a common virtual environment that operates on any host os where .net is principally designed with windows in mind.

.Net processes aren't designed to run in an ambiguous vacuum; they run as component services or parts of iis, and they run on windows, so the virtual environment makes no provisions to provide for remote monitoring because you'll get some degree of that free from wmi.

Java doesn't work that way, because java can't make any assumptions about the underlying os or what information it will provide, and whatever java does must be done equally for all systems. So java offers an enormous amount of data about its memory and thread activity to the user, and provides an infrastructure for handling and discovering managed objects in user code (mbeans). Jconsole and jvisualvm allow the user to remote connect to a java process (either locally or over a network with jmx, although jmx requires a flag to be active on the target java process), and then they can see all this data and browse all available mbeans. On top of that, all of this is core functionality and the programs are free.

.Net flat out doesn't have any of this. It's on the developer from the very onset to build remote management into their application code, and there isn't a convenient viewer that helps users discover what management objects even exist.

Further, java code can be trivially reversed back to source, reconstituted into a project, and then debugged with remote breakpoints against a production system. That much is possible with .net but they certainly don't make it easy to do.

孤独难免 2024-10-12 09:00:46

您是否看过 .NET Framework 2.0 的 CLR 探查器

作为一个 .NET 人,或者试图成为 -:) 我不确定是否与 jconsole 完全比较,但您可以分析事物。您可以通过谷歌搜索“CLR 内存分析器”或“.NET 分析器”找到其他商业工具。

Have you looked at the CLR Profiler for the .NET Framework 2.0

Being a .NET man, or trying to be -:) I'm not sure compares exactly with jconsole, but you can profile things. There are other commercial tools that you can find googling on "CLR memory profiler" or ".NET profiler".

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