Skip to content

Commit

Permalink
feat(system): coffee to js
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Nov 17, 2023
1 parent 6e49027 commit 8bc00e2
Show file tree
Hide file tree
Showing 73 changed files with 2,142 additions and 4,430 deletions.
340 changes: 0 additions & 340 deletions packages/system/lib/cgroups.js

This file was deleted.

58 changes: 58 additions & 0 deletions packages/system/lib/cgroups/README.md
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";
}
}
```
Loading

0 comments on commit 8bc00e2

Please sign in to comment.