- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。
想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。
2年前关闭。
Improve this question
我正在尝试让主管工作以确保我的队列系统始终在运行。
以下是我从各种来源拼凑起来的步骤:
(以 root 或 super 用户身份运行)
1)
$ easy_install 主管
2)
$ echo_supervisord_conf >/etc/supervisord.conf
3)
$ sudo vi supervisord.conf
4)
将以下内容粘贴到文件末尾:
command=/usr/bin/php/path/to/AppName/artisan --env=production --timeout=240 queue:listen
5)
$ supervisord -c/etc/supervisord.conf
6)
$supervisorctl
7)主管>状态
主管>
它不显示任何内容。
最佳答案
这是我采用的解决方案。 AWS AMI 包括用于安装 Python 应用程序的 pip。下面是设置命令:
$ sudo pip install supervisor
$ echo_supervisord_conf
$ sudo su -
$ echo_supervisord_conf > /etc/supervisord.conf
/etc/init.d/supervisord
#!/bin/bash
#
# supervisord Startup script for the Supervisor process control system
#
# Author: Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
# Jason Koppe <jkoppe@indeed.com> adjusted to read sysconfig,
# use supervisord tools to start/stop, conditionally wait
# for child processes to shutdown, and startup later
# Erwan Queffelec <erwan.queffelec@gmail.com>
# make script LSB-compliant
#
# chkconfig: 345 83 04
# description: Supervisor is a client/server system that allows \
# its users to monitor and control a number of processes on \
# UNIX-like operating systems.
# processname: supervisord
# config: /etc/supervisord.conf
# config: /etc/sysconfig/supervisord
# pidfile: /var/run/supervisord.pid
#
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $all
# Required-Stop: $all
# Short-Description: start and stop Supervisor process control system
# Description: Supervisor is a client/server system that allows
# its users to monitor and control a number of processes on
# UNIX-like operating systems.
### END INIT INFO
# Source function library
. /etc/rc.d/init.d/functions
# Source system settings
if [ -f /etc/sysconfig/supervisord ]; then
. /etc/sysconfig/supervisord
fi
# Path to the supervisorctl script, server binary,
# and short-form for messages.
supervisorctl=/usr/local/bin/supervisorctl
supervisord=${SUPERVISORD-/usr/local/bin/supervisord}
prog=supervisord
pidfile=${PIDFILE-/tmp/supervisord.pid}
lockfile=${LOCKFILE-/var/lock/subsys/supervisord}
STOP_TIMEOUT=${STOP_TIMEOUT-60}
OPTIONS="${OPTIONS--c /etc/supervisord.conf}"
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon --pidfile=${pidfile} $supervisord $OPTIONS
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
touch ${lockfile}
$supervisorctl $OPTIONS status
fi
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc -p ${pidfile} -d ${STOP_TIMEOUT} $supervisord
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -rf ${lockfile} ${pidfile}
}
reload() {
echo -n $"Reloading $prog: "
LSB=1 killproc -p $pidfile $supervisord -HUP
RETVAL=$?
echo
if [ $RETVAL -eq 7 ]; then
failure $"$prog reload"
else
$supervisorctl $OPTIONS status
fi
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p ${pidfile} $supervisord
RETVAL=$?
[ $RETVAL -eq 0 ] && $supervisorctl $OPTIONS status
;;
restart)
restart
;;
condrestart|try-restart)
if status -p ${pidfile} $supervisord >&/dev/null; then
stop
start
fi
;;
force-reload|reload)
reload
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|force-reload|reload}"
RETVAL=2
esac
exit $RETVAL
chmod a+x /etc/init.d/supervisord
ps -fe | grep supervisor
sudo service supervisord start
sudo chkconfig --add supervisord
sudo chkconfig supervisord on
关于amazon-web-services - 在 AWS AMI Linux 服务器上设置 Supervisord,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28702780/
我在 Supervisord 的程序部分使用了环境变量,它们工作得很好: [program:some_prog] command=%(ENV_env_var_name)s/... 我不知道如何在 [s
我们有一个问题,supervisord 无法同时处理 200 多个进程 - 添加更多进程会导致它在启动时死亡。 任何人都对 supervisord 和大量托管流程有任何经验? 最佳答案 想通了 - 这
假设我已经在我的机器上运行了一个 supervisord 进程。如何为 supervisord 添加一个新的服务/进程来监控?例如,假设我有这个简单的 .conf 文件: 运行-suman-daemo
我正在使用Supervisord持续运行一些索引程序。每次运行索引器时,它都会获取一组特定的文档,对它们进行索引,然后结束。然后,该 Supervisord 进程将生成另一个相同的索引器程序,并且该索
我使用 supervisord 作为 Docker 容器的入口点,如 https://docs.docker.com/articles/using_supervisord/ 中所述, 我希望将所有日志
我正在使用 supervisord 来管理 docker 容器中的多个进程。然而,一个进程始终是“主人”,而其他进程是监视和报告进程。如果主进程在 startretries 后无法启动,我想做的是终止
移至使用 supervisod作为过程控制系统。 我有一个 长并在我的 supervisord.conf 中重复 ENVIRONMENT 配置,为很多进程设置很多环境变量。我需要在一个地方定义它并重用
我正在尝试编写一个 supervisord.conf 来启动一个 django fastcgi 进程。唯一的问题是,当我执行我的 fastcgi 命令时,它会生成一个 fastcgi 进程并立即在主管
程序优先级是否决定启动顺序?即 baz然后 bar ? 如果我有: [group:foo] programs=bar,baz 和: [program:bar] command=/path/to/bar
问题 我无法让主管正确跟踪正在运行的进程。我正在运行3.0a8版本。 这是我的supervisor.conf文件 [inet_http_server] port=9011 [supervisord]
有没有办法从内到外重启supervisor? 我正在通过主管运行脚本,以更新树莓派上的 html 和视频。但在某些时候,我必须在主管上运行的 2 个进程之间切换。所以我将必须结束的进程的配置重命名为“
我有 supervisord安装在我的 Ubuntu 10.04 上,它持续运行一个 Java 进程,并且应该在它以某种方式死亡或崩溃时修复(重新加载)进程。 在我的 htop我向那个 发送 SIGK
我正在使用 supervisord 来管理一堆进程。是否可以使用 supervisorctl 向这些进程发送任意信号而不实际停止它们并设置停止信号? 最佳答案 直到 3.2.0(2015 年 11 月
我有一个开发服务器,我经常通过 Git 推送代码更改。每次推送后,我需要手动登录服务器并重新启动主管进程。 有没有办法让 Supervisor 监视文件系统目录的更改并在更改时重新加载进程? 最佳答案
我有一组由 supervisord 管理的程序。有一个程序,我们称它为 myprogram,我需要运行 15 个实例。使用 numprocs 参数很容易。 有没有办法将进程号作为命令行参数传递给程序,
可以说我在主管中有两个程序。有没有一种方法可以有条件地运行第一个程序(后台进程)而不必将其移动到单独的脚本文件中? [supervisord] nodaemon=true logfile=/tmp/s
当您使用supervisor启动流程时,它处于“正在启动”状态,如果遇到麻烦,并且将自动重新启动设置为true,那么它将进入“退避”状态。 我不想等待尝试“startretries”,我想使用supe
是否可以在supervisord启动脚本中使用本地主机名?我需要它将 jmx 主机传递给 java 程序。示例: command=HOSTNAME=foo.bar /usr/local/rvm/bin
我正在使用supervisord运行一些进程,名为process1、process2、...、process8。如果我想重新启动进程{1-4},我该如何使用supervisorctl来做到这一点? 最
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我是一名优秀的程序员,十分优秀!