https://github.com/clord/linux-cgroups
Very basic interface to the Linux CGroup Virtual Filesystem
https://github.com/clord/linux-cgroups
Last synced: over 1 year ago
JSON representation
Very basic interface to the Linux CGroup Virtual Filesystem
- Host: GitHub
- URL: https://github.com/clord/linux-cgroups
- Owner: clord
- License: mit
- Created: 2014-02-27T04:09:23.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-28T14:51:47.000Z (over 12 years ago)
- Last Synced: 2025-01-20T21:30:02.211Z (over 1 year ago)
- Language: Haskell
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CGroup Introduction
With this library you can interact directly with Linux's [cgroups](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) feature, access basic information about them including the associated PIDs, and add PIDs to a group. What are cgroups?
> Control Groups provide a mechanism for aggregating/partitioning sets of
> tasks, and all their future children, into hierarchical groups with
> specialized behaviour.
The library uses types to distinguish between data originating from anonymous sources, and data from other parts of the API. Doing this keeps everything safe, but also limits the performance impact of using the API on untainted data.
## Methods
* fetching `allCGroups`,
* `listTasks` will list PIDs associated with a particular cgroup
* and `addTask` will add a particular PID to a given CGroup.
* More to come! This library will eventually expose the entire cgroup VFS, including resource limits, prioritization, accounting, freezing, checkpointing, and restarting.