.NET Remoting 列出所有服务器激活的对象
我有一种感觉,我们的 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一些 .NET CLR Remoting 性能计数器可能会有所帮助:
.NET CLR Remoting
老实说,不确定是否有任何对您有帮助特殊情况,但需要研究一下...
您可以使用 perfmon.exe 来查看它们,但如果您想从 C# 执行此操作,也相当容易。
There are a few .NET CLR Remoting performance counters that might be helpful:
.NET CLR Remoting
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.