Metadata-Version: 2.2
Name: cgroup-monitor
Version: 0.2.0
Summary: A simple library to monitor CPU and Memory usage only using cgroups. Mainly created to monitor the resources inside the container.
Home-page: https://github.com/veedata/cgroup-monitor
Download-URL: https://github.com/veedata/cgroup-monitor/archive/refs/tags/v0.2.0-stable.tar.gz
Author: Viraj Thakkar
Author-email: vdthakkar111@gmail.com
Project-URL: Code, https://github.com/veedata/cgroup-monitor
Project-URL: Issue tracker, https://github.com/veedata/cgroup-monitor/issues
Project-URL: Documentation, https://cgroup-monitor.readthedocs.io/en/latest
Keywords: cgroup,docker
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: System :: Monitoring
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: summary

# 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.

