![]()  | 
![]()  | 
![]()  | 
![]()  | 
Display system statistics (QNX Neutrino)
pidin [options] shorthand
Neutrino
The options are:
| Format | Description | 
|---|---|
| A | Arguments | 
| a | Process ID | 
| B | What you're blocked on; see “Values in the Blocked column,” below. | 
| b | Thread ID | 
| c | Code size of the process | 
| d | Data size of the process | 
| E | Environment | 
| e | Parent PID | 
| f | Process flags (see the flags shorthand below) | 
| H | Scheduling-specific information for each thread.
        For adaptive partitioning scheduling, it's the name of the
        partition that the thread is running in.
        For more information, see the Adaptive Partitioning
        User's Guide.
         This formatting code was added in the QNX Neutrino Core OS 6.3.2.  | 
| h | Thread name; if a thread doesn't have a name, pidin
        displays the thread's ID (tid) instead.
         This formatting code was added in the QNX Neutrino Core OS 6.3.2.  | 
| I | PID and TID | 
| i | Runmask and inherit mask.
 This formatting code was added in the QNX Neutrino Core OS 6.3.2.  | 
| J | State of the thread; see “Thread life cycle” in the QNX Neutrino Microkernel chapter of the System Architecture guide | 
| K | What kernel call was executed last | 
| l | (“el”) The last CPU the thread ran on | 
| M | Memory owned by the PID | 
| m | Stack size of the process | 
| N | Short name of the process | 
| n | Long name of the process | 
| o | Connection IDs and file descriptors associated with the process
        (see the fds shorthand below)
         This formatting code was added in the QNX Neutrino Core OS 6.3.2.  | 
| P | (Uppercase “P”) parent group | 
| p | (Lowercase “p”) thread priority | 
| Q | Interrupt handlers | 
| q | Backtrace of calling routines.
         For best results, use this format with the I format.
         This formatting code was added in QNX Neutrino 6.4.0.  | 
