We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeed8ff commit ebb404eCopy full SHA for ebb404e
README.md
@@ -201,6 +201,27 @@ if err != nil {
201
}
202
```
203
204
+
205
+### Get and set cgroup type
206
+```go
207
+m, err := cgroup2.LoadSystemd("/", "my-cgroup-abc.slice")
208
+if err != nil {
209
+ return err
210
+}
211
212
+// https://www.kernel.org/doc/html/v5.0/admin-guide/cgroup-v2.html#threads
213
+cgType, err := m.GetType()
214
215
216
217
+fmt.Println(cgType)
218
219
+err = m.SetType(cgroup2.Threaded)
220
221
222
223
+```
224
225
### Attention
226
227
All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name
0 commit comments