Last updated on

Introduction

This tutorial provides a step-by-step guide on how to trace cyclictest using . We'll cover:

  1. Installing cyclictest on Ubuntu
  2. Running cyclictest with LiME tracing

Installing Cyclictest on Ubuntu

cyclictest is part of the rt-tests package. Install it using:

sudo apt-get update
sudo apt-get install rt-tests

Verify the installation:

cyclictest --help

Install LiME

Please refer to the Installation page.

Tracing Cyclictest with LiME

  1. Run and trace cyclictest:
sudo target/release/lime-rtw trace -o trace_cyclictest -- cyclictest -Ss -p 99

You should see the standard cyclictest output displayed in the console.

Pressing Ctrl-C will stop both cyclictest and tracing. Afterward, the console will show the message: Results saved in trace_cyclictest.

  1. Extract models from traced results:
# Extract jobs
sudo target/release/lime-rtw extract-jobs -f trace_cyclictest --inplace 

# Extract models
sudo target/release/lime-rtw extract -f trace_cyclictest --inplace 

After running the extraction commands, you should see the following files under the trace_cyclictest directory. Each file corresponds to a specific process and version, following the naming pattern $(TASK_ID).*.json:

For $(TASK_ID), it is composed of a process ID (pid) and a unique identifier. For more details on the TASK_ID format and other output files, please refer to the documentation page.

trace_cyclictest
├── $(TASK_ID).events.json # Generated by the `trace` command
├── $(TASK_ID).infos.json # Generated by the `trace` command
├── $(TASK_ID).jobs.json # Generated by the `extract-jobs` command
├── $(TASK_ID).models.json # Generated by the `extract` command

Note: Sometimes, no jobs or models JSON files are generated. This indicates that was unable to extract models from the tracing results.

Understanding the Results

The trace results are stored in three different JSON files for each process (identified by its TASK_ID):

  1. $(TASK_ID).events.json

    • Contains raw events traced by
    • Includes detailed timing information for:
      • Scheduling events
      • Interrupt handling
      • Context switches
      • System calls
  2. $(TASK_ID).jobs.json

    • Describes each process's job releases
    • Contains information about:
      • Job release times
      • Job completion times
      • Job execution patterns
      • Periodic job information
  3. $(TASK_ID).models.json

    • Contains extracted models for each process
    • Includes:
      • Process timing models
      • Execution patterns
      • Resource usage models
      • Scheduling behavior models

Next Steps

You can analyze these files to:

  • Conduct schedulability analysis
  • Detect scheduling delays
  • Analyze job release patterns
  • Validate process models

Additional Resources