Chapter 3. Gateway development 65
3.6.1 Transferring file inbound
The transfer inbound is performed using ftp. The configuration file is provided in
Example 3-5 on page 54. The audit log contains information about the files that
are transferred, Example 3-15 contains the audit log (we strip out the time stamp
for clarity).
Example 3-15 The inbound file transfer audit log
PIF module in use PIF_Handler
Start Transfer Engine: IN
Processing Transfer rule Transfer files in
TransferEngine::Ftp: Getting files
TransferEngine::Ftp File transfered
/code/motorola-ggsn-source/PassiveCollector-IBM.pmgw_cgprsAccPtStatisti
csEntry_13_01_2009_11_47_42.csv
Finished Transfer rule result 1
Finished Transfer Engine: IN
The processing log message is listed in Example 3-16. We use the most detailed
level of detail (LOGLEVEL=5). We also strip out the time stamp for clarity.
Example 3-16 The inbound file transfer message log
5 lock_process
(../spool/parse,/gways/gateway-framework/parsersrc/gateway_main.pm)
A PIF module in use PIF_Handler
3 Loader dir size utility not configured
A Start Transfer Engine: IN
A Processing Transfer rule Transfer files in
5 TransferEngine: PROTOCOL is ftp
4 TransferEngine: Protocol is ftp
5 Checking optional TIMEOUT which can be type SCALAR
5 Checking optional OVERWRITE_FILES which can be type SCALAR
5 Checking optional TMP_FILENAME_EXTENSION which can be type SCALAR
5 Checking optional PING_RETRY_ATTEMPTS which can be type SCALAR
5 Checking optional RETRY_INTERVAL which can be type SCALAR
5 Checking optional PING_PROTOCOL which can be type SCALAR
5 Returning 0 errors from configuration check
A TransferEngine::Ftp: Getting files
5 Time stamp file ./.timestamp_in doesn't exist
5 TransferEngine::Ftp: set transfer mode to binary
5 Transfer - created connection to 9.3.5.11
5 Transfer files in /code/motorola-ggsn-source since
5 Slept for 0 seconds
5 dir_ent:
66 IBM Tivoli Netcool Service Quality Manager Data Mediation Gateway Development
-rwx------ 1 0 0 1787 Jan 13 17:49
PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_42
.csv
1 TransferEngine::Ftp: Getting files and modification times
5 Processing file
PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_42
.csv
5 File
PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_42
.csv mod time 1231868953 size 1787
5 Getting the files now...
5 Matched file
PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_42
.csv to type CSV
4 TransferEngine::Ftp Starting copy
PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_42
.csv
A TransferEngine::Ftp File transfered
/mnt/hgfs/src/PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01
_2009_11_47_42.csv
5 Setting new modtime 1231868953 for /code/motorola-ggsn-source
5 Writing out new modification time
A Finished Transfer rule result 1
4 TransferEngine:: DIRECTION IN - copied 1 files
A Finished Transfer Engine: IN
The file transfer stores the file time stamp information in a file. It is used to avoid
reprocessing the file. For the inbound transfer, the file is called .timestamp_in, as
specified in the rule definition. Example 3-17 shows the .timestamp_in file with
one entry.
Example 3-17 The .timestamp_in file
$mod_time = {
'/code/motorola-ggsn-source' => {
'PREV_FILES' => {},
'LAST_TIME' => '1231868953',
'COPIED_FILES' => {
'PassiveCollector-IBM.pmgw_cgprsAccPtStatisticsEntry_13_01_2009_11_47_4
2.csv' => '1787'
}
}
};

Get IBM Tivoli Netcool Service Quality Manager Data Mediation Gateway Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.