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** 110121 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
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    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
    Fullscreen
    1
    2
    3
    4
    5
    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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    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
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX