-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
2,142 additions
and
4,430 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
# `nikita.system.cgroups` | ||
|
||
Nikita action to manipulate cgroups. [cgconfig.conf(5)] describes the | ||
configuration file used by libcgroup to define control groups, their parameters | ||
and also mount points. The configuration file is identical on Ubuntu, RedHat | ||
and CentOS. | ||
|
||
## Implementation | ||
|
||
When reading the current config, nikita uses `cgsnapshot` command in order to | ||
have a well formatted file. It is available on CentOS with the `libcgroup-tools` | ||
package. | ||
|
||
If docker is installed and started, informations about live containers could be | ||
printed, that's why all path under docker/* are ignored. | ||
|
||
## Example | ||
|
||
Example of a group object: | ||
|
||
``` | ||
bibi: | ||
perm: | ||
admin: | ||
uid: 'bibi' | ||
gid: 'bibi' | ||
task: | ||
uid: 'bibi' | ||
gid: 'bibi' | ||
controllers: | ||
cpu: | ||
'cpu.rt_period_us': '"1000000"' | ||
'cpu.rt_runtime_us': '"0"' | ||
'cpu.cfs_period_us': '"100000"' | ||
``` | ||
|
||
Which will result in a file: | ||
|
||
```text | ||
group bibi { | ||
perm { | ||
admin { | ||
uid = bibi; | ||
gid = bibi; | ||
} | ||
task { | ||
uid = bibi; | ||
gid = bibi; | ||
} | ||
} | ||
cpu { | ||
cpu.rt_period_us = "1000000"; | ||
cpu.rt_runtime_us = "0"; | ||
cpu.cfs_period_us = "100000"; | ||
} | ||
} | ||
``` |
Oops, something went wrong.