cgroup-monitor


Namecgroup-monitor JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/veedata/cgroup-monitor
SummaryA simple library to monitor CPU and Memory usage only using cgroups. Mainly created to monitor the resources inside the container.
upload_time2025-02-01 00:52:10
maintainerNone
docs_urlNone
authorViraj Thakkar
requires_pythonNone
licenseNone
keywords cgroup docker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cgroup-monitor

[![PyPi](https://img.shields.io/pypi/v/cgroup-monitor.svg)](https://pypi.org/project/cgroup-monitor/)
[![Documentation Status](https://readthedocs.org/projects/cgroup-monitor/badge/?version=latest)](https://cgroup-monitor.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/github/license/veedata/cgroup-monitor)](https://github.com/veedata/cgroup-monitor/blob/main/LICENSE)
[![Downloads](https://pepy.tech/badge/cgroup-monitor)](https://pepy.tech/project/cgroup-monitor)

# Description
cgroup-monitor is a Python package that provides a simple interface to monitor cgroup metrics. It is designed to be used in a containerized environment to monitor the resource usage of the containers. It can be used to monitor the CPU, and memory, of the containers. 
> The current version is only compatible with cgroup v1 (Ubuntu 20.04 and lower)

# Installation
```bash
pip install cgroup-monitor
```

# Usage
```python
from cgroup_monitor import CgroupMonitor

monitor = CgroupMonitor()
monitor.start_monitor()
# run task here
cpu, mem = monitor.stop_monitor()

print(f"CPU Usage: {cpu}%, Memory Usage: {mem}%")
```

# Features
- Monitor CPU and Memory usage of the containers
- Simple interface to start and stop monitoring
- Lightweight and easy to use

# Documentation
The official documentation is hosted on Read the Docs: https://cgroup-monitor.readthedocs.io/en/latest/

# License
This project is licensed under the terms of the MIT license, see [LICENSE](./LICENSE).

# Contributing
Contributions are welcome, and they are greatly appreciated! Every little bit helps.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/veedata/cgroup-monitor",
    "name": "cgroup-monitor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cgroup, docker",
    "author": "Viraj Thakkar",
    "author_email": "vdthakkar111@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3f/4c/4343531f12865f9b1f92f4307dfd7df08a749074f2bafafcb5a1d74e4029/cgroup_monitor-0.1.3.tar.gz",
    "platform": null,
    "description": "# cgroup-monitor\n\n[![PyPi](https://img.shields.io/pypi/v/cgroup-monitor.svg)](https://pypi.org/project/cgroup-monitor/)\n[![Documentation Status](https://readthedocs.org/projects/cgroup-monitor/badge/?version=latest)](https://cgroup-monitor.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/github/license/veedata/cgroup-monitor)](https://github.com/veedata/cgroup-monitor/blob/main/LICENSE)\n[![Downloads](https://pepy.tech/badge/cgroup-monitor)](https://pepy.tech/project/cgroup-monitor)\n\n# Description\ncgroup-monitor is a Python package that provides a simple interface to monitor cgroup metrics. It is designed to be used in a containerized environment to monitor the resource usage of the containers. It can be used to monitor the CPU, and memory, of the containers. \n> The current version is only compatible with cgroup v1 (Ubuntu 20.04 and lower)\n\n# Installation\n```bash\npip install cgroup-monitor\n```\n\n# Usage\n```python\nfrom cgroup_monitor import CgroupMonitor\n\nmonitor = CgroupMonitor()\nmonitor.start_monitor()\n# run task here\ncpu, mem = monitor.stop_monitor()\n\nprint(f\"CPU Usage: {cpu}%, Memory Usage: {mem}%\")\n```\n\n# Features\n- Monitor CPU and Memory usage of the containers\n- Simple interface to start and stop monitoring\n- Lightweight and easy to use\n\n# Documentation\nThe official documentation is hosted on Read the Docs: https://cgroup-monitor.readthedocs.io/en/latest/\n\n# License\nThis project is licensed under the terms of the MIT license, see [LICENSE](./LICENSE).\n\n# Contributing\nContributions are welcome, and they are greatly appreciated! Every little bit helps.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple library to monitor CPU and Memory usage only using cgroups. Mainly created to monitor the resources inside the container.",
    "version": "0.1.3",
    "project_urls": {
        "Code": "https://github.com/veedata/cgroup-monitor",
        "Documentation": "https://cgroup-monitor.readthedocs.io/en/latest",
        "Download": "https://github.com/veedata/cgroup-monitor/archive/refs/tags/v0.1.3-stable.tar.gz",
        "Homepage": "https://github.com/veedata/cgroup-monitor",
        "Issue tracker": "https://github.com/veedata/cgroup-monitor/issues"
    },
    "split_keywords": [
        "cgroup",
        " docker"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c03b9facaa8980c57b0b6a42762e36157f955cf1f786ca9610e9093463be086a",
                "md5": "2a9b324d24808bcf129b9dbe50823bdd",
                "sha256": "32439cd58da7850b8b20cf315b1daa13d5583e8661d98011909996476165da07"
            },
            "downloads": -1,
            "filename": "cgroup_monitor-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a9b324d24808bcf129b9dbe50823bdd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6373,
            "upload_time": "2025-02-01T00:52:09",
            "upload_time_iso_8601": "2025-02-01T00:52:09.269567Z",
            "url": "https://files.pythonhosted.org/packages/c0/3b/9facaa8980c57b0b6a42762e36157f955cf1f786ca9610e9093463be086a/cgroup_monitor-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3f4c4343531f12865f9b1f92f4307dfd7df08a749074f2bafafcb5a1d74e4029",
                "md5": "a87b06249e0943196cfc42dbace62a0b",
                "sha256": "a8e4042b254d29ee00cf89b92ebe3e5336cfcf1d9a7318d012b08b020426e450"
            },
            "downloads": -1,
            "filename": "cgroup_monitor-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a87b06249e0943196cfc42dbace62a0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6126,
            "upload_time": "2025-02-01T00:52:10",
            "upload_time_iso_8601": "2025-02-01T00:52:10.898052Z",
            "url": "https://files.pythonhosted.org/packages/3f/4c/4343531f12865f9b1f92f4307dfd7df08a749074f2bafafcb5a1d74e4029/cgroup_monitor-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-01 00:52:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "veedata",
    "github_project": "cgroup-monitor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cgroup-monitor"
}
        
Elapsed time: 0.74300s