Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.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
Linux 蓝丸的暴发户跟踪错误PID_Linux_Ubuntu_Upstart_Bluepill - Fatal编程技术网

Linux 蓝丸的暴发户跟踪错误PID

Linux 蓝丸的暴发户跟踪错误PID,linux,ubuntu,upstart,bluepill,Linux,Ubuntu,Upstart,Bluepill,我有bluepill设置来监控延迟的工作流程 使用Ubuntu 12.04 我正在使用Ubuntu的upstart启动并监控bluepill服务本身。我的upstart配置如下(/etc/init/bluepill.conf) bluepill流程的PID在此为1154。但是,upstart似乎在跟踪错误的PID $ initctl status bluepill bluepill start/running, process 990 如果我使用kill-9强制杀死bluepill,这将阻止b

我有bluepill设置来监控延迟的工作流程

使用Ubuntu 12.04

我正在使用Ubuntu的upstart启动并监控bluepill服务本身。我的upstart配置如下(
/etc/init/bluepill.conf

bluepill流程的PID在此为1154。但是,
upstart
似乎在跟踪错误的PID

$ initctl status bluepill
bluepill start/running, process 990
如果我使用
kill-9
强制杀死bluepill,这将阻止bluepill进程重新启动

此外,我认为由于跟踪错误的PID,重新启动/关闭只是挂起,每次我都必须硬重置机器


这里可能有什么问题?

很明显,upstart跟踪的PID错误。从bluepill源代码来看,它使用守护进程gem来进行守护,而守护进程又会分叉两次。因此upstart配置中的
expect daemon
应该跟踪正确的PID——但您已经尝试过了

如果可能的话,您应该在前台运行bluepill,而不要在upstart配置中使用任何
expect

从bluepill文档中:

Bluepill.application("app_name", :foreground => true) do |app|
  # ...
end
将在前台运行bluepill

$ initctl status bluepill
bluepill start/running, process 990
Bluepill.application("app_name", :foreground => true) do |app|
  # ...
end