Configuring Kanzi Monitor

During initialization, Kanzi Monitor reads the configuration file kanzimonitor.cfg. If the file is available, Kanzi Monitor reads configuration values from it. If the file is not available, Kanzi Monitor uses the default settings.

Trace Service configuration

Setting

Description

Default

ServiceTraceEnabled

Enables or disables the Trace Service.

1 (enabled)

CollectingTimerRepeatInterval

Controls how frequently the service collects samples, in milliseconds. Collection prevents sample loss, but increases memory usage.

0 (disabled)

WritingTimerOnceInterval

Controls the timing of a one-time write of the output to file, in milliseconds.

0 (disabled)

WritingTimerRepeatInterval

Controls how often the output is repeatedly written to file, in milliseconds.

0 (disabled)

WritingOnExitEnabled

Controls whether the output is written to file when the application exits.

0 (disabled)

WritingOnFrameDurationThreshold

Writes the output to file when the frame duration exceeds the threshold, in milliseconds. WritingOnFrameDurationTreshold (without the h before r) is accepted as a deprecated alias for backwards compatibility with 1.40.0.

0 (disabled)

CollectWithAppendingEnabled

Controls whether collection appends new samples to samples already in storage.

0 (disabled)

CollectingOnFullSampleBufferEnabled

Controls whether samples are collected when their profiler buffers are full. Takes effect only when CollectWithAppendingEnabled is enabled.

1 (enabled)

SessionLabel

Controls the session label used in the output filename for tracing format output. The output filename is composed as <SessionLabel>_<timestamp>_<sequence>.<ext>, where <ext> is determined by the active writer (.json for chrometrace). OutputFilename is accepted as a deprecated alias.

tracing_output

ActiveWriters

Comma-separated list of trace writers to activate at startup. Each writer registers itself with the Trace Service under a name; use overwatch.writers to list available writers and their descriptions. Multiple writers can be active simultaneously (e.g. ActiveWriters = chrometrace,perfetto). Writers can also be toggled at runtime via overwatch.activatewriter <name> / overwatch.deactivatewriter <name>. Built-in writers: chrometrace (Chrome Trace Format JSON, .json), perfetto (native Perfetto protobuf, .perfetto-trace), perfetto-producer (stream through the Perfetto producer SDK to the platform Perfetto daemon — Android traced or Linux perfetto — no file on disk; requires -DKZMONITOR_PERFETTO_PRODUCER=ON, pre-built Android binaries already are). The selection is applied once during TraceService::initialize(), so it covers built-in writers and any writer whose module initialises before the Trace Service. Writers registered by downstream plugins whose initialize() runs later must call the activation API from their own code; the runtime command works for any registered writer. Unknown names log a warning and are skipped; if the resulting active set is empty (typically a typo), the Trace Service additionally warns that no trace output will be produced. See Using the Profiling Trace service for the full registry model.

chrometrace

PerfettoProducerCaptureSeconds

When > 0 and the Perfetto producer SDK is built in, starts an in-process Perfetto tracing session at plugin load that runs for this many seconds and writes <SessionLabel>_<timestamp>_producer.pftrace. Independent of ActiveWriters — drives its own in-process session, not the writer registry. Use on hosts where no system tracing daemon is available (Windows, embedded). 0 disables this in-process session.

0 (disabled)

Command Processor Service configuration

Setting

Description

Default

ServiceCommandProcessorEnabled

Enables or disables the Command Processor Service.

1 (enabled)

LocalConsoleEnabled

Enables or disables the local stdin/stdout console.

1 (enabled)

RemoteConsoleEnabled

Enables or disables the remote TCP socket console.

1 (enabled)

RemoteConsolePort

Controls the listening socket port number for the remote console.

56000

SerialConsoleEnabled

Enables or disables the serial port console for embedded targets.

0 (disabled)

SerialConsolePort

Controls the serial port device name.

COM3 on Windows, /dev/ttyUSB0 on Linux, QNX, and Android

SerialConsoleBaudRate

Controls the baud rate of the serial port connection. Supported values: 9600, 19200, 38400, 57600, 115200, 230400, 460800.

115200

UI Service configuration

Setting

Description

Default

ServiceUIEnabled

Enables or disables the UI Service.

1 (enabled)

UIFontScale

Sets the font scale multiplier for the BasicUI overlay text. Useful for high-DPI devices where the default font size is too small.

1.0

Log Service configuration

Setting

Description

Default

ServiceLogEnabled

Enables or disables the Log Service.

1 (enabled)

LogMaxEntries

Controls the size of the log entry buffer.

100

Performance Service configuration

Setting

Description

Default

ServicePerformanceEnabled

Enables or disables the Performance Service.

1 (enabled)

Overwatch Service configuration

Setting

Description

Default

ServiceOverwatchEnabled

Enables or disables the Overwatch Service. The Overwatch Service provides JSON-based introspection of the Kanzi application for use by remote debugging tools such as the Monitor Web UI.

1 (enabled)

OverwatchPropertyChangeEnabled

Allows property modification through the Overwatch Service. When disabled, the service operates in read-only mode.

1 (enabled)

Example configuration file

# Trace Service
ServiceTraceEnabled = 1
CollectingTimerRepeatInterval = 0
WritingTimerOnceInterval = 0
WritingTimerRepeatInterval = 0
WritingOnExitEnabled = 0
WritingOnFrameDurationThreshold = 0
CollectWithAppendingEnabled = 0
CollectingOnFullSampleBufferEnabled = 1
SessionLabel = tracing_output
ActiveWriters = chrometrace

# Command Processor Service
ServiceCommandProcessorEnabled = 1
LocalConsoleEnabled = 1
RemoteConsoleEnabled = 1
RemoteConsolePort = 56000
SerialConsoleEnabled = 0
SerialConsolePort = COM3
SerialConsoleBaudRate = 115200

# UI Service
ServiceUIEnabled = 1
UIFontScale = 1.0

# Log Service
ServiceLogEnabled = 1
LogMaxEntries = 100

# Performance Service
ServicePerformanceEnabled = 1

# Overwatch Service
ServiceOverwatchEnabled = 1
OverwatchPropertyChangeEnabled = 1

See also

Getting started with Kanzi Monitor

Working with Kanzi Monitor services