| R | Timers | 
| S | Signal ignore mask | 
| s | Signal queued mask | 
| T | Number of threads | 
| [ | Lengths of the send, receive, reply and pulse queues.
         This formatting code was added in QNX Neutrino 6.4.0.  | 
If you don't specify a format, the default is "%a %b %N %p %J %B".
The letter following the scheduling priority number stands for the scheduling policy used, as follows:
For more information on these scheduling policies, see “Thread scheduling” in the System Architecture guide.
| Format | Description | 
|---|---|
| < | Memory object code size | 
| = | Memory object data size | 
| > | Memory object address | 
| ? | Memory object offset | 
| M | Memory owned by the PID | 
| : (colon) | Memory object name | 
| ; (semicolon) | Offset | 
If you don't specify a format, the default is the empty string, "".
![]()  | 
If the pid is a number, it's interpreted as a process ID; otherwise, it's interpreted as a name. Don't assign a numerical name to a process.  | 
The shorthand name is one of the following. You need to type only as many characters of the name as are required to uniquely identify it.
$ pidin -p devc-con-hid back
pid-tid     backtrace
    4103-01 b033ab5b:b03323cb:b03324f3:804f6ed:804c120:804a285
    4103-02 b033af63:805ca60:b031f0ad
  
  The output includes the process ID hyphenated to the thread ID, followed by a backtrace of the addresses of the calling routines.
![]()  | 
The backtrace shorthand was added in QNX Neutrino 6.4.0. | 
![]()  | 
The channels shorthand was added in QNX Neutrino 6.4.0. | 
For the adaptive partitioning scheduler, this is one line of global configuration and then one line for each defined partition (showing the name, budget, critical budget, and overload notifications). For more information, see the Adaptive Partitioning User's Guide.
![]()  | 
The extsched shorthand was added in the QNX Neutrino Core OS 6.3.2. | 
![]()  | 
The fds shorthand was added in the QNX Neutrino Core OS 6.3.2. | 
The information for each connection and file descriptor includes the following:
| Flag | Value | 
|---|---|
| _NTO_PF_NOCLDSTOP | 0x00000001 | 
| _NTO_PF_LOADING | 0x00000002 | 
| _NTO_PF_TERMING | 0x00000004 | 
| _NTO_PF_ZOMBIE | 0x00000008 | 
| _NTO_PF_NOZOMBIE | 0x00000010 | 
| _NTO_PF_FORKED | 0x00000020 | 
| _NTO_PF_ORPHAN_PGRP | 0x00000040 | 
| _NTO_PF_STOPPED | 0x00000080 | 
| _NTO_PF_DEBUG_STOPPED | 0x00000100 | 
| _NTO_PF_BKGND_PGRP | 0x00000200 | 
| _NTO_PF_NO_LIMITS | 0x00000400 | 
| _NTO_PF_CONTINUED | 0x00000800 | 
| _NTO_PF_CHECK_INTR | 0x00001000 | 
| _NTO_PF_COREDUMP | 0x00002000 | 
| _NTO_PF_PTRACED | 0x00004000 | 
| _NTO_PF_RING0 | 0x00008000 | 
| _NTO_PF_SLEADER | 0x00010000 | 
| _NTO_PF_WAITINFO | 0x00020000 | 
| _NTO_PF_VFORKED | 0x00040000 | 
| _NTO_PF_DESTROYALL | 0x00080000 | 
| _NTO_PF_NOCOREDUMP | 0x00100000 | 
| _NTO_PF_NOCTTY | 0x00200000 | 
| _NTO_PF_THREADWATCH | 0x80000000 | 
4101   8 proc/boot/io-usb    10o RECEIVE           80K  424K   4096(20K)
         libc.so.3          @b0300000             452K   16K
         devu-uhci.so       @b8200000              24K  4096
         devu-ohci.so       @b8207000              24K  4096
         devu-ehci.so       @b820e000              28K  4096
         Mapped Phys Memory @40100000 (ee000000)         12K  S
  
  It includes:
For more information about these flags, see mmap() in the QNX Neutrino Library Reference.
![]()  | 
The mapinfo shorthand was added in QNX Neutrino 6.4.0. | 
The stack numbers represent the amount of stack currently mapped and, in brackets, the maximum allowed for that process.
A * next to a stack size indicates that memory used in the stack isn't automatically returned to the system heap when the thread exits. The memory is returned when the process exits.
Entries for /dev/mem indicate shared memory that's mapped into the process address space. For example:
/dev/mem @38100000 ( 0) 172K
If the entries for different processes show the same object (@38100000 in this example), they all reference the same shared memory object. The processes can map that shared memory differently; the number in parentheses is the offset that was used in the mmap() call, and the last number is the size of the mapping.
![]()  | 
The rmasks shorthand was added in the QNX Neutrino Core OS 6.3.2. | 
![]()  | 
The sched shorthand was added in the QNX Neutrino Core OS 6.3.2. | 
The times for the child processes are added to cutime and cstime only after the children terminate.
![]()  | 
  CPU usage is calculated by sampling.
  When the timer interrupt occurs,
  the kernel determines which process is running, and adds the time
  to the total running times of the active thread and its process.
  If the kernel itself is active, it also adds the time to the system times
  (stime) of the active thread and its process.
  The utime is the total running time minus the system time.
   As a result, these times are approximate, and can be inaccurate (e.g. if a process is driven by the timer interrupt). To determine more accurate times, use the system profiler. For more information, see the System Analysis Toolkit User's Guide, or the Analyzing Your System with Kernel Tracing chapter of the IDE User's Guide.  | 
The pidin utility displays statistics about the processes running on a QNX Neutrino system.
By default, pidin displays the statistics once and then exits. If you specify the -l, pidin loops forever, displaying statistics after the delay specified by the -d option.
If you specify the -l and -k options, pidin loops until a error occurs, displaying statistics after the given delay. The most common error encountered is a race condition: procnto indicates that a process exists, but the process is gone when pidin queries it.
If you want to find out how much space the image file system (IFS) occupies in the memory, run the following command:
pidin syspage=asinfo
and look for the lines with imagefs. See the output in the display as shown in the example below.
If you specify the %B format, the output includes a Blocked column whose value depends on the thread's state:
| State | Value | 
|---|---|
| CONDVAR | Address of the condvar | 
| JOIN | Thread ID of the blocking thread | 
| MUTEX | The address of the mutex, or the IDs of the process and thread blocked on, followed by the number of times locked, in the form pid-tid #times | 
| RECEIVE | ID of the channel within the process that the thread is blocked on | 
| REPLY | Process ID | 
| SEM | Address of the semaphore | 
| SEND | Process ID | 
| STACK | Stack size | 
| WAITPAGE | Virtual address of the page | 
| WAITTHREAD | Thread ID of the blocking thread | 
The pidin command prints a listing similar to this:
     pid tid name               prio STATE       Blocked
       1   1 /sys/procnto-instr   0f READY
       1   3 /sys/procnto-instr  10r RUNNING
       1   4 /sys/procnto-instr  12r RECEIVE     1
       1   5 /sys/procnto-instr  12r RECEIVE     1
       1   6 /sys/procnto-instr  12r RECEIVE     1
       1  11 /sys/procnto-instr  12r RECEIVE     1
       1  12 /sys/procnto-instr  10r RECEIVE     1
       1  13 /sys/procnto-instr  10r RECEIVE     1
       1  15 /sys/procnto-instr 255r RECEIVE     1
       1  16 /sys/procnto-instr  10r RECEIVE     1
       1  17 /sys/procnto-instr  10r RECEIVE     1
       2   1 sbin/tinit          10o REPLY       1
       3   1 proc/boot/slogger   10o RECEIVE     1
       5   1 proc/boot/pci-bios  10o RECEIVE     1
       6   1 roc/boot/devb-eide  10o SIGWAITINFO
       6   2 roc/boot/devb-eide  21r RECEIVE     1
       …
Using pidin -F "%I %60N" displays the PID and TID, along with up to 60 characters of the processes' short name:
pid-tid     name
       1-01 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-03 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-04 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-05 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-06 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-11 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-12 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-13 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-15 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-16 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       1-17 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr
       2-01 sbin/tinit
       3-01 proc/boot/slogger
       5-01 proc/boot/pci-bios
       6-01 proc/boot/devb-eide
       …
The pidin mem command displays:
     pid tid name               prio STATE           code  data         stack
       1   1 /sys/procnto-instr   0f READY           1812K   12K      0(320)*
       1   3 /sys/procnto-instr  10r RUNNING         1812K   12K     0(8192)
       1   4 /sys/procnto-instr  12r RECEIVE         1812K   12K     0(8192)
       1   5 /sys/procnto-instr  12r RECEIVE         1812K   12K     0(8192)
       1   6 /sys/procnto-instr  12r RECEIVE         1812K   12K     0(8192)
       1  11 /sys/procnto-instr  12r RECEIVE         1812K   12K     0(8192)
       1  12 /sys/procnto-instr  10r RECEIVE         1812K   12K     0(8192)
       1  13 /sys/procnto-instr  10r RECEIVE         1812K   12K     0(8192)
       1  15 /sys/procnto-instr 255r RECEIVE         1812K   12K     0(8192)
       1  16 /sys/procnto-instr  10r RECEIVE         1812K   12K     0(8192)
       1  17 /sys/procnto-instr  10r RECEIVE         1812K   12K     0(8192)
            procnto-instr      @cfbe5000              12K   12K
       2   1 sbin/tinit          10o REPLY            8192   36K  4096(516K)*
            ldqnx.so.2         @b0300000             344K   16K
       3   1 proc/boot/slogger   10o RECEIVE          8192  104K  4096(516K)*
            ldqnx.so.2         @b0300000             344K   16K
       5   1 proc/boot/pci-bios  10o RECEIVE           36K   40K  8192(516K)*
            ldqnx.so.2         @b0300000             344K   16K
       6   1 roc/boot/devb-eide  10o SIGWAITINFO       52K   91M  8192(516K)*
       6   2 roc/boot/devb-eide  21r RECEIVE           52K   91M   4096(12K)
       …
The pidin syspage=asinfo command displays:
Section:asinfo offset:0x00000568 size:0x00000240
    0)                0-ffff             o:ffff a:0000 p:100 n:io
   20)                0-ffffffff         o:ffff a:0010 p:100 n:memory
   40)                0-ffffff           o:0020 a:0010 p:100 n:memory/isa
   a0)                0-9fbff            o:0040 a:0017 p:100 n:memory/isa/ram
  180)             1000-cfff             o:00a0 a:0007 p:100 n:memory/isa/ram/sysram
  1a0)            20f98-9fbff            o:00a0 a:0007 p:100 n:memory/isa/ram/sysram
   c0)           100000-ffffff           o:0040 a:0037 p:100 n:memory/isa/ram
  1c0)           100000-40e507           o:00c0 a:0007 p:100 n:memory/isa/ram/sysram
  1e0)           5e533c-ffffff           o:00c0 a:0027 p:100 n:memory/isa/ram/sysram
   60)          6000000-ffefffff         o:0020 a:0013 p:100 n:memory/device
  100)          6000000-ffeafff          o:0060 a:0017 p:100 n:memory/device/ram
  220)          6000000-ffeafff          o:0100 a:0007 p:100 n:memory/device/ram/sysram
   80)         fff00000-ffffffff         o:0020 a:0005 p:100 n:memory/rom
   e0)          1000000-5ffffff          o:0020 a:0037 p:100 n:memory/ram
  200)          1000000-5ffffff          o:00e0 a:0027 p:100 n:memory/ram/sysram
  120)           40e508-5e533b           o:0020 a:0005 p:100 n:memory/imagefs
  140)           400400-40e507           o:0020 a:0007 p:100 n:memory/startup
  160)           40e508-5e533b           o:0020 a:0007 p:100 n:memory/bootram
QNX Neutrino Microkernel chapter of the System Architecture guide
Fine-Tuning Your System in the Neutrino User's Guide
![]()  | 
![]()  | 
![]()  | 
![]()  |