开发者

jconsole equivalent for .Net?

开发者 https://www.devze.com 2023-01-28 13:44 出处:网络
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:

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 product开发者_开发问答ion.
  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?


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.


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".

0

精彩评论

暂无评论...
验证码 换一张
取 消