Skip to main content

cgroup-monitor

PyPi Documentation Status License Downloads

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

pip install cgroup-monitor

Usage

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.

Contributing

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

Metadata

Release files for cgroup-monitor 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cgroup-monitor 1.0.0
File Size Uploaded
cgroup_monitor-1.0.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cgroup-monitor 1.0.0
File Interpreter ABI Platform
cgroup_monitor-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / cgroup_monitor-1.0.0.tar.gz

Download URL cgroup_monitor-1.0.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8303e46a485931fce2be713b9fb8121cba56e27b7b9e02dfdad097df0a92120
BLAKE2b-256 checksum
How to use checksums
01a44fa909d127fbf19f421b348d933bfacc1391b840be1e46b56c1325eb7b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / cgroup_monitor-1.0.0-py3-none-any.whl

Download URL cgroup_monitor-1.0.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d29157ebad78001b7840aadb7ff4cfa806ebe082f83ac27767790b08ade7727
BLAKE2b-256 checksum
How to use checksums
c200030ff63b037382b936af21466f1f9246d137b680f296b2f9a3c8a6887b4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page