summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libcgroup Test: libcgroup-add-static-array-for-testcase-info-messagesBalbir Singh2008-12-172-0/+116
| | | | | | | | | | | | This patch removes all the strncpy() calls that were made before each api call to print the info messages. This patch creates an array of such info messages, initialize them, and then frees them with the help of two functions set_info_msgs(), called at start and free_info_msgs() called at end. The main motto has been to avoid the global variables due to thread safety reasons. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@266 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-fix-to-empty-extra-string-and-add-a-new-warningBalbir Singh2008-12-171-0/+4
| | | | git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@265 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgroup-modify_cgroup-test3-for-multimntBalbir Singh2008-12-171-1/+67
| | | | | | | | | | | | | This patch adds a testcase for libcgroup api cgroup_modify_cgroup() for commongroup (under two controllers) in multiple mount scenario. Again the challenge is to handle the control value as diff controllers put diff upper limit on control value and we pick the controller dynamicaly. So thoughts ??? Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@264 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgroup-modify_cgroup-test2-for-multimntBalbir Singh2008-12-171-1/+33
| | | | | | | | | | | | | This patch adds a testcase for libcgroup api cgroup_modify_cgroup() for multiple mount scenario for second controller. Again the challenge is to handle the control value as diff controllers put diff upper limit on control value and we pick the controller dynamicaly. So thoughts ??? Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@263 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgroup-modify_cgroup-test1-for-multimntBalbir Singh2008-12-171-1/+35
| | | | | | | | | | | | | | | | This patch adds a testcase for libcgroup api cgroup_modify_cgroup() for multiple mount scenario for first controller. The challenge is to handle the control value as diff controllers put diff upper limit on control value and we pick the controller dynamicaly. We are going to use a config file for that which will have the controller name, control file name and the control value. But not sure if there is any better approach. So thoughts ??? Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@262 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgroup-attach_task-test-for-cmmongrp-multimntBalbir Singh2008-12-171-1/+32
| | | | | | | | | This patch adds a testcase for libcgroup api cgroup_attach_task() for a common group in multiple mount scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@261 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: fix-typo-error-in-delete-cgroupBalbir Singh2008-12-171-5/+7
| | | | | | | | | | This patch fixes a testcase which was having some typo errors. (libcgroup api cgroup_delete_cgroup() for a common group in multiple mount scenario) Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@260 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: make-controller-use-generic-in-binaryBalbir Singh2008-12-173-80/+141
| | | | | | | | | | | | | | | | | | This patch makes the use of controllers available from script more generic. All possible controllers in Linux kernel are to be kept as enum parameters and a corresponding mapping is done in both, the script and binary. The testcases are no more hardcoded with respect to controllers. The function set_controller() need to be updated with respect to the controllers and control file. The challenges yet to be solved are: (1)Choosing appropriate control file (2)Choosing appropriate control value dynamicaly. Thoughts are most welcome. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@259 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: set-another-controller-if-first-failsBalbir Singh2008-12-171-4/+13
| | | | | | | | | This patch adds a warning in case setting a controller fails and tries to set values for another controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@258 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: put-commoncode-in-build-path-functionBalbir Singh2008-12-172-59/+49
| | | | | | | | | This patch puts the common code into a function build_path() and thus reduces lots of redundant lines of code. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@257 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: make-controller-check-genericBalbir Singh2008-12-171-16/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch adds support for a dynamical check of controllers and choosing two of them, which are enabled in the kernel. I have given preference to the cpu and memory controller if they exist. I will pass these mounted controllers to the c file(will send implementation in a next patch) and thus the c file will have no hard coding with respect to any controller. The reason of chosing script for this part is 1. easy to implement 2. otherwise there wont be any use of script :) One of my doubts is: Few controllers(e.g. devices) seems not to be having a control file. Please help me in finding the control file for each controller. Any link to documentation? This info I need in the c file. As per my knowledge the control files are: ***************************** controller control_file ***************************** cpu cpu.shares memory memory.linit_in_bytes debug devices ns cpuacct cpuset Also what type of values can be written to those control files? I need to take care before i write something stupid to a control file. Please review the patch and give your valuable comments. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@256 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgroup-attach_task-singlemount-testcaseBalbir Singh2008-12-171-7/+34
| | | | | | | | | Hi, This patch adds a testcase for cgroup_attach_task() api for single mount. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@255 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: change test callBalbir Singh2008-12-171-15/+22
| | | | | | | | | | Hi, The api cgroup_modify_cgroup(cgroup1) had to be called before cgroup_modify_cgroup(cgroup2). This patch does that. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@254 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: add warningsBalbir Singh2008-12-171-7/+15
| | | | | | | | | | | Hi, This patch adds some warnings in case some testcses fail. When we modify a group with nullcgroup then there is no need to check if values are changed. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@253 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup4Balbir Singh2008-12-171-85/+176
| | | | | | | | | Hi, This patch does printf and other cleanups in third set of testcases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@252 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: fixed certain rejectsBalbir Singh2008-12-171-3/+3
| | | | | | | | | | The following patch makes certain cleanups for the patchset to apply without any rejects. However the lines of code are being changed in one of the next patches. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@251 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup3Balbir Singh2008-12-171-5/+5
| | | | | | | | | Hi, This patch does cleanups in test script. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@250 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup2Balbir Singh2008-12-171-58/+86
| | | | | | | | | Hi, This patch does printf and other cleanups in second set of testcases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@249 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup1Balbir Singh2008-12-172-22/+58
| | | | | | | | | | Hi, This patch does cleanup in first set of testcases. It defines a new function to print test results. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@248 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: change subsyscheck logic in testscriptBalbir Singh2008-12-171-5/+5
| | | | | | | | | | Hi The shell script as expected does not do a non null check using -n option as i observed. hence changing the logic as below. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@247 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt-sanitycheckBalbir Singh2008-12-172-5/+22
| | | | | | | | | | | Hi The following patch adds the sanity check in c file for multiple mount case. The parameter passed to the function decides whether the check is for single mount or multiple mount. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@246 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt05Balbir Singh2008-12-171-3/+73
| | | | | | | | | | | | Hi The following patch adds three testcases for libcg apis create and delete _cgroup() and wrapper apis for multiple mount case. The patch creates a valid cgroup structure with two controllers and after calling to apis performs a check under both controllers. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@245 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt04Balbir Singh2008-12-171-0/+44
| | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_delete_cgroup() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The group is checked if it is deleted from the root directory of the corresponding controller's mountpoint. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@244 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt03Balbir Singh2008-12-171-1/+73
| | | | | | | | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_attach_task() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The argument of the api is a valid group under one controller's(say cpu) mountpoint. This group exist only under one controller(cpu). So the attached task is checked under this group for this(cpu) controller and under the root group for the other(memory) controller. In the second call the argument is a group under other controller(memory) and hence now task is checked under the two groups of both controllers. In the third calll we give the argument as a non existing group, so the return value should be ECGROUPNOTEXIST. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@243 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt02Balbir Singh2008-12-171-0/+83
| | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_create_cgroup() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The group is checked if it exists under the root directory of the corresponding controller's mountpoint. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@242 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt01Balbir Singh2008-12-172-24/+53
| | | | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_attach_task() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The task pid is checked if it exists under the root group's tasks file of both the mountpoints. The patch also puts the common code in a function. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@241 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: multi-mount-script-enhancedBalbir Singh2008-12-171-53/+151
| | | | | | | | | | | This patch modifies the script to handle multiple mounts. The earlier functions are modified and new ones are added. There is still some hard coding with respect to the number of mountpoints and controllers. I will update this code part once I get an idea of a better design. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@240 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Give write access to the group as wellDhaval Giani2008-12-171-0/+11
| | | | | | | | | | | Though we had group details to allow groups access to the cgroup fs, we had not given the group write access. Correct this bug. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@239 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add default group to cgconfigDhaval Giani2008-12-161-1/+1
| | | | | | | | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> As discussed in the previous thread http://article.gmane.org/gmane.comp.lib.libcg.devel/139, we don't have the concept of default groups and tasks should be able to return back to their default group when done. Here is a fix to the cgconfig script to fix the issue. Please review, comment on it. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@238 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix broken cgredDhaval Giani2008-12-161-4/+3
| | | | | | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> cgred is broken, in that there are some checks that fail and we use --config to start the daemon and that is not supported. We also use -12 as the signal to killproc. This patch fixes all of those issues Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@237 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add default group to cgconfigDhaval Giani2008-12-161-0/+50
| | | | | | | | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> As discussed in the previous thread http://article.gmane.org/gmane.comp.lib.libcg.devel/139, we don't have the concept of default groups and tasks should be able to return back to their default group when done. Here is a fix to the cgconfig script to fix the issue. Please review, comment on it. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@236 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Segfault when we run setuid testcase without argumentDhaval Giani2008-12-141-0/+5
| | | | | | | | | | | | | | | From: "Rishikesh K. Rajak" <risrajak@linux.vnet.ibm.com> In libcgroup testcase "setuid" testcase segfault when we run without uid parameter. This patch fixes the issue. [dhaval@linux.vnet.ibm.com: Minor fixes] Signed-off-by: Rishikesh k Rajak <risrajak@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@235 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Better error reporting for libcgroupDhaval Giani2008-12-094-2/+45
| | | | | | | | | | | | | | | | From: Ankita Garg <ankita@in.ibm.com> This patch adds human readable error messages to the configuration parser. The error lookup is implemented as a simple table, indexed by the error. TODO: Save errno at ECGOTHER and pass it down as cgroup_lasterror. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Ankita Garg <ankita@in.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@228 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Improve parameter checking and usage in cgconfigparserDhaval Giani2008-12-091-9/+24
| | | | | | | | | | | | | | | | From: Sripathi Kodi <sripathik@in.ibm.com> The following patch improves cgconfigparser's parameter checking and usage(). It provides: 1) Support for long options. Not really needed now, but good to have. 2) Improved usage() functionality. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@227 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: SanjayKumar J <vjsanjay@gmail.com>Balbir Singh2008-12-012-3/+3
| | | | | | | | | | | | | | Consistent Error checking for group_admin_perm Signed-off-by: SanjayKumar J <vjsanjay@gmail.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> [Balbir - change prefix in Makefile to /usr, so that make install does sensible things] git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@226 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Auto generated documentationDhaval Giani2008-11-261-0/+246
| | | | | | | | | | | | This patch provides a doxyfile and allows doxygen to generate useful documentation from code. Please review! Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@225 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Compile pam_cgroup.so by defaultDhaval Giani2008-11-262-2/+2
| | | | | | | | | | | | The PAM module was not getting compiled while doing a make. Correct that. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@224 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Bug fix in libcgroup wrapper apiDhaval Giani2008-11-181-0/+4
| | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> The issue no 2309126 reported on sf.net tracker is fixed by this patch. This patch fixes a segmentation fault in cgroup_free_controllers() wrapper, which is generated when a Null cgroup is passed to the wrapper. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@222 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Make cgconfigparser more verboseDhaval Giani2008-11-101-1/+3
| | | | | | | | | | | | | | As per http://sourceforge.net/tracker/?func=detail&atid=1043649&aid=2128139&group_id=218421 cgconfigparser was not exiting silently for wrong usage. Let's let the user know they are using wrong syntax. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Tested-by: Sudhir Kumar <sudhir@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@221 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Minor release v0.32.1Dhaval Giani2008-10-232-2/+2
| | | | | | | | | | Some minor fixes to the Makefile and other fixes by Balbir. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@218 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge several bug-fixes and cleanups. No version bump yet, since this isBalbir Singh2008-10-159-47/+121
| | | | | | | | | | an ongoing exercise (after more testing, I'll recommend one). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@216 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix makefile entry for cgconfigparserDhaval Giani2008-10-101-1/+1
| | | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@213 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: v0.32Dhaval Giani2008-09-303-11/+11
| | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@204 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: ABI guaranteeDhaval Giani2008-09-303-7/+51
| | | | | | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> Versioning all the symbols, in order to provide ABI guarantee. Bringing Balbir's patch up to date, and changing the version to 0.32. Please review. [dhaval@linux.vnet.ibm.com: updated with latest symbols] Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@203 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Change how cgroup_get_cgroup worksDhaval Giani2008-09-292-14/+26
| | | | | | | | | | | | | | Since we will not deprecate API now, and will do so with the next release, let's include this one in and get the API right. With this pathc, we now return int type, and the pointer passed as the argument redirects to the cgroup we are reading. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@202 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Configuration rewrite to use the main cgroups API and several bug fixesBalbir Singh2008-09-2910-844/+480
| | | | | | | | | | | | | and configuration enhancements. Primarliy Initiated by Dhaval Giani Please see svn log of all branches/balbir-config-cleanup Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@201 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* The automatic classification engine (cgexec, cgclassify, pam_cgroup)Balbir Singh2008-09-295-1/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | classify tasks. It is useful for an application to know where it has been classified. I propose to add a new API cgroup_get_current_controller_path() that returns the current classification directory for the specified controller. One can easily add on and build new API that will return paths of all mounted controllers, but I want to start with something simple and useful. I've also added a bunch of test cases for the same purpose. Test output # ./pathtest.sh Test FAIL, get path failed for controller cpuset Test PASS, controller cpu path /default Test PASS, controller cpuacct path /default Test PASS, controller memory path /default Test FAIL, get path failed for controller memrlimit I mounted just cpu, cpuacct and memory, thus the path for cpuset and memrlimit could not be found (as expected). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Reviewed-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@200 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge the cgruleseng daemon from Steve OlivieriBalbir Singh2008-09-2612-196/+1906
| | | | | | | | | | Signed-off-by: Steve Olivieri <sjo@redhat.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@190 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Once we build the path, we don't have all the room in path anymore.Balbir Singh2008-09-201-2/+4
| | | | | | | | | | | | Instead of using sizeof(path), we should use FILENAME_MAX - strlen(path) - 1. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@186 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix a warning in api.c, where we ignore the fscanf value.Balbir Singh2008-09-201-1/+6
| | | | | | | | | | | I've tested the patch by running the tests available in the tests directory. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@185 4f4bb910-9a46-0410-90c8-c897d4f1cd53