diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2009-07-06 13:42:36 +0900 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-07-07 20:05:21 +0530 |
commit | b75a9fcfab5cd2ae88a55934e22c77cbd6810a14 (patch) | |
tree | 191cda4df31feba87cfc083bd8243166290fa01e /src | |
parent | 898a4f46a4bc7b75209976b3c2fe6bafd6e2faa0 (diff) | |
download | libcg-b75a9fcfab5cd2ae88a55934e22c77cbd6810a14.tar.gz libcg-b75a9fcfab5cd2ae88a55934e22c77cbd6810a14.tar.xz libcg-b75a9fcfab5cd2ae88a55934e22c77cbd6810a14.zip |
Add a process name to the log of cgrulesengd daemon.
Hi,
Current cgrulesengd daemon changes the cgroup of each process by a rule
based on uid, gid, and process name. And it is good that the log of the
daemon contains a process name with uid and gid.
This patch adds a process name to the log message.
Thanks
Ken'ichi Ohmichi
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/cgrulesengd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c index 38e4f60..4b04f3b 100644 --- a/src/daemon/cgrulesengd.c +++ b/src/daemon/cgrulesengd.c @@ -436,13 +436,14 @@ int cgre_process_event(const struct proc_event *ev, const int type) /* A process finished already and that is not a problem. */ ret = 0; } else if (ret) { - flog(LOG_WARNING, "Cgroup change for PID: %d, UID: %d, GID: %d" - " FAILED! (Error Code: %d)", log_pid, log_uid, log_gid, - ret); + flog(LOG_WARNING, "Cgroup change for PID: %d, UID: %d, GID: %d," + " PROCNAME: %s FAILED! (Error Code: %d)", + log_pid, log_uid, log_gid, procname, ret); } else { + flog(LOG_INFO, "Cgroup change for PID: %d, UID: %d, GID: %d," + " PROCNAME: %s OK", + log_pid, log_uid, log_gid, procname); ret = cgre_store_parent_info(pid); - flog(LOG_INFO, "Cgroup change for PID: %d, UID: %d, GID: %d OK", - log_pid, log_uid, log_gid); } free(procname); return ret; |