From cb9712d5698f43bb692a2ddcbaad8bb111022702 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Wed, 13 Aug 2008 20:04:51 +0000 Subject: cgclassify: A command line tool to classify/re-classify already running task From: Vivek Goyal o cgclassify, a command line tool to put a list of pids to the right cgroup based on rules in /etc/cgrules.conf. It can be mainly used for reclassification of tasks which are already running. Can think of two use cases. - During initial bootup, after cgroups are mounted, one needs to move tasks (started beofore cgroups were mounted) into right cgroup. - Once can choose to reclassify the tasks if admin has changed the rules and thinks a group of tasks should reclassified based on new rules. Signed-off-by: Vivek Goyal Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@138 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- Makefile.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index ba6a7a3..7fdff9a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@ CFLAGS=@CFLAGS@ $(INC) -DPACKAGE_VERSION=$(PACKAGE_VERSION) VERSION=1 -all: libcgroup.so cgconfigparser cgexec +all: libcgroup.so cgconfigparser cgexec cgclassify cgconfigparser: libcgroup.so config.c y.tab.c lex.yy.c libcgroup.h file-ops.c $(CC) $(CFLAGS) -o $@ y.tab.c lex.yy.c config.c file-ops.c \ @@ -38,6 +38,9 @@ cgconfigparser: libcgroup.so config.c y.tab.c lex.yy.c libcgroup.h file-ops.c cgexec: libcgroup.so cgexec.c libcgroup.h $(CC) $(CFLAGS) -Wall -o $@ cgexec.c $(LDFLAGS) $(LIBS) +cgclassify: cgclassify.c + $(CC) $(CFLAGS) -Wall -o $@ cgclassify.c $(LDFLAGS) $(LIBS) + y.tab.c: parse.y lex.yy.c $(YACC) -v -d parse.y @@ -49,13 +52,14 @@ libcgroup.so: api.c libcgroup.h wrapper.c wrapper.c ln -sf $@ $@.$(VERSION) -install: libcgroup.so cgexec +install: libcgroup.so cgexec cgclassify $(INSTALL_DATA) -D libcgroup.h $(DESTDIR)$(includedir)/libcgroup.h $(INSTALL) -D libcgroup.so $(DESTDIR)$(libdir)/libcgroup-$(PACKAGE_VERSION).so ln -sf libcgroup-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libcgroup.so.$(VERSION) ln -sf libcgroup.so.$(VERSION) $(DESTDIR)$(libdir)/libcgroup.so $(INSTALL) -D cgconfigparser $(DESTDIR)$(sbindir) $(INSTALL) cgexec $(DESTDIR)$(bindir)/cgexec + $(INSTALL) cgclassify $(DESTDIR)$(bindir)/cgclassify uninstall: libcgroup.so rm -f $(DESTDIR)$(includedir)/libcgroup.h @@ -64,7 +68,8 @@ uninstall: libcgroup.so rm -f $(DESTDIR)$(libdir)/libcgroup-$(PACKAGE_VERSION).so rm -f $(DESTDIR)$(sbindir)/cgconfigparser rm -f $(DESTDIR)$(bindir)/cgexec + rm -f $(DESTDIR)$(bindir)/cgclassify clean: - \rm -f y.tab.c y.tab.h lex.yy.c y.output libcgroup.so \ + \rm -f y.tab.c y.tab.h lex.yy.c y.output libcgroup.so cgclassify\ libcgroup.so.$(VERSION) cgconfigparser config.log config.status cgexec -- cgit