Accessing Full Measurement Log
- From your host system, open two terminal windows. In the first window, you will start running the monitoring sample per the next steps. Then, in the second window, you will run the single measurement sample as input into the monitoring sample.
- In the first terminal window, connect to the target system:ssh <user>@<target>
- In the SSH session, run the monitoring sample and leave it running. The sample will wait for you to start the single measurement sample in the next step.TCC_MEASUREMENTS_BUFFERS=Approximation:10 TCC_MEASUREMENTS_TIME_UNIT=ns tcc_measurement_monitoring_samplewhere:ArgumentDescriptionTCC_MEASUREMENTS_BUFFERS=Approximation:10This environment variable specifies the measurement instance to collect:
TCC_MEASUREMENTS_TIME_UNIT=nsPrint measured latencies in nanoseconds.
- “Approximation” is the measurement name defined in the__itt_string_handle_createcall in thetcc_single_measurement_sample.
- “10” is the maximum number of measurements that can be stored for this measurement instance.
- In the second terminal window, connect to the target system:ssh <user>@<target>
- Start the single measurement sample:TCC_MEASUREMENTS_BUFFERS=Approximation:10 TCC_USE_SHARED_MEMORY=true TCC_MEASUREMENTS_DUMP_FILE=log.txt tcc_single_measurement_sample --approximation 20 --iterations 10where:ArgumentDescriptionTCC_MEASUREMENTS_BUFFERS=Approximation:10This environment variable matches the environment set in thetcc_measurement_monitoring_samplecommand.TCC_USE_SHARED_MEMORY=trueUse a shared memory ring buffer instead of a local buffer to store all measurement results.TCC_MEASUREMENTS_DUMP_FILE=log.txtStore the measurement buffers inlog.txtafter the program finishes.tcc_single_measurement_sample --approximation 20 --iterations 10The sample will calculate the 20th approximation of 2/pi and run 10 times.For more information about these command-line options, see Command-Line Options.
- In the second terminal window, view the full measurement results after the sample finishes execution. Example dump filelog.txt:# cat log.txt Approximation: 644, 573, 527, 521, 521, 527, 521, 517, 525, 517