Linux command
cgdelete 命令
安全
复制后可按需替换文件名、目录或参数。
常用示例
Delete a cgroup
cgdelete -g [cpu]:[/mygroup]
Delete a cgroup
cgdelete -g [cpu,memory]:[/mygroup]
Delete a cgroup recursively
cgdelete -r -g [cpu]:[/mygroup]
Delete cgroup and all empty parents
cgdelete -g [memory]:[/parent/child]
说明
cgdelete removes cgroups from the Linux control group hierarchy. Cgroups (control groups) are used to limit, account for, and isolate resource usage of processes. The command removes the specified cgroup directory from the cgroup filesystem. By default, the cgroup must be empty (no processes or child cgroups) before deletion. The -r flag allows recursive deletion of child cgroups. cgdelete is part of libcgroup-tools, which provides user-space utilities for managing cgroups v1. Note that cgroups v2 uses a unified hierarchy and different management approaches.
参数
- -g _controllers_:_path_
- Specify controller(s) and cgroup path to delete.
- -r
- Recursively delete child cgroups.
- -h, --help
- Display help information.
FAQ
What is the cgdelete command used for?
cgdelete removes cgroups from the Linux control group hierarchy. Cgroups (control groups) are used to limit, account for, and isolate resource usage of processes. The command removes the specified cgroup directory from the cgroup filesystem. By default, the cgroup must be empty (no processes or child cgroups) before deletion. The -r flag allows recursive deletion of child cgroups. cgdelete is part of libcgroup-tools, which provides user-space utilities for managing cgroups v1. Note that cgroups v2 uses a unified hierarchy and different management approaches.
How do I run a basic cgdelete example?
Run `cgdelete -g [cpu]:[/mygroup]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g _controllers_:_path_ do in cgdelete?
Specify controller(s) and cgroup path to delete.