Session Reports

Each time syncdat is run, it will report each step of the session in the server log to facilitate central monitoring and diagnostics.  In the following example, a Remote Master synchronization is reporting that two remote files were downloaded and one local file was deleted.  The UUID is shortened for clarity.

syncdat-1.5.1 Sync-Remote C9EF…E8 SCAN web@florida.mtpip.net:tst/ syncdat-1.5.1 Sync-Remote C9EF…E8 SYNC Total: 3/10485760, Client: i1 d1/5242880 r0/0 a2/10485760, Server: i0 d0/0 r0/0 a0/0 syncdat-1.5.1 Sync-Remote C9EF…E8 END 0 Total: 3/10485760

These reports are recorded in the servedat log file as R records with the following format:

R [Date] [Time] [DocID] GET [Client] [User] [Encrypt] "[Report]" "*rp"

Date Eight characters giving the year, month, and day as YYYYMMDD
Time Twelve characters giving the hour, minute, seconds, and milliseconds in localtime as HH:MM:SS.mmm
DocID An 8 character hexadecimal transaction identifier.
Client The IP address and UDP port number of the client application, separated by a colon.
User The username used for authentication, or "-" if none was provided.
Encrypt The content encryption method, or "-" if none was used.
Report The session report itself, as described below.

Each syncdat run will log two or three reports, depending on whether Safe Mode is enabled.  SCAN is reported at the start of a new session, SYNC reports the actions about to be taken (if any), and END reports the actions which actually occurred.  All three reports share the following format:

syncdat-[Version] Sync-[Mode] [UUID] [Report-Type] [Details]

Version The version number of the client executable.
Mode Local, Remote, or Peer, depending on the type of synchronization.
UUID A unique string matching this SCAN report to subsequent SYNC and END reports.  syncdat will generate an RFC 4122 compliant string by default, or you may specify your own session identifier using the -I option.
Report-Type Either SCAN, SYNC, or END.
Details Dependant Report-Type.

Here is a complete example of a SCAN report showing the start of a session:

R 20180530 14:24:06.772 C78784CB GET 45.26.246.161:51216 web AES "syncdat-1.5.1 Sync-Remote C9EFBE23-006B-46A3-B090-746B6031FBE8 SCAN web@florida.mtpip.net:tst/" "*rp"

SCAN Report

The SCAN report shows that the client has begun a new scan of the given server folder.  The details show the remote (server) path as seen by the client:

[user]@[server]:[path]

SYNC Report

The SYNC report shows a summary of the proposed local and remote changes, similar to the Comparing step.  Counted are the items to be Ignored, Deleted, Replaced, and added.  SYNC is skipped when running in Safe Mode.

Total: [File Count]/[File Bytes], Client: i[Count], d[Count]/[Bytes], r[Count/Bytes], a[Count/Add], Server: i[Count], d[Count]/[Bytes], r[Count/Bytes], a[Count/Add]

END Report

The END report shows the exit status of the client and a count of actions taken and bytes transferred.

[Exit Code] Total: [Count]/[Bytes]

A non-zero exit code indicates that the synchronization did not complete successfully.  The value will be an MTP Application class code, as shown in Tech Note 0013.  Some failure conditions, such as a loss of network connectivity, may prevent the logging of an END report.