ocwo92
May 24th, 2012, 12:51 PM
I can't get the cgred daemon, which applies control group rules, to work.
My cgroup environment appears to be fine; at least cgexec applies the proper control groups as expected. However, the cgred daemon seems to completely ignore the rules.
The /etc/cgrules.conf file contains:
testuser:unrar cpu batchjob/
and when the cgred daemon is started in debug mode, it reveals that it parses the rule:
testuser@home:$ sudo cgrulesengd -d
CGroup Rules Engine Daemon log started
Current time: Thu May 24 13:43:20 2012
Opened log file: -, log facility: 0, log level: 7
Proceeding with PID 23393
Rule: testuser:unrar
UID: 1000
GID: N/A
DEST: batchjob/
CONTROLLERS:
cpu
Started the CGroup Rules Engine Daemon.
:
However, when testuser starts an unrar command that lasts several minutes, the cgrulesengd log shows no indication whatsoever that unrar is being run, let alone being classified as cpu:batchjob.
The log does indicate that cgrulesengd receives some events (apparently making it unrelated to this bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609004)), because it contains output such as:
Cgroup change for PID: 24935, UID: 118, GID: 126, PROCNAME: /usr/lib/nagios/plugins/check_all_procr.sh OK
EXEC Event: PID = 24938, tGID = 24938
Cgroup change for PID: 24938, UID: 118, GID: 126, PROCNAME: /usr/bin/tr OK
EXEC Event: PID = 24939, tGID = 24939
Cgroup change for PID: 24939, UID: 118, GID: 126, PROCNAME: /usr/bin/wc OK
EXEC Event: PID = 24942, tGID = 24942
Cgroup change for PID: 24942, UID: 118, GID: 126, PROCNAME: /usr/bin/tr OK
EXEC Event: PID = 24943, tGID = 24943
Cgroup change for PID: 24943, UID: 118, GID: 126, PROCNAME: /bin/ps OK
But, no mention of unrar. How do I make it work?
My cgroup environment appears to be fine; at least cgexec applies the proper control groups as expected. However, the cgred daemon seems to completely ignore the rules.
The /etc/cgrules.conf file contains:
testuser:unrar cpu batchjob/
and when the cgred daemon is started in debug mode, it reveals that it parses the rule:
testuser@home:$ sudo cgrulesengd -d
CGroup Rules Engine Daemon log started
Current time: Thu May 24 13:43:20 2012
Opened log file: -, log facility: 0, log level: 7
Proceeding with PID 23393
Rule: testuser:unrar
UID: 1000
GID: N/A
DEST: batchjob/
CONTROLLERS:
cpu
Started the CGroup Rules Engine Daemon.
:
However, when testuser starts an unrar command that lasts several minutes, the cgrulesengd log shows no indication whatsoever that unrar is being run, let alone being classified as cpu:batchjob.
The log does indicate that cgrulesengd receives some events (apparently making it unrelated to this bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609004)), because it contains output such as:
Cgroup change for PID: 24935, UID: 118, GID: 126, PROCNAME: /usr/lib/nagios/plugins/check_all_procr.sh OK
EXEC Event: PID = 24938, tGID = 24938
Cgroup change for PID: 24938, UID: 118, GID: 126, PROCNAME: /usr/bin/tr OK
EXEC Event: PID = 24939, tGID = 24939
Cgroup change for PID: 24939, UID: 118, GID: 126, PROCNAME: /usr/bin/wc OK
EXEC Event: PID = 24942, tGID = 24942
Cgroup change for PID: 24942, UID: 118, GID: 126, PROCNAME: /usr/bin/tr OK
EXEC Event: PID = 24943, tGID = 24943
Cgroup change for PID: 24943, UID: 118, GID: 126, PROCNAME: /bin/ps OK
But, no mention of unrar. How do I make it work?