]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcg: scan running tasks at start time to classify existing pids
authorJohn Fastabend <john.fastabend@gmail.com>
Wed, 20 Feb 2013 17:08:19 +0000 (09:08 -0800)
committerJan Safranek <jsafrane@redhat.com>
Mon, 25 Feb 2013 13:58:06 +0000 (14:58 +0100)
commitd9d799ce72f7a6bc4f5c408b05ed682387ce971e
treed11806d7e90d607ea9070ddd163c1468ff732656
parentfcdfc360d8f0de862ea5ad25dfd4e87b2b3a82a1
libcg: scan running tasks at start time to classify existing pids

Add routine to scan rules.conf file and move matching running tasks
in /proc/pid/* into configured control groups. Then at init time
we can move running tasks into the correct control group.

Expose this routine via libcg so other applications can use it
to classify existing applications after creating control groups.

CC: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
include/libcgroup/tasks.h
src/api.c
src/daemon/cgrulesengd.c
src/libcgroup.map