Skip to main content

cgroupy is a python module that provides a simple intrface for managing cgroups

Project description

cgroupy

cgroupy is a python module that provides a simple intrface for managing cgroups

Installation

You can install cgroupy using pip:

pip install cgroupy

Usage

>>> from cgroupy import cgroup
>>> c = cgroup(1000,1000,'test')
>>> c.setup()
>>> c.execute('sleep 100', join=False)
[]
>>> c.execute('sleep 100', join=False)
[]
>>> c.tasks
{'8177', '8181'}
>>> c.teardown()

with syntax is also supported for automated setup and teardown:

>>> with cgroup(1000,1000,'test') as c:
...   c.execute('echo hello world')
... 
hello world

Project details


Download files

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

Source Distribution

cgroupy-0.0.6.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page