Client application to "play back" a TRAP_COMM log file made by using the DIAGNOSTICS TRAP_COMM server keyword to "record" the communication traffic coming in to a server.
cttrap [-display | -displayonly] [-p <password_file>] [-t <trapcomm_log_file_name>] [-s <servername>] [-v] [-x]
When activated, the DIAGNOSTICS TRAP_COMM keyword instructs the FairCom Server to log incoming communications packets to TRAPCOMM.FCS prior to execution. This log can be played back using the cttrap utility and a debug Server to observe the results of the client requests, allowing the developer to exactly duplicate and repeat client activities.
cttrap is a multi-threaded client application that "plays back" a TRAPCOMM.FCS log file. Whenever a multi-threaded client library is created, cttrap will also be generated.
DIAGNOSTICS TRAP_COMM Keyword
When the DIAGNOSTICS TRAP_COMM keyword is active, the trap file, TRAPCOMM.FCS, is created in the server directory by default. To prepend a path onto the trap file name (to route it to a separate disk or directory), add an entry of the form DIAGNOSTIC_STR <trap file path>. For example, if the trap file is located in /bigdisk/TRAPCOMM.FCS, the configuration file needs to contain the following:
C:\> cttrap -t TRAPCOMM.FCS -displayonly
c-tree(tm) Version 126.96.36.199(Build-190918)
Client Communication Replay Utility
Copyright (C) 1992 - 2019 FairCom Corporation
ALL RIGHTS RESERVED.
seqnum taskid function filno long size outlen mode filename
3 24 INTISAM 0 0 0 0 0
5 24 ctSETCOMPRESS 3 1 1 0 55
7 24 SYSCFG 0 0 0 1024 0
9 24 TRANBEG 50 0 0 0 0
89 24 OPNRFIL 5 -1 0 2064 0 qadfridx.dat
255 25 SETNODE 0 0 0 0 0
257 25 SYSCFG 0 0 0 1024 0
259 25 STPUSR 0 0 0 0 0
cttrap is processing log file \TRAPCOMM.FCS for FAIRCOMS [upto 256 clients]
Starting Time Stamp: 1568924640 Server Flavor: LOW_HIGH
Using a Password File
To allow cttrap to connect to a password-protected server when reading from a TRAPCOMM.FCS file, use the -p <password_file> option to specify the name of a text file containing a list of user names and passwords, one per line. For example, the file pass.txt might contain the entries:
Then cttrap can be run as follows:
cttrap TRAPCOMM.FCS -p pass.txt FAIRCOMS
The passwords must match the passwords on the server where the playback occurs, not necessarily where the playback was recorded.
Up to 16 user name/password entries can be specified in the cttrap password file. If you wish to support more entries, change #define MAXUPW in cttrap.c and recompile the utility.
Before V11.9, prior usage was as follows:
cttrap <Trap Comm Log File Name> [-p <password_file>][-x] [<Server>]