| File Pre- and Post-Processing (Prepost) |
93
Variable
Description
Values
Example
TOTALSIZE
The total size of files being transferred
in bytes.
positive
integer
"$TOTALSIZE" >= 500000000
For Files
Variable
Description
Values
Example
DELAY
The measured network delay, in ms.
positive
integer
"$DELAY" <= 1
FILE
The file name.
string*
"$FILE" == file-name
FILE_CSUM
Destination checksum of the most
recently transferred file.
string
"$FILE_CSUM" == checksum
LOSS
The network loss in percentage.
double-digit
fixed point
value
"$LOSS" >= 5.00
OVERHEAD
The total number of duplicate packets.
positive
integer
"$OVERHEAD" >= 1
RATE
The transfer rate in Kbps.
double-digit
fixed point
value
"$RATE" >= 10.00
REXREQS
The total number of retransmission
requests.
positive
integer
"$REXREQS" >= 3
SIZE
The file size in bytes.
positive
integer
"$SIZE" >= 5000000
STARTBYTE
The start byte if resumed.
positive
integer
"$STARTBYTE" >= 100000
Pre/Post Script Examples
The following pre-processing and post-processing script examples demonstrate how Aspera prepost environment
variables are used to achieve different types of processing.
Note:
The "File Pre- and Post-Processing (Prepost)" feature will be deprecated from HST Server and HST Endpoint
in versions 4.0 and onward. At that time, customers should use Inline File validation with Lua (
on page 87) or an External URL validator (
Out-of-Transfer File Validation
on page 80) for
pre-post processing features.
These examples use
bash
syntax. To run these examples on your own system, do the following:
• Save the example to
/opt/aspera/var/
myscript
.sh
.
• Ensure that the script file is executable -- for example:
$ chmod +x /opt/aspera/var/
myscript
.sh
• Add the line
/opt/aspera/var/
myscript
.sh
to
/opt/aspera/var/aspera-prepost
to call
myscript
.sh
.
• Be sure there is no exit condition in
aspera-prepost
before you call your script.
1. Shell
- Change file and directory permissions.