【问题标题】:Keyword monitoring in log file in Windows ServerWindows Server 日志文件中的关键字监控
【发布时间】:2013-11-01 21:13:46
【问题描述】:

我想监视 Windows 服务器中的日志(txt)文件,并希望在日志中出现某个关键字时对其执行脚本(以停止 Windows 服务)。

是否有任何工具或脚本可以完成这项任务?谢谢

【问题讨论】:

    标签: windows logging vbscript monitoring tail


    【解决方案1】:

    PA Server Monitor 的Log File Monitor 可以做到这一点。

    【讨论】:

    • 不知道有没有免费的工具可用?
    【解决方案2】:

    您可以每 5 分钟设置一个计划任务并执行此操作。

    findstr /c:"[Fonts]" c:\windows\win.ini
    
    If errorlevel = 1 goto :eof
    
    sc start servicename
    

    寻求帮助(阅读 Dos 6.22 参考中的 Find for exit code [1 found, 2 not found, 3 error])并输入

    findstr /?
    schtasks /?
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-08
      • 2017-07-12
      相关资源
      最近更新 更多