Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

[FAQ] TDA4VM: How to view CPU and Memory Usage in QNX

Guru** 105581 points
Part Number: TDA4VM

When running QNX on A72, how can CPU usage and memory usage be viewed?

  • Memory and CPU usage can be seen using different QNX utilities which are available as part of astandard QNX SDP installation.  The QNX utilities are documented online at qnx.com

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

    0636.top.txt
    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

    2538.pidin_in.txt
    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

    0486.pidin_mem_procnto.txt
    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