{"id":13439981,"url":"https://github.com/frol/cgroups-fs","last_synced_at":"2025-07-11T13:02:17.592Z","repository":{"id":57547133,"uuid":"163112268","full_name":"frol/cgroups-fs","owner":"frol","description":"Rust bindings to Linux Control Groups (cgroups)","archived":false,"fork":false,"pushed_at":"2022-06-12T07:04:24.000Z","size":19,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T03:22:11.878Z","etag":null,"topics":["cgroups","linux","rust","rust-crate","rust-library"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-25T21:23:10.000Z","updated_at":"2024-05-15T23:39:27.000Z","dependencies_parsed_at":"2022-09-26T18:40:41.715Z","dependency_job_id":null,"html_url":"https://github.com/frol/cgroups-fs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fcgroups-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fcgroups-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fcgroups-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fcgroups-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frol","download_url":"https://codeload.github.com/frol/cgroups-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878439,"owners_count":20362432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgroups","linux","rust","rust-crate","rust-library"],"created_at":"2024-07-31T03:01:18.695Z","updated_at":"2025-03-17T18:30:35.302Z","avatar_url":"https://github.com/frol.png","language":"Rust","funding_links":[],"categories":["Libraries","库","库 Libraries"],"sub_categories":["Platform specific","平台特定","平台标准 Platform specific"],"readme":"# cgroups-fs [![crates.io](https://meritbadge.herokuapp.com/cgroups-fs)](https://crates.io/crates/cgroups-fs) [![Documentation](https://docs.rs/cgroups-fs/badge.svg)](https://docs.rs/cgroups-fs) [![Build Status](https://travis-ci.org/frol/cgroups-fs.svg?branch=master)](https://travis-ci.org/frol/cgroups-fs)\n\nNative Rust library for managing Linux Control Groups (cgroups).\n\nThis crate, curently, only supports the original, V1 hierarchy. You are welcome to contribute\nCgroups V2 support.\n\n## Prior art\n\n* [cgroups](https://crates.io/crates/cgroups) - it does too many things (e.g. creates cgroups in\n  the subsystems that I don't plan to use, parses control files that I don't plan to use).\n\n## Usage\n\nFirst, add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\ncgroups-fs = \"1.0\"\n```\n\nNext, use it in your crate:\n\n```rust\nuse cgroups_fs;\n```\n\n## Examples\n\n```rust\nuse cgroups_fs;\n\nlet my_cgroup = cgroups_fs::CgroupName(\"my-cgroup\");\nlet my_cpu_cgroup = cgroups_fs::Cgroup::init(\u0026my_cgroup, \"cpu\")?;\nprintln!(\n    \"The current CPU shares in `my-cgroup` control group is {}\",\n    my_cpu_cgroup.get_value::\u003cu64\u003e(\"cpu.shares\")\n);\n```\n\nPlease, find more examples in [the documentation](https://docs.rs/cgroups-fs#examples).\n\n## License\n\nThis project is licensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fcgroups-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrol%2Fcgroups-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fcgroups-fs/lists"}