Embedded Progress
When movedat is run from an interactive command line, it displays human readable status and progress information about each transaction. This display is normally disabled when stdout is not an interactive terminal, such as when movedat is being run under batch script or embedded underneath another application.
In such embedded situations, you may enable machine parseable status output by using the "-s" option or the "ShowProgress" configuration variable. movedat will then produce output suitable for logging or real-time monitoring of its progress.
You cannot receive progress if you are piping output to stdout.
Format
When ShowProgress is enabled and stdout is non-interactive, separate lines of output will be sent marking the beginning, end, and intermediate progress for each transaction. Each line is terminated by the newline character '\n'. The fields on each line are separated by tab characters '\t'.
The first character of each line designates its type and format:
| G | Start of a Get (file download). |
| S | Start of a Send (file upload). |
| P | Intermediate progress report. |
| F | Final report for a completed transaction. |
Start Lines
Exactly one start line will be output for each file transfer, containing the following tab separated fields:
| Type Character | Either G or S. |
| Transaction ID | A 32-bit hexedecimal number uniquely identifying this transaction. Any other lines relating to this transaction will include this number. |
| Start Time | The local date and time when the transaction started. The format is "YYYYMMDD HH:MM:SS". |
| Source | The data source, as it might be written on the command line. For a Get, the format is "user@server:path". For a Send, it just a pathname. |
| Destination | The data destination, as it might be written on the command line. For a Send, the format is "user@server:path". For a Get, it just a pathname. |
Progress Lines
Progress reports may be sent at intervals during the course of a transaction. These will generally be output once per second, but longer intervals may occur if data transfer is very slow.
| Type Character | P |
| Transaction ID | The transaction ID for this transaction, as initially reported on the start line. |
| Elapsed Time | The number of milliseconds that have elapsed since the start of the transaction. |
| Source Bytes | The number of bytes of source data have been received or sent. |
| Network Bytes | 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 Source Bytes. The two values can be compared to estimate the compression ratio. |
| Total Size | The total number of bytes that this transaction is attempting to transfer. This can be compared to the Source Bytes to measure progress. This field may be omitted if the source is a package or a pipe. |
Final Lines
Exactly one final line will be sent at the end of each transaction, containing the following fields:
| Type Character | F |
| Transaction ID | The transaction ID for this transaction, as initially reported on the start line. |
| Elapsed Time | The number of milliseconds that have elapsed since the start of the transaction. |
| Source Bytes | The number of bytes of source data have been received or sent. |
| Network Bytes | 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 Source Bytes. The two values can be compared to estimate the compression ratio. |
| Exit Code | If the transaction completed successfully, this field will be "0". If an error occurred, an exit code describing the error will appear here. |
| Total Size | The total number of bytes that this transaction was attempting to transfer. This can be compared to the Source Bytes to measure progress. This field may be omitted if the source is a package or a pipe, or the transaction failed before the size was known. |
Performance
If you request that movedat display this output, you must ensure that the parent 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 may deadlock.
Other Output
Additional human readable error output may be sent to stderr, however the format is not fixed. You should use the exit code from the final line to determine whether or not a transfer succeeded, or diagnose why it failed.
Machine parseable progress is not currently sent for file maintenance actions, such as rename, delete, or new folder. This may change in a future release.