确定monit进程的组

时间:2014-07-03 23:02:43

标签: chef monit

我正在使用厨师和monit将这样一群工人分拆出来:

check process delayed_job
  with pidfile /srv/www/blog/shared/pids/delayed_job.pid
  start program = "/bin/su - deploy -c 'cd /srv/www/blog/current && RAILS_ENV=production bundle exec script/delayed_job start
  stop  program = "/bin/su - deploy -c 'cd /srv/www/blog/current && RAILS_ENV=production bundle exec script/delayed_job stop
  group delayed_job_blog

然后当我sudo monit status时,我得到以下内容:

Process 'delayed_job'
  status                            running
  monitoring status                 monitored
  pid                               5758
  parent pid                        1
  uptime                            7m 
  children                          0
  memory kilobytes                  64648
  memory kilobytes total            64648
  memory percent                    6.3%
  memory percent total              6.3%
  cpu percent                       0.0%
  cpu percent total                 0.0%
  data collected                    Thu Jul  3 22:57:38 2014

但是,该组未列出。无论如何,在没有停止和启动过程的情况下,确定组是否已正确设置?

1 个答案:

答案 0 :(得分:0)

仅检查组'delayed_job_blog'是否已正确设置而不重新启动, 您可以运行:

sudo monit -g delayed_job_blog status

如果看到如下输出:

Service group 'delayed_job_blog' not found

则该组的设置不正确。