Logging

The "-s" option or the "ShowLogs" option enables detailed logging of movedat's activities in a machine parseable format.  The output is sent to stdout where it may be redirected to a file or consumed by a parent process.  (This option is not available if data is being piped to stdout.)

Error conditions are reported using both MTP/IP numeric codes and human readable text.  See DEI Technical Note 0013 for a description of the numerical codes.

Each line of output records an event in one of the formats defined below.  Lines are terminated by the newline character '\n' and each field is delimited by a tab character '\t'.

The first field of each line contains a single character designating its type and format:

D Diagnostic message about an unusual condition, usually only reported when "-d" option or the "Debug" is enabled.
E Fatal error which will cause movedat to terminate.
F Final report indicating the completion status of a network transaction.
I Initiation of a network transaction.
L Local event, usually an error accessing a local file prior to attempting transfer.
P Progress report providing statistics for an ongoing transaction whose start was previously logged with an I record.
R Remote event, usually an error accessing a remote file prior to attempting transfer.
V Version information, including the process id.
W Warning about an unusual condition or error which may require user attention.

The second field of each line records the local date and time as "YYYYMMDD HH:MM:SS.mmm".  You can adjust the time zone by setting the TZ environment variable.  For example, running "export TZ=UTC" before running movedat will switch the logs to UTC time.

Additional fields depend on the type as described below.

Debug

Debugging messages are free-form and are intended for human consumption.

D <Time> <Message>

Error (Fatal)

Fatal error conditions which require movedat to terminate will be reported at the time they occur.  It is possible for additional log records to occur after the 'E' record, as movedat shuts down.  However, it is possible that the final status of some pending transactions may not be reported after a fatal error.

E <Time> <Class> <Code> <Error Text>

These tab delimited fields are defined as follows:

Class The MTP/IP error class.
Code The MTP/IP error code.
Error Text  The standard MTP/IP text description of the error followed by additional details.

Final Result

The completion status of a finished network transaction.

F <Time> <Type> <ID> <Class> <Code> <Duration> <File Data> <Network Data> <File Size> <Message>

These tab delimited fields are defined as follows:

Type A character indicating the type of operation being reported.
L Listing a remote directory or resolving globs.
G Getting a file.
S Sending a file.
M Moving (renaming) a remote file or directory.
X Deleting a remote file or directory.
N Creating a new remote directory (folder).

ID A unique 8 character transaction identifier.  Matching I and P records will contain the same identifier.
Class The MTP/IP error class.  This will be 0 for a successful completion.
Code The MTP/IP error code, if class is non-zero.  Otherwise ignore this value.
Duration The elapsed time of the transaction, in milliseconds.
File Data The number of bytes of file data have been received or sent.  If compression is enabled, this number may be different than the Network Data.  The two values can be compared to estimate the compression ratio.  In case of an error, this value may not be accurate.
Network Data  The number of bytes of data have been received or sent over the network.  If compression is enabled, this number may be different than the File Data.  The two values can be compared to estimate the compression ratio.  In case of an error, this value may not be accurate.
File Size The total number of original bytes that this transaction was attempting to transfer.  This can be compared to the File Data to measure progress.  This field may be reported as zero if the transaction ended with an error and the full size was not known.  (For example, an interrupted Object Handler download.)
Message In case of an error, this will be a human readable description.  On success, a report of the amount of data moved and an estimate of the effective speed will be reported.

Initiation

The start of a network transaction.

I <Time> <Type> <ID> <Local Path> <Username> <Remote Host> <Remote Path> <Handler>

These tab delimited fields are defined as follows:

Type A character indicating the type of operation being reported.  See Final for definitions.
ID A unique 8 character transaction identifier.  Matching F and P records will contain the same identifier.
Local Path The pathname of the local file involved in this operation.  If no local file applies, this field will consist of a single dash character '-'.
Username The username sent to the server for authentication.  If no username was given, this field will consist of a single dash character '-'.
Remote Host The name or IP address of the server.
Remote Path The pathname of the remote file involved in this operation.
Handler The object handler or action code requested, if any.

Local

An event or error relating to a local file which occurred before a network transaction could be initiated.  If multiple local files were specified, movedat will attempt to proceed with the rest.

L <Time> <Type> <Code> <Message> <Local Path>

These tab delimited fields are defined as follows:

Type A character indicating the type of operation being reported.  See Final for definitions.
Code The MTP/IP error code.  By definition, the associated class is -4 (MTP_ECL_LOCAPP).
Message A human readable description of the error.
Local Path The pathname of the local file involved in this operation.

Progress

During a network transaction, movedat may periodically report status updates which include progress statistics.  These will occur at intervals of at least one second.

P <Time> <Type> <ID> <Duration> <File Data> <Network Data> [File Size] [File Count] [Speed]

These tab delimited fields are defined as follows:

Type A character indicating the type of operation being reported.  See Final for definitions.
ID A unique 8 character transaction identifier.  Matching I and F records will contain the same identifier.
Duration The elapsed time of the transaction, in milliseconds.
File Data The number of bytes of file data have been received or sent, including any transferred in previous sessions.  If compression is enabled, this number may be different than the Network Data.  The two values can be compared to estimate the compression ratio.  When Sending with compression, this number will report the amount of data buffered, which will be higher than the amount that has actually be sent.
Network Data  The number of bytes of data have been received or sent over the network, which may or may not include those sent in a previous session.  If compression is enabled, this number may be different than the File Data.  The two values can be compared to estimate the compression ratio.
File Size The full size of the data transfer, including data moved in previous sessions.  This can be compared to the File Data to measure progress.  This field may be omitted if the size is not known.  (For example, during an Object Handler, Streaming Folders or compressed download.)
File Count For Streaming Folders transfers, this field will report the number items streamed so far.  This field will be blank for all other transfer types.
Speed The rate of data arrival observed by the receiver, in bits per second.  For outgoing data, this value may be delayed or absent if the receiver has not recently reported statistics.

Remote

An event or error relating to a remote file which occurred before a network transaction on that file could be initiated.  If multiple remote files were specified, movedat will attempt to proceed with the rest.

R <Time> <Type> <Code> <Message> <Username> <Remote Host> <Remote Path>

These tab delimited fields are defined as follows:

Type A character indicating the type of operation being attempted.  See Final for definitions.
Code The MTP/IP error code.  By definition, the associated class is +4 (MTP_ECL_REMAPP).
Message A human readable description of the error.
Username The username sent to the server for authentication.  If no username was given, this field will consist of a single dash character '-'.
Remote Host The name or IP address of the server.
Remote Path The pathname of the remote file involved in this report.

Version

At startup, after option processing and before network initialization, the component version string and process ID will be logged.

V <Time> movedat <Version> <Release Date> DEI [<Process ID>]

Warning

Warning messages are free-form and are intended for human consumption.

W <Time> <Message>

Performance

If this output is being piped directly to another application for processing, you must ensure that the target application actually reads it.  In a long transaction or series of transactions it is possible for the quantity of output to exceed the buffer capacity of stdout.  If this happens without the output being read, movedat will block.