Pre/Post Script Examples - IBM Aspera HST Admin Manual

High-speed transfer server
Table of Contents

Advertisement

Variable
TOTALSIZE
For Files
Variable
DELAY
FILE
FILE_CSUM
LOSS
OVERHEAD
RATE
REXREQS
SIZE
STARTBYTE

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
with Lua Script
on page 87) or an External URL validator
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.
Description
The total size of files being transferred
in bytes.
Description
The measured network delay, in ms.
The file name.
Destination checksum of the most
recently transferred file.
The network loss in percentage.
The total number of duplicate packets.
The transfer rate in Kbps.
The total number of retransmission
requests.
The file size in bytes.
The start byte if resumed.
| File Pre- and Post-Processing (Prepost) | 93
Values
Example
positive
"$TOTALSIZE" >= 500000000
integer
Values
Example
positive
"$DELAY" <= 1
integer
string*
"$FILE" == file-name
string
"$FILE_CSUM" == checksum
double-digit
"$LOSS" >= 5.00
fixed point
value
positive
"$OVERHEAD" >= 1
integer
double-digit
"$RATE" >= 10.00
fixed point
value
positive
"$REXREQS" >= 3
integer
positive
"$SIZE" >= 5000000
integer
positive
"$STARTBYTE" >= 100000
integer
(Out-of-Transfer File Validation
(Inline File Validation
on page 80) for

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents