Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Supervisor event listener for configuring cgroups with processes managed by supervisor

Project Description

## supervisor_cgroups

Event listener (~plugin) for [supervisor](https://github.com/Supervisor/supervisor) that enables tying supervisor processes to cgroup hierarchy. Intended to be used as a replacement for [cgrules.conf](http://linux.die.net/man/5/cgrules.conf).

### Install and confugure

pip install supervisor_cgroups

Add an event listener to supervisor configuration files (e.g. to /etc/supervisor/conf.d/cgroups.conf):

[eventlistener:cgroups] command=supervisor_cgroups_listen –prefix CGROUPS_PREFIX PROCESS_NAME1@HIERARCHY1:GROUP1 PROCESS_NAME2@HIERARCHY2:GROUP2 etc… events=EVENT autostart=true autorestart=true

where PROCESS_NAME is a name of a process known to supervisor (as in [program:***]), HIERARCHY is a [cgroups hierarchy](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-Creating_a_Hierarchy_and_Attaching_Subsystems.html), GROUP stands for [control group](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-Creating_Cgroups.html) and CGROUPS_PREFIX is an optional path prefix where you prefer to store your cgroups hierarchies (/cgroup by default). All of these are supposed to be configured beforehand (with [cgconfig.conf](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch-Using_Control_Groups.html#The_cgconfig.conf_File) or otherwise).

### Known pitfails

Keep in mind that due to [a bug in supervisor](https://github.com/Supervisor/supervisor/issues/339) you have to reload supervisor to update the configuration; supervisorctl update won’t do.

Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
supervisor_cgroups-0.0.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Sep 2, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting