Hi, I get strange time entries in the rsync log, For example: 2006/07/02 14:56:12 [20054] rsync to upload/aspen/nhm from plxc6266.pdx.intel.com (10.25.26.90) 2006/07/02 11:56:22 [20054] wrote 28 bytes read 3582404 bytes total size 32030720 The first entry in the correct time and second is strange. I checked and this is not the time on the destination. Any ideas what is the reason for that? Thanks, Oren Mark Intel - Israel Engineering Computing Unix Server Platforms oren.mark@intel.com <mailto:oren.mark@intel.com> (+) 972-4-865-5987 iNET: 465-5987 -------------- next part -------------- HTML attachment scrubbed and removed
This happened to me too (2.6.3) Have never looked into it deeply, but I did notice that this happens with the hour value only. I have since changed to 2.6.8 but I cant remember whether this kept happenning or not. Mark, Oren wrote:> Hi, > > > > I get strange time entries in the rsync log, For example: > > > > 2006/07/02 *14:56:12* [20054] rsync to upload/aspen/nhm from > plxc6266.pdx.intel.com (10.25.26.90) > > 2006/07/02 *11:56:22* [20054] wrote 28 bytes read 3582404 bytes > total size 32030720 > > > > The first entry in the correct time and second is strange. I checked > and this is not the time on the destination. > > > > Any ideas what is the reason for that? > > > > *Thanks,* > > */Oren Mark/*// > > *Int**e**l - Israel Engineering Computing__* > > *Unix Server Platforms__* > > *oren.mark@intel.com <mailto:oren.mark@intel.com>*** > > *(+) 972-4-865-5987*** > > *iNET: 465-5987* > > >-------------- next part -------------- HTML attachment scrubbed and removed
On Mon, Jul 03, 2006 at 01:09:35PM +0300, Mark, Oren wrote:> The first entry in the correct time and second is strange.This usually indicates that you have "use chroot = yes" and your C library doesn't remember the timezone prior to the chroot() occurring. The code in CVS (which will go into 2.6.9) attempts to work around this problem by ensuring that strftime() gets called prior to the chroot() call. So, it you might want to try using the CVS version or the attached patch on your current rsync version to see if the problem goes away. Another possible solution is to set the TZ environment variable outside of rsync so that the C library can determine the timezone when the /etc/timezone file is not present. ..wayne.. -------------- next part -------------- --- log.c 25 Apr 2006 23:51:15 -0000 1.146 +++ log.c 3 May 2006 06:06:19 -0000 @@ -154,17 +154,14 @@ static void logfile_open(void) void log_init(void) { - time_t t; - if (log_initialised) return; log_initialised = 1; /* this looks pointless, but it is needed in order for the * C library on some systems to fetch the timezone info * before the chroot */ - t = time(NULL); - localtime(&t); + timestring(time(NULL)); /* optionally use a log file instead of syslog */ logfname = lp_log_file();