All Projects → levex → cgroups-rs

levex / cgroups-rs

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE-MIT
Native Rust library for managing control groups under Linux

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to cgroups-rs

node-systemd-journald
Native bindings to journald
Stars: ✭ 26 (-61.76%)
Mutual labels:  systemd
one-script-wsl2-systemd
The one-script variant of the systemd hack for WSL2
Stars: ✭ 196 (+188.24%)
Mutual labels:  systemd
amd-disable-c6
Systemd service to automatically disable the C6 power saving state on AMD Zen (Ryzen / Epyc) processors
Stars: ✭ 28 (-58.82%)
Mutual labels:  systemd
irsync
rsync on interval, via command line binary or docker container. Server and IOT builds for pull or push based device content management.
Stars: ✭ 19 (-72.06%)
Mutual labels:  system-administration
gentoo-project-gnome-without-systemd
GNOME Without Systemd
Stars: ✭ 89 (+30.88%)
Mutual labels:  systemd
systemdspawner
Spawn JupyterHub single-user notebook servers with systemd
Stars: ✭ 79 (+16.18%)
Mutual labels:  systemd
erlang-systemd
systemd utilities for Erlang applications
Stars: ✭ 140 (+105.88%)
Mutual labels:  systemd
my-id-bot
Telegram bot to get ID of some chats (including your own ID)
Stars: ✭ 49 (-27.94%)
Mutual labels:  systemd
fuck systemd
A library to bring the joys of non-systemd users to systemd users
Stars: ✭ 19 (-72.06%)
Mutual labels:  systemd
dron
What if cron and systemd had a baby?
Stars: ✭ 30 (-55.88%)
Mutual labels:  systemd
go-systemd-time
📅 Go implementation of systemd relative time adjustments
Stars: ✭ 21 (-69.12%)
Mutual labels:  systemd
sysz
An fzf terminal UI for systemctl
Stars: ✭ 1,258 (+1750%)
Mutual labels:  systemd
buddy-linux
Do you remember "Wubi Ubuntu Installer"? This project is both a replacement and an improvement of Wubi. You will be able to install your Debian (or derived) distribution on a PC without repartitioning it, simply by using a secondary/external boot device (like a USB drive).
Stars: ✭ 17 (-75%)
Mutual labels:  systemd
wimpy.deploy
Ansible role to automate immutable infrastructure scheduling one docker container on one EC2 instance
Stars: ✭ 21 (-69.12%)
Mutual labels:  systemd
ocaml-systemd
OCaml module for native access to the systemd facilities
Stars: ✭ 22 (-67.65%)
Mutual labels:  systemd
systemd-formula
No description or website provided.
Stars: ✭ 24 (-64.71%)
Mutual labels:  systemd
logback-journal
systemd journal appender for Logback
Stars: ✭ 25 (-63.24%)
Mutual labels:  systemd
java-systemd
Java access to systemd via D-Bus
Stars: ✭ 32 (-52.94%)
Mutual labels:  systemd
streamZ
A simple video streaming application made with Dart, JavaScript, HTML, CSS & ❤️
Stars: ✭ 28 (-58.82%)
Mutual labels:  systemd
android-tether
Autostart Android USB tethering with udev + systemd + adb
Stars: ✭ 30 (-55.88%)
Mutual labels:  systemd

No Longer Maintained

This repository is no longer actively maintained.

Several forks of cgroups-rs exist:

None of these forks are endorsed by the authors of this crate, and are listed for informational purposes only.


cgroups-rs Build

Native Rust library for managing control groups under Linux

Right now the crate only support the original, V1 hierarchy, however support is planned for the Unified hierarchy.

Examples

Create a control group using the builder pattern

// Acquire a handle for the V1 cgroup hierarchy.
let hier = ::hierarchies::V1::new();

// Use the builder pattern (see the documentation to create the control group)
//
// This creates a control group named "example" in the V1 hierarchy.
let cg: Cgroup = CgroupBuilder::new("example", &v1)
	.cpu()
		.shares(85)
		.done()
	.build();

// Now `cg` is a control group that gets 85% of the CPU time in relative to
// other control groups.

// Get a handle to the CPU controller.
let cpus: &CpuController = cg.controller_of().unwrap();
cpus.add_task(1234u64);

// [...]

// Finally, clean up and delete the control group.
cg.delete();

// Note that `Cgroup` does not implement `Drop` and therefore when the
// structure is dropped, the Cgroup will stay around. This is because, later
// you can then re-create the `Cgroup` using `load()`. We aren't too set on
// this behavior, so it might change in the feature. Rest assured, it will be a
// major version change.

Disclaimer

This crate is licensed under:

  • MIT License (see LICENSE-MIT); or
  • Apache 2.0 License (see LICENSE-Apache-2.0),

at your option.

Please note that this crate is under heavy development, we will use sematic versioning, but during the 0.0.* phase, no guarantees are made about backwards compatibility.

Regardless, check back often and thanks for taking a look!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].