磁盘空间不足警报,发送电子邮件 Windows 2003 Server PerfMon 警报

发布于 2024-07-08 10:04:57 字数 1477 浏览 6 评论 0原文

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

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

发布评论

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

评论(2

遇到 2024-07-15 10:04:57

难道你的程序没有命令行参数吗?
我在 http://support.microsoft.com/kb/324752/en 上找到了以下内容-我们

当发生警报时,该服务会创建一个进程并运行指定的命令文件。 该服务还将您定义的任何命令行参数复制到用于运行该文件的命令行。 单击“命令行参数”,然后单击以选中相应的复选框以包含程序运行时所需的参数。

注意您必须至少选择一个命令行参数,否则程序将无法运行。 (无论您选择什么程序,都是如此。)

您的 C# 应用程序中是否有某种异常处理/日志记录? 你从中得到什么吗?

您能否将 C# 应用程序调用放入批处理文件中并从警报中启动? 如果您

echo %date% %time% > log.txt

在批处理文件的开头添加类似的内容,您可以看到它是否已启动。

Could it be that you have no command line arguments for your program?
I found the following on http://support.microsoft.com/kb/324752/en-us

When an alert occurs, the service creates a process and runs the specified command file. The service also copies any command-line arguments you define to the command line that is used to run the file. Click Command Line Arguments, and then click to select the appropriate check boxes to include the arguments that you want when the program is run.

Note You must select at least one command-line argument or the program will not run. (This is true regardless of what program you have selected.)

Do you have some kind if exception handling/logging in your C# app? Do you get anything from it?

Could you put your C# app call in a batch file and start that from the alert? If you add something like

echo %date% %time% > log.txt

at the start of your batch file you could see if it started at all.

小糖芽 2024-07-15 10:04:57

您是否在警报属性中设置了运行方式字段? 如果没有,您的程序将作为 LocalService 运行,它没有网络访问权限(除其他外)。

尝试将其设置为您能够验证程序是否正常运行的用户帐户。

Did you set the Run As field in the alert properties? If not, your program is being run as a LocalService, which does not have network access (among other things).

Try setting it to a user account under which you were able to verify that your program works correctly.

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