cgroup-monitor


Namecgroup-monitor JSON
Version 0.1.2 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_time2024-03-05 23:10:25
maintainer
docs_urlNone
authorViraj Thakkar
requires_python
license
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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "cgroup,docker",
    "author": "Viraj Thakkar",
    "author_email": "vdthakkar111@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/23/7aef7d0e03be395332d68db79d332a68e77fec910b61c6b99c90d28cf3be/cgroup-monitor-0.1.2.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": "",
    "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.2",
    "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.2-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": "",
            "digests": {
                "blake2b_256": "774e9f237a2b0868e6464331f887afc8cbaed94af68e306abc3acb9ccc0edede",
                "md5": "f597bc0ec0e41ed02f43e1208b60319f",
                "sha256": "da75a6e4becfa0827c6643a59f093d24b3fb9caf3e20765839a918eb77631123"
            },
            "downloads": -1,
            "filename": "cgroup_monitor-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f597bc0ec0e41ed02f43e1208b60319f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4715,
            "upload_time": "2024-03-05T23:10:24",
            "upload_time_iso_8601": "2024-03-05T23:10:24.120864Z",
            "url": "https://files.pythonhosted.org/packages/77/4e/9f237a2b0868e6464331f887afc8cbaed94af68e306abc3acb9ccc0edede/cgroup_monitor-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5237aef7d0e03be395332d68db79d332a68e77fec910b61c6b99c90d28cf3be",
                "md5": "7964d861bcde71354266a1a7b7aa61e9",
                "sha256": "c2ba7ea6952490a3b2365f369127953816c3f0dd237553ac042e32b9e5f699ff"
            },
            "downloads": -1,
            "filename": "cgroup-monitor-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7964d861bcde71354266a1a7b7aa61e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4748,
            "upload_time": "2024-03-05T23:10:25",
            "upload_time_iso_8601": "2024-03-05T23:10:25.236566Z",
            "url": "https://files.pythonhosted.org/packages/a5/23/7aef7d0e03be395332d68db79d332a68e77fec910b61c6b99c90d28cf3be/cgroup-monitor-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 23:10:25",
    "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.21469s