# Print start times of rsync transfer attempts that did not result in complete retrieval # (xaa, xab, etc), based on log output of sync-test script. BEGIN { tzOffsetSec = 7 * 3600; FS = "," error = 0; endingSet = 0; } /xba/ { endingSet = 1; } /UTC/ { endingSet = 0; if (error) { # If we've encountered errors, associated them with this time. cmd = sprintf("ut2et -format '%%a %%b %%d %%H:%%M:%%S UTC %%Y' '%s'", $1); cmd | getline epochSec; epochSec -= tzOffsetSec; close(cmd); timeTag = $0; printf "%d %s - %s\n", epochSec, timeTag, lastError; } } /rsync error:/ { if (endingSet) { # For some reason, always get several errors right after retrieving last file in set - ignore these error = 0; next; } error = 1; lastError = $0; }