help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple log files?


From: Robert Shaw
Subject: Re: Multiple log files?
Date: Fri, 28 Jan 2005 22:10:24 -0800

I actually think they may be a bug in the log file name and/or log output function during the "update" phase. If I put some simple "/bin/echo" shellcommands in the update.conf and cfagent.conf files, I get the following email output:

cfengine::/bin/echo      : update.conf successfully executed.
cfengine:myhost:/bin/echo      : cfagent.conf successfully executed.

I am running with cfexecd in daemon mode, so cfagent is getting called every hour from it. If you notice in the output, the hostname is blank (note: the double ':' after cfengine). The log file that is created is also missing the host name: cfengine..runlog. So it looks like the host is not getting defined properly for the log file name and log line outputs. If I enable Syslog output, it looks like this:

Jan 28 22:01:57 myhost /opt/local/var/cfengine/bin/cfagent: Executing script /bin/echo 'update.conf successfully executed.'...(timeout=0,uid=-1,gid=-1) Jan 28 22:01:57 myhost /opt/local/var/cfengine/bin/cfagent: Finished script /bin/echo 'update.conf successfully executed.' Jan 28 22:02:11 myhost cfengine:myhost[2717]: Executing script /bin/echo 'cfagent.conf successfully executed.'...(timeout=0,uid=-1,gid=-1) Jan 28 22:02:11 myhost cfengine:myhost[2717]: Finished script /bin/echo 'cfagent.conf successfully executed.'

The output is a little different during update.conf and cfagent.conf runs. The update lists the cfagent binary location in place of the host name right before the process id.

I haven't had time to look at the C code, but I do think there is some cosmetic bug here. Mark, can you take a look?

Thanks!
-Robert


On Jan 27, 2005, at 7:13 PM, Robert Shaw wrote:

After starting up a new cfengine setup, I seem to have a collection of "runlog" and "log" files with odd hostnames:

-rw-------  1 root  wheel  344B 27 Jan 19:02 cfagent.myhost.local.log
-rw-------  1 root  wheel  321B 27 Jan 19:00 cfengine..runlog
-rw-------  1 root  wheel  191B 27 Jan 18:21 cfengine.localhost.runlog
-rw------- 1 root wheel 77B 27 Jan 18:03 cfengine.myhost.local.runlog
-rw-------  1 root  wheel    3K 27 Jan 19:02 cfengine.myhost.runlog

What causes the variation in the names? I have been experimenting with removing the cfagent.conf and other various files to see if the update.conf puts it back. This may be the cause of these files, but it seems like at least more than one of them is getting updated with every run, even when there is nothing to be updated.

Is there some way to fix/hardcode or prevent these runlog filenames?

-Robert



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]