This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: How to get information about the running program

Part Number: TDA4VM

Hi,

    My working environment is qnx+rtos on the tda4 board, we want to get information (such as CPU utilization, memory size) about the running program?

Thank you!

  • Memory and CPU usage can be seen using different QNX utilities.  The QNX utilities are documented online at qnx.com

    The QNX "top" utility can be used to show CPU usage.   

    20 processes; 86 threads;
    CPU states: 0.0% user, 0.0% kernel
    CPU  0 Idle: 99.9%
    CPU  1 Idle: 99.8%
    Memory: 4096M total, 2519M avail, page size 4K
    
          PID   TID PRI STATE    HH:MM:SS    CPU  COMMAND
            1    14  10 Run       0:00:00   0.04% kernel
       221204     1  10 Rply      0:00:00   0.02% top
           11     2  21 Rcv       0:00:00   0.00% io-pkt-v6-hc
            5     2  10 NSlp      0:00:00   0.00% random
            6     1  24 Rcv       0:00:00   0.00% devc-seromap
        12300     9  10 Rcv       0:00:00   0.00% io-usb-otg
            1     3  10 Rcv       0:00:00   0.00% kernel
            1    11  10 Rcv       0:00:00   0.00% kernel
        20494     1  10 Rcv       0:00:00   0.00% tisci-mgr
        36880     1  10 Rcv       0:00:00   0.00% tiipc-mgr
    
                 Min        Max       Average
    CPU 0 idle:   99%        99%        99%
    CPU 1 idle:   99%        99%        99%
    Mem Avail:   2519MB      2519MB      2519MB
    Processes:    20         20         20
    Threads:      86         86         86
    

    The QNX "pidin" utility can be used to show different view of memory

    The "pidin in" option will show overall system usage

    CPU:AARCH64 Release:7.0.4  FreeMem:2519MB/4096MB BootTime:Jan 01 00:00:00 GMT 1970
     Actual resident free memory:2520Mb
    Processes: 20, Threads: 86
    Processor1: 1092604032 Cortex-A72 2000MHz FPU
    Processor2: 1092604032 Cortex-A72 2000MHz FPU
    

    The "pidin mem" , will show memory used by all processes, use"pidin -P <process name> mem", to look at memory usage by a specific process

    J7EVM@QNX:/# pidin -P procnto-smp-instr mem
         pid tid name               prio STATE            code  data        stack
           1   1 /procnto-smp-instr   0f RUNNING             0     0    480(480)
           1   2 /procnto-smp-instr   0f READY               0     0    480(480)
           1   3 /procnto-smp-instr  10r RUNNING             0     0  8192(8192)
           1   4 /procnto-smp-instr   1r RECEIVE             0     0  512K(512K)
           1   5 /procnto-smp-instr  10r CONDVAR             0     0  8192(8192)
           1   6 /procnto-smp-instr  10r CONDVAR             0     0  8192(8192)
           1   7 /procnto-smp-instr 255r RECEIVE             0     0  8192(8192)
           1   8 /procnto-smp-instr 255r RECEIVE             0     0  8192(8192)
           1   9 /procnto-smp-instr 255r RECEIVE             0     0  8192(8192)
           1  10 /procnto-smp-instr 255r RECEIVE             0     0  8192(8192)
           1  11 /procnto-smp-instr  10r RECEIVE             0     0  8192(8192)
           1  12 /procnto-smp-instr  10r RECEIVE             0     0  8192(8192)
           1  13 /procnto-smp-instr  10r RECEIVE             0     0  8192(8192)
           1  14 /procnto-smp-instr  10r RECEIVE             0     0  8192(8192)
           1  15 /procnto-smp-instr  21r RECEIVE             0     0  8192(8192)
                procnto-smp-instr  @ffffff8060045000             689K  108K
    

    Regards,

    kb

  • Hi KB,

       How to get these information (CPU utilization, memory size) if the program is running on R5F or DSP ?

    Thank you!

  • Hi,

    The vision apps framework provides examples of performance measurement of the R5 / DSP cores.  See APIs at Vision Apps User Guide: Performance statistics reporting APIs.

    When running Vision Apps demos from the command line on QNX, at run time there is a "p" option to print off performance statistics.

    Regards,

    kb