This example demonstrates use of the performance counters in KasperskyOS.
The example includes two programs: Worker
and Monitor
.
The Worker
program performs computations in a loop by periodically loading the processor and utilizing memory.
The Monitor
program uses the KnProfilerGetCounter()
function of the libkos
library to get the values of performance counters for the Worker
program and prints them to the console.
The CMake
system, which is included with KasperskyOS Community Edition, is used to build and run the example.
If you build and run this example on QEMU, some performance counters may not function correctly.
Example files
The code of the example and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<version>/examples/perfcnt
Building and running example
See Building and running examples section.
Page top