Log File format
John
jhartery at breathemail.net
Thu Feb 28 02:04:04 EST 2002
Thanks,
But, my problem is exactly that I cannot key on the PID field, i.e.
2002/02/27 13:55:22 [15207] rsyncd version 2.5.3pre1 starting, listening
on port
873
2002/02/27 13:55:32 [15217] rsync to in/redhat.jjnet.co.uk from
charliebrown at red
hat.jjnet.co.uk (172.31.0.7)
2002/02/27 13:55:40 [15218] wrote 73 bytes read 12482 bytes total size
2618528
0
As you can see the 'rsync to' line and the 'wrote' lines have different
PID's
This was a single *client* initiated rsync, to a server daemon.
The 'log format' option in rsyncd.conf seems to have no effect on these
lines,
But is used to format the output of the 'transfer logging' lines, I
would rather not
enable transfer logging, since all I need is contained in these two
lines.
Perhaps I need to amend log.c?
Regards
jhartery at breathemail.net
-------------------------------------------------------------
On Date: Mon, 25 Feb 2002 13:17:00 -0700 tim.conway at philips.com wrote:
>Message: 4
>From: tim.conway at philips.com
>To: jhartery at starplc.co.uk
>Cc: rsync at lists.samba.org, rsync-admin at lists.samba.org
>Subject: Re: Log File format
>Date: Mon, 25 Feb 2002 13:17:00 -0700
>
>I'm not sure what the problem is. Here's a snip of my log (very
similar=20
>setup, but from server to remotes):
>2001/05/17 14:26:59 [29226] rsync on
ToolSyncModules/ToolSyncModuleList=20
>from irvnetsvr (134.27.9.31)
>2001/05/17 14:27:00 [29226] wrote 23292 bytes read 128 bytes total
size=20
>23179
>2001/05/17 14:27:01 [29227] rsync on
ToolSyncModules/ToolSyncMastersList=20
>from irvnetsvr (134.27.9.31)
>2001/05/17 14:27:02 [29227] wrote 247 bytes read 129 bytes total
size=20
>133
>2001/05/17 14:27:03 [29228] rsync on big/tools/DAI from irvnetsvr=20
>(134.27.9.31)
>2001/05/17 14:27:06 [29228] wrote 8736 bytes read 102 bytes total
size=20
>184269251
>2001/05/17 14:27:07 [29229] rsync on big/tools/DI/dis2.2.1 from
irvnetsvr=20
>(134.27.9.31)
>2001/05/17 14:27:24 [29229] transfer interrupted (code 20) at
rsync.c(229)
>2001/05/17 15:29:54 [29790] rsync on
ToolSyncModules/ToolSyncModuleList=20
>from prinetsvr (134.27.15.1)
>2001/05/17 15:29:56 [29790] wrote 23292 bytes read 128 bytes total
size=20
>23179
>2001/05/17 15:29:57 [29792] rsync on
ToolSyncModules/ToolSyncModuleList=20
>from bosnetsvr (134.27.7.2)
>2001/05/17 15:29:58 [29791] rsync on
ToolSyncModules/ToolSyncMastersList=20
>from prinetsvr (134.27.15.1)
>2001/05/17 15:29:58 [29792] wrote 23292 bytes read 128 bytes total
size=20
>23179
>2001/05/17 15:29:59 [29791] wrote 247 bytes read 129 bytes total
size=20
>133
>2001/05/17 15:29:59 [29793] rsync on
ToolSyncModules/ToolSyncMastersList=20
>from bosnetsvr (134.27.7.2)
>2001/05/17 15:30:00 [29793] wrote 247 bytes read 129 bytes total
size=20
>133
>2001/05/17 15:30:01 [29800] rsync on
ToolSyncModules/ToolSyncModuleList=20
>from balnetsvr (134.27.5.1)
>2001/05/17 15:30:01 [29799] rsync on big/tools/DAI from bosnetsvr=20
>(134.27.7.2)
>2001/05/17 15:30:01 [29801] rsync on big/tools/DAI from prinetsvr=20
>(134.27.15.1)
>2001/05/17 15:30:02 [29800] wrote 23292 bytes read 128 bytes total
size=20
>23179
>2001/05/17 15:30:03 [29823] rsync on
ToolSyncModules/ToolSyncMastersList=20
>from balnetsvr (134.27.5.1)
>2001/05/17 15:30:04 [29801] wrote 8736 bytes read 102 bytes total
size=20
>184269251
>2001/05/17 15:30:04 [29823] wrote 247 bytes read 129 bytes total
size=20
>133
>You can easily track them by pid. Heck, you can even key on the pid
field =
>and sort to make it easier to read, if you need.
>There's even a "log format" option for the rsyncd.conf, which settles
the=20
>whole question
>Headers, Environments, and Macros rsyncd.conf(5)
>
>
>
> log format
> The "log format" option allows you to specify the for-
> mat used for logging file transfers when transfer log-
> ging is enabled. The format is a text string containing
> embedded single character escape sequences prefixed
> with a percent (%) character.
>
> The prefixes that are understood are:
>
>
>
> o %h for the remote host name
>
> o %a for the remote IP address
>
> o %l for the length of the file in bytes
>
>Good luck.
>
>Tim Conway
>tim.conway at philips.com
>303.682.4917
>Philips Semiconductor - Longmont TC
>1880 Industrial Circle, Suite D
>Longmont, CO 80501
>Available via SameTime Connect within Philips, n9hmg on AIM
>perl -e 'print pack(nnnnnnnnnnnn,=20
>19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970),
=20
>".\n" '
>"There are some who call me.... Tim?"
>
>
>
>>"John Hartery" <johnh1234 at hotmail.com>
>>Sent by: rsync-admin at lists.samba.org
>>02/23/2002 10:57 AM
>>Please respond to jhartery
>>
>> To: rsync at lists.samba.org
>> cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
>> Subject: Log File format
>> Classification:=20
>>Hello All,
>>=20
>>Thanks for maintaining this very usefull program and newsgroup, I
hope=20
>>this is not a silly question...
>>=20
>>I am currently running an rsync server based on SuSE 7.2 + rsync 2.5.2
in=20
>>daemon mode, and I have a number of 'Internet appliances' based
on=20
>>Redhat 6.1, scattered across the UK running rsync via cron &
manually,=20
>>thus rsync'ing may occur at any time. It is initiated by the
appliances to =
>>send data to the server.
>>=20
>>However I am having a problem gathering statistics for each
connection=20
>>from the rsync daemon log file. I do use an entry in rsyncd.conf to=20
>>specify a log file. The problem I have is that the initial, rsync=20
>>client/server exchange happens with one process ID, rsync (server)
then=20
>>appears to fork and produce another process, exchanges between=20
>>server/client occur with this new process.
>>=20
>>Now each line in the log file contains a PID, but how can I relate
the=20
>>initial 'rsync to' line with its PID, to the corresponding 'wrote'
line,=20
>>with it's PID. Generally the child process has a PID of PPID + 1, but
of=20
>>course that can't be guaranteed. I have tried the 'log format' option
in=20
>>rsyncd.conf but that does not affect the 'rsync to' or 'wrote XXX....
Read =
>>XXX ....Total Size XXX' lines written to the log file.
>>=20
>>Any advice/patches would be much appreciated.
>>=20
>>Regards=20
>>=20
>>John Hartery
>>=20
>>jhartery at breathemail.net
-------------------------------------------------------------
More information about the rsync
mailing list