Created On: 03 March 2011
Problem:
How can I limit the size and amount of CTF trace files to be generated during a CTF trace?
Resolution:
There are 2 emitter properties that can be used to control the size and amount of CTF files that are produced during a CTF Trace.
The two properties are MAXFILESIZE and MAXGENERATION.
MAXFILESIZE sets the size of each trace file and MAXGENERATION sets the number of trace files to generate.
For example, one could set the properties as follows:
mftrace.emitter.binfile#MAXFILESIZE=0x00002800 (use hexadecimal format; this example is for 10Mb)
mftrace.emitter.binfile#MAXGENERATION=3 (this will produce a total of 3 log files)
When the max size is reached a new file will be started up until the number set in maxgeneration is reached.
The file generation will then start again by overwriting the first file generated and so on.
A sample ctf.cfg file may look like this:
mftrace.level=debug
mftrace.dest=BINFILE
## Emitter BINFILE
mftrace.emitter.binfile#location=.\\
mftrace.emitter.binfile#MAXFILESIZE=0x00002800
mftrace.emitter.binfile#MAXGENERATION=3
## Component Run-time System
mftrace.comp.mf.rts#all=true
## Component External File Handler
mftrace.comp.mf.mffh.xfh#bsio=true
mftrace.comp.mf.mffh.xfh#mem=true
mftrace.comp.mf.mffh.xfh#base=true
mftrace.comp.mf.xfh.mfh.xfh#file:*=true
Remember to set the environment variable MFTRACE_CONFIG:
set MFTRACE_CONFIG=.\\ctf.cfg
Run application. One or more files with the extension .ctb will be created.
The two properties are MAXFILESIZE and MAXGENERATION.
MAXFILESIZE sets the size of each trace file and MAXGENERATION sets the number of trace files to generate.
For example, one could set the properties as follows:
mftrace.emitter.binfile#MAXFILESIZE=0x00002800 (use hexadecimal format; this example is for 10Mb)
mftrace.emitter.binfile#MAXGENERATION=3 (this will produce a total of 3 log files)
When the max size is reached a new file will be started up until the number set in maxgeneration is reached.
The file generation will then start again by overwriting the first file generated and so on.
A sample ctf.cfg file may look like this:
mftrace.level=debug
mftrace.dest=BINFILE
## Emitter BINFILE
mftrace.emitter.binfile#location=.\\
mftrace.emitter.binfile#MAXFILESIZE=0x00002800
mftrace.emitter.binfile#MAXGENERATION=3
## Component Run-time System
mftrace.comp.mf.rts#all=true
## Component External File Handler
mftrace.comp.mf.mffh.xfh#bsio=true
mftrace.comp.mf.mffh.xfh#mem=true
mftrace.comp.mf.mffh.xfh#base=true
mftrace.comp.mf.xfh.mfh.xfh#file:*=true
Remember to set the environment variable MFTRACE_CONFIG:
set MFTRACE_CONFIG=.\\ctf.cfg
Run application. One or more files with the extension .ctb will be created.
Incident #2504090
Old KB# 33577
#CTFtrace



