← 返回命令列表

Linux command

cgcreate 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

cgcreate -g cpu:mygroup

Example

cgcreate -g cpu,memory:mygroup

Example

cgcreate -g *:mygroup

Example

cgcreate -t user:group -g cpu:mygroup

Example

cgcreate -a user:group -g cpu:mygroup

Example

cgcreate -d 755 -g cpu:mygroup

说明

cgcreate creates new cgroups (control groups) used to limit, measure, and control resources used by processes. Cgroup controllers include memory, cpu, cpuset, blkio, net_cls, and others.

参数

-g CONTROLLERS:PATH
Specify controllers and path for the cgroup (required). Controllers can be comma-separated or "*" for all mounted controllers
-t TUID:TGID
Set ownership of the tasks file (determines who can add processes)
-a AUID:AGID
Set ownership of control files (determines who can modify parameters)
-d, --dperm=MODE
Set directory permissions in octal notation (e.g., 755)
-f, --fperm=MODE
Set parameter file permissions in octal notation
-s, --tperm=MODE
Set tasks file permissions in octal notation
-h, --help
Display help information

FAQ

What is the cgcreate command used for?

cgcreate creates new cgroups (control groups) used to limit, measure, and control resources used by processes. Cgroup controllers include memory, cpu, cpuset, blkio, net_cls, and others.

How do I run a basic cgcreate example?

Run `cgcreate -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 cgcreate?

Specify controllers and path for the cgroup (required). Controllers can be comma-separated or "*" for all mounted controllers