Discussion:
Does anyone know of any good linux cgroups code examples?
(too old to reply)
b***@nowhere.co.uk
2020-08-24 09:27:42 UTC
Permalink
I've been chasing my tail in google trying to find any half decent examples of
setting up linux control groups using the C API and libcgroup. Does anyone
know of any good examples?

Cheers
Jim Jackson
2020-08-24 17:04:03 UTC
Permalink
Post by b***@nowhere.co.uk
I've been chasing my tail in google trying to find any half decent examples of
setting up linux control groups using the C API and libcgroup. Does anyone
know of any good examples?
systemd uses cgroups, so try looking at it's init code. Whether it's
"good " or not I couldn't say :-)
b***@nuttyella.co.uk
2020-08-25 08:35:28 UTC
Permalink
On Mon, 24 Aug 2020 17:04:03 -0000 (UTC)
Post by Jim Jackson
Post by b***@nowhere.co.uk
I've been chasing my tail in google trying to find any half decent examples
of
Post by b***@nowhere.co.uk
setting up linux control groups using the C API and libcgroup. Does anyone
know of any good examples?
systemd uses cgroups, so try looking at it's init code. Whether it's
"good " or not I couldn't say :-)
I'll rephrase - good and well written examples :) If the code of systemd is
as bad as its design then its probably a horror show.
Jim Jackson
2020-08-25 09:36:52 UTC
Permalink
Post by b***@nuttyella.co.uk
On Mon, 24 Aug 2020 17:04:03 -0000 (UTC)
Post by Jim Jackson
Post by b***@nowhere.co.uk
I've been chasing my tail in google trying to find any half decent examples
of
Post by b***@nowhere.co.uk
setting up linux control groups using the C API and libcgroup. Does anyone
know of any good examples?
systemd uses cgroups, so try looking at it's init code. Whether it's
"good " or not I couldn't say :-)
I'll rephrase - good and well written examples :) If the code of systemd is
as bad as its design then its probably a horror show.
I share your prejudice, but you don't know until you look! The cgroups
stuff maybe usefull. I've never looked but would be interested in
feedback if you do take a peek.

Jim
b***@nuttyella.co.uk
2020-08-25 09:45:37 UTC
Permalink
On Tue, 25 Aug 2020 09:36:52 -0000 (UTC)
Post by Jim Jackson
Post by b***@nuttyella.co.uk
On Mon, 24 Aug 2020 17:04:03 -0000 (UTC)
Post by Jim Jackson
Post by b***@nowhere.co.uk
I've been chasing my tail in google trying to find any half decent examples
of
Post by b***@nowhere.co.uk
setting up linux control groups using the C API and libcgroup. Does anyone
know of any good examples?
systemd uses cgroups, so try looking at it's init code. Whether it's
"good " or not I couldn't say :-)
I'll rephrase - good and well written examples :) If the code of systemd is
as bad as its design then its probably a horror show.
I share your prejudice, but you don't know until you look! The cgroups
stuff maybe usefull. I've never looked but would be interested in
feedback if you do take a peek.
Tbh I imagine the systemd code is rather complicated. I'm really looking for
some simple example code of which there seems to be none as far as google
is concerned. Even stackoverflow seems to be lacking them.

Loading...