| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Since cgconfig starts before nfs shares are mounted, it should not use
anything on /usr (it can be on nfs too). All the libcgroup libraries and
binaries should be therefore in /.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We could start cgconfig service earlier, even before network and syslog.
$local_fs is not needed, because /bin, /sbin and /etc are guaranteed by
rc.sysinit (see Fedora bug #309001,
https://bugzilla.redhat.com/show_bug.cgi?id=309001).
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
|
|
|
|
|
|
|
|
| |
Fix the warning,
config.c: In function ‘cgroup_config_parse_controller_options’:
config.c:104: warning: ‘buffer’ may be used uninitialized in this function
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
api.c: At top level:
api.c:1780: warning: ‘cg_prepare_controller_array’ defined but not used
api.c:1805: warning: ‘cg_free_controller_array’ defined but not used
Turns out no one is using this functions. Remove them.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
api.c: In function ‘cg_walk_node’:
api.c:2252: warning: unused variable ‘base_level’
api.c: In function ‘cgroup_walk_tree_end’:
api.c:2314: warning: unused variable ‘ret’
Fix the above warnings.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
We did not have -Wall in the CFLAGS and lost out on a number of warnings
because of that. Introduce it now.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
The test for cgroup_init() was not being done by the walk tree APIs.
With this it is possible for it to run without cgroup_init() being
called and having mysterious failures.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometime the movement of tasks in the default cgroup can fail for
various reasons. Therefore, do not check for the success of the
movement of tasks.
Justification: These are generally for cgroups which need some special
setup, for example the RT group scheduler. This is not handled by the
library whihc is generic. If a user is intersted in these working, they
will setup a default cgroup in the config files whihc handle everything
they need.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Tested-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the following warning of libcgroup-0.33.
$ make
flex lex.l
byacc -v -d parse.y
byacc: 2 shift/reduce conflicts
cc -g -O2 -I. -shared -fPIC -Wl,--soname,libcgroup.so.1 -o libcgroup.so \
-Wl,--version-script,libcgroup.map,--allow-shlib-undefined \
api.c wrapper.c lex.yy.c y.tab.c config.c
lex.l: In function 'yylex':
lex.l:30: warning: incompatible implicit declaration of built-in function 'strdup'
[snip]
$
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-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/tags/v0.33@357 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Balbir Singh <balbir@linux.vnet.ibm.com>
Changelog v3..v4
1. Add _end() method for the iterator
Changelog v3..v2
1. Move to iterator based design
Changelog v2..v1
1. Add base path and depth semantics for walking
This patch adds the capability to walk cgroups by providing a new API
called cgroup_walk_tree. The API accepts the controller to walk and the
order in which the directories and files must be visited. The code is
implemented as an iterator, the begin function starts the walk and
we have depth control. The next function gets the following node
and returns ECGEOF when done.
libcgroup.map has been updated to reflect the same change and the prototype
is exported in libcgroup.h.
I've also added test cases (tests/walk_test.c). Sample output is show
root is /cgroup/cpu///
path , parent , relative /, full /cgroup/cpu///
path l3, parent , relative /l3, full /cgroup/cpu///l3
path ll1, parent l3, relative /l3/ll1, full /cgroup/cpu///l3/ll1
path lll1, parent ll1, relative /l3/ll1/lll1, full /cgroup/cpu///l3/ll1/lll1
path l2, parent , relative /l2, full /cgroup/cpu///l2
path ll1, parent l2, relative /l2/ll1, full /cgroup/cpu///l2/ll1
path lll1, parent ll1, relative /l2/ll1/lll1, full /cgroup/cpu///l2/ll1/lll1
path l1, parent , relative /l1, full /cgroup/cpu///l1
path ll1, parent l1, relative /l1/ll1, full /cgroup/cpu///l1/ll1
path lll1, parent ll1, relative /l1/ll1/lll1, full /cgroup/cpu///l1/ll1/lll1
path a, parent , relative /a, full /cgroup/cpu///a
path e, parent a, relative /a/e, full /cgroup/cpu///a/e
path f, parent e, relative /a/e/f, full /cgroup/cpu///a/e/f
path f, parent a, relative /a/f, full /cgroup/cpu///a/f
path x, parent a, relative /a/x, full /cgroup/cpu///a/x
path b, parent a, relative /a/b, full /cgroup/cpu///a/b
path c, parent b, relative /a/b/c, full /cgroup/cpu///a/b/c
path d, parent c, relative /a/b/c/d, full /cgroup/cpu///a/b/c/d
path default, parent , relative /default, full /cgroup/cpu///default
root is /cgroup/cpu//a/
path , parent , relative /, full /cgroup/cpu//a/
path e, parent , relative /e, full /cgroup/cpu//a/e
path f, parent e, relative /e/f, full /cgroup/cpu//a/e/f
path f, parent , relative /f, full /cgroup/cpu//a/f
path x, parent , relative /x, full /cgroup/cpu//a/x
path b, parent , relative /b, full /cgroup/cpu//a/b
path c, parent b, relative /b/c, full /cgroup/cpu//a/b/c
Walking the first 5 nodes
root is /cgroup/cpu///
path , parent , relative /, full /cgroup/cpu///
path l3, parent , relative /l3, full /cgroup/cpu///l3
path ll1, parent l3, relative /l3/ll1, full /cgroup/cpu///l3/ll1
path lll1, parent ll1, relative /l3/ll1/lll1, full /cgroup/cpu///l3/ll1/lll1
NOTE: Parent directory is represented by an empty (not NULL) string "".
The length of the string is 0.
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@356 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Ivana Varekova <varekova@redhat.com>
OK, here goes
This patch Originally from Ivana and with changes I've made, get the
spec file working again (rpmlint warnings need some care and
ownership).
The new version will be 0.33 and will have new man pages and newer
API and many more bug fixes
[varekova@redhat.com] Incorporate pam module instalation to the spec file -
file part change add dependency
[balbir@linux.vnet.ibm.com] Bumped up the version, getting ready for a new
release. Updated makefile to install new man pages and to move the pam
module to the correct place at the time of installation.
Signed-off-by: Ivana Varekova <varekova@redhat.com>
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@355 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since cgroup_dbg is defined on the basis of CGROUP_DBG, we get
libcgrouptest.h and libcg_ba.cpp to include config.h and change
dbg to cgroup_dbg.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@354 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Add cgrulesengd man page and install it on 'make install'.
Rebased to lastes trunk and fixed file name.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@353 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LSB specifies that 'reload' is the right initscript parameter to stimulate
daemon to reread its configuration file. I let the 'flash' still working, in
case somebody is used to it, but do not advertise it anywhere.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-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@352 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
cgred should start after cgconfig service
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@351 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Some pages have wrong year in copyright notice.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@350 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
| |
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@349 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Ivana Varekova <varekova@redhat.com>
The man pages should be installed so the patch for Makefile
(with the last - for now not incorporated man page)
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@348 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
| |
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@347 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Ivana Varekova <varekova@redhat.com>
This is my proposal of cgred.conf man page. There are used some of some parts
of present documentation of libcg - again.
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@346 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Rename dbg() to cgroup_dbg() everywhere.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@345 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
PACKAGE_VERSION is defined both in config.h and Makefile.in, which results
in 'PACKAGE_VERSION redefined' warnings. It should be defined only once,
let's say in config.h.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@344 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
config.h (and therefore definition of CGROUP_DEBUG) should be included
where appropriate.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@343 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
I think dbg() should be in internal header file and not in the public one.
The tools get their own definition of dbg() so they don't need to include
library private header.
dbg() is defined on three places now, it will make more sense when the sources
are distributed to different directories.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@342 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Update cgclassify man page to reflect new '-g' parameter.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@341 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
cgclassify tools currently moves processes to groups only as specified in
cgrules.conf. It would be nice to move processes to another group,
specified on command line, like cgexec does.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@340 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Cgclassify could benefit from parsing of -g command line option, let's move it
to separate file, where both cgexec and cgclassify can use it.
The data structures and function names are also more descriptive now.
I added also the copyright notice and license to the new files.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@339 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes spec file handling of daemon parts of libcg
(add chkconfig to post and including dependency, fix preun script).
And fix the levels in which is this daemon start by default (should not be any).
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@338 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes cgconfig.conf - comment all rows and rename
example values - to have example which should be installed to /etc/.
Move cgred to /etc/sysconfig and patch spec to install all
/etc/* configuration files (at least they shows examples and
help to user to do their own configuration).).
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
NOTE: The spec file is still broken due to lack of packaging of pam_cgroup.so.
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@337 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes an issue where when two or more values are specified for
the controllers, only the last one is applied. This patch fixes that issue.
The parser is modified to collate all the name value pairs, seperated by
":". The reason for implementing it this way is because we need to pass
the controller name and splitting the rules would make it very hard to pass
the controller name to each rule, irrespective of where the controller name
was parsed.
Tested with the following config file
group default {
perm {
task {
uid = root;
gid = root;
}
admin {
uid = root;
gid = root;
}
}
cpu {
cpu.shares = 2048;
}
cpuset {
cpuset.mems=0;
cpuset.cpus=0-1;
}
}
mount {
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpu;
cpuset = /cgroup/cpu;
}
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@336 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Balbir Singh <balbir@linux.vnet.ibm.com>
Impact: Bug fix causes incorrect chown
This patch fixes a potential security issue, we free path and add
reallocate it using asprintf, but that breaks chown, since that relies on
fts_path[0] and path to point to the same address location.
Please review, comment.
[dhaval@linux.vnet.ibm.com: Fixed the return checks]
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@335 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Balbir Singh <balbir@linux.vnet.ibm.com>
Impact: Bug fix, fix incorrect return values
This patch fixes incorrect return value of -1 being returned from
some call sites. Please review, comment. printf's are ugly, so they've
been converted to dbg.
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@334 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
| |
of present documentation of libcg - again.
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@333 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
| |
of present documentation of libcg - again.
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@332 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
| |
of present documentation of libcg - again.
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@331 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
| |
This is my proposal of cgrules.conf man page. There are all necessary parts
(for some of them I use parts of present documentation of libcg).
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@330 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
| |
cgroup_add_last_errno procedure to show this number.
Use this procedure to show the cause of the error when ECGOTHER is returned.
[balbir@linux.vnet.ibm.com: fix last_errno in config.c]
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@329 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Install the PAM module to suitable directory. I didn't find any AC macro for
location of the PAM module, I hope static path is OK.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@328 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
The man page is in Makefile.in now, make install should install it
to appropriate place.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@327 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
There is new configure script option, which defines CGROUP_DEBUG.
Usage: ./configure --enable-debug
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@326 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Using plain DEBUG can be dangerous, it might have side effects on different
libraries, there should be something with CGROUP_ prefix.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@325 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Cgrulesengd writes some debugging info to stdout by default. IMHO
this feature should be enabled only when user explicitly asks so
during compilation, like the other tools.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@324 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Makefile is generated by configure script, it should not be stored in SVN.
I hope SVN understands such patches :).
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@323 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Add new command line options to sample config file
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@322 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
I rewrote the parsing to getopt - it's IMHO less error-prone and
new options can be added quite easily. Each new option has short
and long variant, both shown in --help.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@321 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Function cgre_process_event() logs success/failure of group change two
times, each with different log severity. It should be logged just once.
[dhaval@linux.vnet.ibm.com: Minor changes to the changelog]
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@320 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Rework whole cgrulesengd logging to be able to send log messages to syslog.
Also introduce more log levels:
LOG_NOTICE is the default log level, it logs startup/shutdown/configuration
reload and errors.
LOG_INFO shows in addition content of configuration file (only
if logging to file is enabled) and changing cgroup of a PID.
LOG_DEBUG show all details as it was before the patch.
TODO: if something gets wrong with mounted hierarchies (e.g. root unmounts
them), the log gets full of "Cgroup change for PID: ... FAILED". Some
suppression should be implemented.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@319 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
There are some messages printed directly to stdout, let's convert them to
dbg().
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@318 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
control group, i.e. the group which is implicitly created on mount and contains
all processes.
Admin can use '.' as the group name and he/she can set group's parameters as
usual. I am not sure it's a bug or feature, I've just documented current
behavior on appropriate man page.
[Balbir, simple spell fixes]
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@317 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|