美文网首页
Python3中使用circus守护进程

Python3中使用circus守护进程

作者: 艾泽拉丝_傅小羊 | 来源:发表于2018-08-21 17:47 被阅读0次

Python3中使用circus守护进程(Daemon,替代python2中supervisor的功能)

1、安装环境

    On CentOS systems: 

    $ sudo yum install libzmq-dev libevent-dev python-dev python-virtualenv

2、创建环境目录

    Create a virtualenv and install circuscircus-web and chaussette in it 

    $ virtualenv /tmp/circus

    $ cd /tmp/circus

    $ bin/pip install circus

    $ bin/pip install circus-web

    $ bin/pip install chaussette

3、进入/tmp/circus

4、创建circus.ini配置文件,并写入以下内容(本次运行的程序内容)

    [watcher:myprogram]

    cmd = python path/to/your/program

5、使用netstat -ano | grep 5000查看(当前pngserver.py开的是5000端口)

6、其他内容:

    使用 circusctl shell 命令查看运行状态:

    $ bin/circusctl

    circusctl 0.7.1

    circusd-stats: active

    (circusctl)

7、You get into an interactive shell. Type help to get all commands:

(circusctl) help

8、参考文档

初识Circus:http://hbin.me/blog/2015/05/22/circus-tutorial/

Installing Circus:https://circus.readthedocs.io/en/latest/installation/

相关文章

  • Python3中使用circus守护进程

    Python3中使用circus守护进程(Daemon,替代python2中supervisor的功能) 1、安装...

  • Circus入门教程

    Circus是与supervisor类似的进程监控工具,它也是使用Python编写的。 下面我们使用circus来...

  • 进程守护进程

    什么是守护进程?Linux 的大多数服务器就是用守护进程实现的,使用ps -axj可以查看守护进程: 守护进程基本...

  • 使用supervisor守护celery进程

    使用supervisor守护celery进程 系统:ubuntu 16.10celery 无法自己守护进程,那么我...

  • 聊聊守护进程这点事

    前言 我们经常使用守护进程,却不是很清楚其原理。本文就来聊下什么是守护进程,如何一步一步使用代码来实现守护进程。 ...

  • 用Redis做一个消息队列

    PHP文件使用redis调用方法,操作入队列,守护进程文件中,使用redis方法操作出队列,然后执行业务逻辑 守护...

  • circus进程管理工具

    Circus是一个Python程序,用来监控和控制进程和套接字。Circus可以通过命令行接口、web接口或者以编...

  • APUE读书笔记-13守护进程(5)

    6、守护进程遵循的一些标准 Unix上面的守护进程,一般会遵循如下的通用标准: 如果守护进程使用锁文件,那么锁文件...

  • 多进程

    Multiprocessing库里有Process 守护进程 在多进程中,同样存在守护进程的概念,如果一个进程被设...

  • 进程守护工具对比方案

    进程守护工具调研 调研目标 支持进程守护 针对健康检查接口守护 调研工具 部分特性对比: 由上特性对比排除使用sy...

网友评论

      本文标题:Python3中使用circus守护进程

      本文链接:https://www.haomeiwen.com/subject/nnvjiftx.html