监控其他程序的程序
编辑:::
我想知道是否有人曾经对此进行过思考或对此有一些想法。像你们大多数人一样,我同时运行多个程序。我在每个程序中都设置了警报方法,以便在程序停止或遇到错误时收到电子邮件警报。现在,其中一些程序使用 Visual Studio TaskFactory 类来创建并行任务,并且我已经编写了异常处理代码来处理错误。但我确信你们中的一些人遇到过程序/进程因某种原因停止的情况,除非您经常坐在电脑前检查某些日志文件,否则无法知道程序当时是否正在运行或不是。 因此,在许多人回答...“任务管理器”之前...我想要一些聪明的想法,让您的程序在卡在某个进程中或因异常处理程序未捕获的错误而失败时通知您...如果没有人遇到此类情况,那么我想我就会忘记它。有没有办法使用 Visual Studio、VB/C# 与任务管理器进程进行交互?
EDIT:::
I wonder if anyone has ever given this some thought or have some ideas about it. Like most of you I have multiple programs running at the same time. I have set up alert methods in each such that I get email alerts when a program stops or runs into errors. Now some of these programs use visual studio TaskFactory class to create parallel tasks and I have coded exception handling to handle errors. But I am sure some of you have encountered instances where a program /process will halt for some reason and unless you are constantly sitting at your pc and checking some log file, there is no way to know if the program is running at that time or not.
so before many answer with...."Task Manager"...I wanted some intelligent ideas on ways of having your program notify you when it is stuck in some process or fails with some error an exception handler has not caught...if nobody runs into these types of cases then I guess I will just forget about it. Is there a way to interact with the task manager processes using visual studio, vb/C#?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这与 Windows 中包含的基本任务管理器有何不同?
如果您想制定自己的指标来监控,可以创建性能计数器:http://www.blackwasp .co.uk/SetPerformanceCounters.aspx
How does this differ from the basic Task Manager included in Windows?
If you want to make your own metrics to monitor you can create Performance Counters: http://www.blackwasp.co.uk/SetPerformanceCounters.aspx
你是说任务管理器吗?在 Windows 中按 Ctrl+Shift+Esc。
Do you mean Task Manager? Ctrl+Shift+Esc in Windows.