.NET Remoting 列出所有服务器激活的对象

发布于 2024-09-11 15:51:13 字数 291 浏览 3 评论 0原文

我有一种感觉,我们的 .NET 远程处理服务正在被挂在我们服务器上的对象实例所淹没。

我现在无法更改代码以添加额外的日志记录,因为这是已部署的生产实例。但是,我们确实在应用程序中内置了一个代码控制台,它允许我们执行服务器应用程序域中的任何代码。

因此,我正在寻找一种方法来获取当前存在于我们的开放远程处理通道中的所有远程处理激活 (MarshalByRef) 对象的列表(或计数)。同样有用的是所有打开的客户端远程连接到我们服务器的 Tcp 通道的列表/计数。

谁能告诉我如何在代码中做到这一点?

谢谢!

I have a feeling that our .NET remoting services are getting overrun by objects instances that are hanging around on our server.

I cannot change code the to add additional logging right now, as this is a deployed production instance. We do, however have a code console built into the application that will let us execute any code in the server's app domain.

So, I'm looking for a way of getting a list (or a count) of all remoting activated (MarshalByRef) objects that currently exist for our open remoting channels. Also useful would be a list/count of all open client remoting Tcp channels to our server.

Can anyone tell me how to do this in code?

Thanks!

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

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

发布评论

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

评论(1

陈年往事 2024-09-18 15:51:13

有一些 .NET CLR Remoting 性能计数器可能会有所帮助:

.NET CLR Remoting

  • Channels
  • Context Proxies
  • Context-Bound Classes Loaded
  • Context-Bound Objects Alloc / sec
  • Contexts
  • Remote Calls/sec
  • Total Remote Calls

老实说,不确定是否有任何对您有帮助特殊情况,但需要研究一下...

您可以使用 perfmon.exe 来查看它们,但如果您想从 C# 执行此操作,也相当容易。

There are a few .NET CLR Remoting performance counters that might be helpful:

.NET CLR Remoting

  • Channels
  • Context Proxies
  • Context-Bound Classes Loaded
  • Context-Bound Objects Alloc / sec
  • Contexts
  • Remote Calls/sec
  • Total Remote Calls

Honestly not sure if any would help your particular case, but something to look into...

You can just use perfmon.exe to view them, but if you want to do it from C#, it is fairly easy as well.

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