“看门狗”编程资源 对于一个复杂的系统
我必须编写一个服务来监视复杂的系统。 我在 Google 上搜索了一些文章,但没有找到我想要的内容。 有人有任何好的资源来编写监控复杂系统的服务吗?
I have to write a service to monitor a complex system. I searched Google for some articles, but didn't find exactly what I was looking for. Does anyone have any good resources for writing a service to monitor a complex system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在询问 健康监测。 以下是来自 MSDN 的有关内置运行状况监控功能的在线文档在.Net中。 除此之外,您还可以定义审核特定事件的规则,例如应用程序中的错误或失败的登录尝试。
I think you're asking about health monitoring. Here's the online documentation from MSDN on the built-in health monitoring capabilities in .Net. Among other things, this lets you define rules for auditing specific events such as errors in the application or failed log-in attempts.
我最喜欢的方法是从监视您要监视的应用程序的应用程序发送 WM_COPYDATA 消息。 发送消息(有超时)并查看需要多长时间才能获得响应。 当该响应超出带外时,则终止该过程。
我长期以来一直使用 这段代码作为执行此操作的基础。 我不知道它是从哪里开始的,但向第一个写它的人致敬。
My favorite method consists of sending WM_COPYDATA messages from an application that watches the application you want to monitor. Send the message (with a timeout) and see how long it takes to get a response. When that respose goes out-of-band, then terminate the process.
I have used this block of code as a base for doing this for a long time. I don't know where it got started, but kudos to whoever first wrote it.