Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Windows中监视进程_Windows_Windows Services_Monitoring_Process - Fatal编程技术网

在Windows中监视进程

在Windows中监视进程,windows,windows-services,monitoring,process,Windows,Windows Services,Monitoring,Process,如果Windows进程未运行,如何监视并启动它?我希望有一个Windows服务启动,可以处理多个进程 编辑: 希望有一个现成的库/组件可以使用,只需调整或配置,而不必从头开始实现。我知道在*nix的世界里有两个流行的软件包:god和monit。您可以创建一个只监视当前进程列表的Windows服务 提供查看当前正在运行的进程的方法。有许多API可用于启动新流程,包括: 系统() _行政长官() WinExec() ShellExecute()/ShellExecuteEx() CreatePro

如果Windows进程未运行,如何监视并启动它?我希望有一个Windows服务启动,可以处理多个进程

编辑:
希望有一个现成的库/组件可以使用,只需调整或配置,而不必从头开始实现。我知道在*nix的世界里有两个流行的软件包:god和monit。

您可以创建一个只监视当前进程列表的Windows服务

提供查看当前正在运行的进程的方法。有许多API可用于启动新流程,包括:

  • 系统()
  • _行政长官()
  • WinExec()
  • ShellExecute()/ShellExecuteEx()
  • CreateProcess()
  • CreateProcessAsUser()
  • CreateProcessWithLogonW()

如果您使用的是其他语言/框架,他们通常会围绕上述内容提供自己的包装。

您知道有什么已经做到了这一点(而不是重新发明轮子)吗?不知道。但是,用.NET语言实现这一点非常简单-您可以使用