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

ProfilingCategoryFilter

Profiling category filter the Trace Service applies at startup, with the same syntax as ProfilingCategoryFilter in application.cfg: rules separated by ;, category names in a rule separated by |, * for every category, for example "*=off;MainLoop|MyCategory=on". The default *=on enables every category, so the trace carries all engine categories and ResourceLoading, which Kanzi registers disabled. Set it empty (ProfilingCategoryFilter =) to leave the categories as the application configured them. A category that is disabled records nothing, so it has no spans in any trace. These are profiling categories, the ones the Trace service records; kzTrace categories are separate and not affected. Change categories at runtime with overwatch.profilingcategories. See Choosing which profiling categories are recorded.

*=on

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

RemoteConsoleMaxConnections

Maximum number of remote console clients served at the same time. A client that connects when the limit is reached is told so and disconnected, rather than being left waiting for a response that never comes.

4

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 the Overwatch Service to change values: property and data writes (overwatch.setprop, overwatch.setdata, overwatch.setresourceprop, overwatch.setrenderpassprop), resource manager settings, and message dispatch (overwatch.dispatchmessage), which runs application logic. When disabled, the service operates in read-only mode.

1 (enabled)

Debug Service configuration

Setting

Description

Default

ServiceDebugEnabled

Enables or disables the debug.* commands, which set property breakpoints. Separate from ServiceOverwatchEnabled because a breakpoint intervenes in the running application rather than reporting on it: it can trap into an attached debugger and run a console command from inside a property write. Set it to 0 to keep the introspection surface without that. See Using the Debug service.

1 (enabled)

NodeTree Service configuration

Setting

Description

Default

ServiceNodeTreeEnabled

Enables or disables the nodetree.* commands, which create nodes, destroy any node, detach and reattach nodes, and move nodes. Separate from ServiceOverwatchEnabled and OverwatchPropertyChangeEnabled because changing the tree’s structure can break the application in a way a property write does not. Set it to 0 to keep the rest of Kanzi Monitor without that. See Using the NodeTree service.

1 (enabled)

Resource Service configuration

Setting

Description

Default

ServiceResourceEnabled

Enables or disables the resource.* commands, which create resources in the running application, keep them alive and destroy them. Separate from ServiceOverwatchEnabled for the reason ServiceNodeTreeEnabled is: it adds to the application rather than reporting on it. See Using the Resource service.

1 (enabled)

Capture Service configuration

Setting

Description

Default

ServiceCaptureEnabled

Enables or disables the Capture Service, which records a bounded sequence of screen frames into memory as a keep-last-N ring. See Using the Capture service.

1 (enabled)

CaptureMaxBytes

The memory ceiling in bytes for the frame ring. Ring capacity is CaptureMaxBytes divided by the per-frame size, and capture.start clamps the frame count you request to that capacity. Must be greater than 0: there is no unlimited setting, because the ceiling is what keeps a long capture at full resolution from exhausting memory. A value of 0 or below is rejected and the default is used instead, with a warning naming the value in the log.

134217728 (128 MiB)

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
ProfilingCategoryFilter = *=on

# Command Processor Service
ServiceCommandProcessorEnabled = 1
LocalConsoleEnabled = 1
RemoteConsoleEnabled = 1
RemoteConsolePort = 56000
RemoteConsoleMaxConnections = 4
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

# Debug Service
ServiceDebugEnabled = 1

# NodeTree Service
ServiceNodeTreeEnabled = 1

# Resource Service
ServiceResourceEnabled = 1

# Capture Service
ServiceCaptureEnabled = 1
CaptureMaxBytes = 134217728

See also

Getting started with Kanzi Monitor

Working with Kanzi Monitor services

Working with Kanzi Monitor tools