El Wed, 26 de Mar 2014 a las 9:03 PM, gustavo panizzo <gfa>
<g...@zumbi.com.ar> escribió:
On 03/26/2014 11:49 PM, Cameron Norman wrote:
I wonder if dbus activation
could be used to accomplish this. Of course, then one would not be
able
to put (in the case of Upstart) the socket bridge, dbus bridge,
dbus, or
anything those services need to boot into a cgroup, but one can
still
put stuff like Apache, lightdm/gdm/kdm/sddm, nginx, et al into a
cgroup.
Another option is to push the kernel maintainers to allow delegating
parts of the cgroups tree to other processes, so that the init
system
could say "you get a sub-hierarchy, you get a sub-hierarchy"
without the
complication of multiple separate hierarchies. How do you suggest
this
integration with cgroups be done?
i just want to put services inside cgroups, no socket activation, no
dbus, no dbus activation.
Haha. The problem there is that cgmanager uses dbus! So you need dbus
installed + started before you can use cgroups with later kernels.
i would use it for servers, apache and friends, what i would really
like
is to be able to run multiple instances of the same service each on
it's
own cgroup.
something like
su - user -g cgroup_name -c command or a flag to start-stop-daemon,
cgroups could be created in advance by an init script (a
Required-Start
in lsb slang)
I think cgexec is what you are looking for here. This would break with
later versions of the linux kernel, though, because you need one
centralized writer (e.g. cgmanager or systemd).
--
Cameron Norman