This example demonstrates the use of performance counters in a KasperskyOS-based solution.
Example directory in the SDK
The code of the example and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<platform>-<version>/examples/perfcnt
List of programs
Worker – application that performs calculations in a loop, periodically loading the processor and using memory.Monitor – application that gets the performance counter values for the Worker program.DCM – system program that lets you dynamically create IPC channels.Initialization description
The solution initialization description file named init.yaml is generated during the solution build process based on the ./einit/src/init.yaml.in template. Macros in @INIT_*@ format contained in the template are automatically expanded in the resulting init.yaml file. For more details, refer to init.yaml.in template.
Security policy description
The ./einit/src/security.psl file contains description of the solution security policy. The declarations in the PSL file are provided with comments that explain the purpose of these declarations.
Resources
The ./resources/xdl/perfcnt directory contains EDL descriptions of the Worker and Monitor programs.
Operating scenario
The Monitor program performs the following actions:
Building and running the example
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
See Building and running examples section.
Page top