From 852880eff7be980c5bd4c86e8451a4e120a054a7 Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Mon, 14 Apr 2008 21:11:40 +0000 Subject: Add init scripts and a README. NOTE: These init scripts will change frequently and drastically. Signed-off-by: Balbir Singh git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@14 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- scripts/doc/howto.txt | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 scripts/doc/howto.txt (limited to 'scripts/doc/howto.txt') diff --git a/scripts/doc/howto.txt b/scripts/doc/howto.txt new file mode 100644 index 0000000..38c95e3 --- /dev/null +++ b/scripts/doc/howto.txt @@ -0,0 +1,62 @@ +initscripts - Initialization scripts; they are used to initialize the workload +management system. The script consists of two major components + +Configuration files +------------------- + +The main configuraiton file /etc/wlm.conf. This file has a format + +mount + + +A sample configuration file is included below + +# +# controller file +# +mount /container cpu +cpu /etc/wlm/cpu.conf + +NOTE: Any line beginning with '#' is ignored as comments. The sample +configuration above, mounts the cpu controller at mount point /container. +It then parses /etc/wlm/cpu.conf as the configuration file for the +cpu controller. + +The controller configuration file is of the format + + + +In the case of the CPU controller a sample configuration would look +like + +class1 cpu.shares=1024 +class2 cpu.shares=512 + +The configuration below creates two classes class1 and class2 and +assigns shares of 1024 to class1 and 512 to class1. + +Intialization script +-------------------- + +The initialization script is installed in /etc/init.d, it is called +"wlm". Depending on the run-level, it is installed in the appropriate +/etc/rc.d/rc.d. The script comes with two options + +a. start + +start, starts the workload management, parses the configuration file. +If required creates the mount point directory and then mounts the +cgroup filesystem with the controllers specified. + +b. stop + +stops workload management, moves all tasks from various groups to +the root class. It then removes all other classes and then unmounts +the workload management system. + +Assumptions +----------- + +1. The kernel is compiled in with the correct options to support + cgroups and the CPU controller. +2. This version has been tested with 2.6.24-rc1 only. -- cgit